[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/arm: add warning if memory modules overlap


  • To: Julien Grall <julien.grall@xxxxxxx>
  • From: Brian Woods <brian.woods@xxxxxxxxxx>
  • Date: Thu, 17 Oct 2019 12:48:53 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.60.83) smtp.rcpttodomain=epam.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l3gN7ufGxmiBUVfC+hEWWQMn226exnnVhyGcuNGYN7k=; b=DA5MbmWfrQlODVPRfG9yU24SS6qBMXl6tBOLrEN50dDdFvsMh0fwvkdlIirbv7lVa+YmkLxPMRffpqT5h93gV7SnDQAW8cycUOprHi0BBOIwbDMPgSQAGjdVtfmc8SwWwMeDRf+slgUkPUMbO46JZ0SFbm2kX+ivdGihDqXeQ/GLGyrt2IY5HuRmlezH3xpClTEjalLjmCe9TFPch9sQniyEEzeUPGrJ7rspVq4C0Jx/30HMTNiC8OPHgOX5nws5kyz5qg+OYdVVd4pBC6Hse32ExbOioL9jKvogahbG4CemLf59fyvN0fy3MvUAxqe9c+aL4nC5SClDXjTDjstAfg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MiSZpN7JaAW94VrBRf5xK91U2m/BRyClNgHyJWKQ+/e7PeTf+4uAh68fCLloPWI89egBIHxb17jkHsYaGpx84BffuitCet4qE429aFu64JWRQIxTgzRwyG6MN65dS12xHj9ip2mqmbvnUSZXQePmcOlJUSDF83MYkyGREjO8MBplwjYyXhjLfCWFTgHpRt7+NxmTG8HcmYwJ02LFBWBA484nNFMTqeaKTehQLi7dl89l4jYu6PbHs1P0lTtVoyPPtbz1Wu6PVvn6FEwBXGYvvHUNaK83Qnvuy3vgi0zlanv48uBmt3sVToOGJElbSaY16+scSFxW+2Kro/8zDkfzaQ==
  • Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; epam.com; dkim=none (message not signed) header.d=none;epam.com; dmarc=bestguesspass action=none header.from=xilinx.com;
  • Cc: Brian Woods <brian.woods@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 17 Oct 2019 19:49:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Oct 17, 2019 at 10:20:11AM +0100, Julien Grall wrote:
> Hi,
> 
> Sorry for the late answer.
> 
> On 11/10/2019 20:07, Brian Woods wrote:
> >Which is why I wanted to put it where it was in the patch.  Where the
> >user would see the warning after the information about the memory
> >modules were printed (and fair early).
> 
> I had a think about it, dumping the modules informations before is useful if
> you know that you have one module max per kind. So you avoid to print the
> modules address/size in the warning.
> 
> However, it is possible to have multiple kernel module (as long as they
> don't have the same start address), you could end up with the following
> message:
> 
> "WARNING: modules Kernel and Kernel overlap"
> 
> To make the message more meaningful, we would need to print the modules
> address/size. Therefore, I don't view that it is important to check
> overlapping in early_print_info(). In this case I would favor any code that
> don't add a double for loop.

Well, adding that information would be easy enough and cheap.  It would
make it multiline prinktk though:
WARNING: memory modules over lap:
        start_addr-end_addr: modulename
        start_addr-end_addr: modulename

If we're not doing that though, would it make sense to have a initdata
bool that checks it in add_boot_module() and then prints a simple
warning that there's a memory module overlap in early_print_info()?
That way there's no nested for loop and it gets printed where all the
addresses get printed (so you can actually figure out where the overlap
is).

> While thinking about this case, it made me realize that we only check the
> start address to consider a match. This means if the size is different, then
> it will be ignored. I think we ought to throw at least warning for this case
> as well.
> 
> Would you mind to have a look?

When you say starting address, do you mean like in the orginal patch?
If so, there's no functional change in checking the starts of n on m and
m on n then checking the start and end of n on m.

> >
> >Either way, take your pick of location and if it's only debug or not and
> >I can write it up and test it.
> 
> I would still prefer in add_boot_module(). See why above.

I wrote I suggested above and tested it so that'll be sent out soon.

Brian

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.