lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 1 Mar 2019 17:06:22 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Dan Williams <dan.j.williams@...el.com>,
        Juergen Gross <jgross@...e.com>,
        Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Xen Devel <Xen-devel@...ts.xensource.com>
Cc:     Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: linux-next: manual merge of the nvdimm tree with the xen-tip tree

Hi all,

[Thanks, Dan for the heads up and resolution.]

Today's linux-next merge of the nvdimm tree got a conflict in:

  mm/memory_hotplug.c

between commit:

  357b4da50a62 ("x86: respect memory size limiting via mem= parameter")

from the xen-tip tree and commit:

  2794129e902d ("mm/memory-hotplug: Allow memory resources to be children")

from the nvdimm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc mm/memory_hotplug.c
index 1f678568ce5c,d2c44146473f..b96a3121b5e9
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@@ -101,28 -99,21 +101,24 @@@ u64 max_mem_size = U64_MAX
  /* add this memory to iomem resource */
  static struct resource *register_memory_resource(u64 start, u64 size)
  {
- 	struct resource *res, *conflict;
+ 	struct resource *res;
+ 	unsigned long flags =  IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
+ 	char *resource_name = "System RAM";
  
 +	if (start + size > max_mem_size)
 +		return ERR_PTR(-E2BIG);
 +
- 	res = kzalloc(sizeof(struct resource), GFP_KERNEL);
- 	if (!res)
- 		return ERR_PTR(-ENOMEM);
- 
- 	res->name = "System RAM";
- 	res->start = start;
- 	res->end = start + size - 1;
- 	res->flags = IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY;
- 	conflict =  request_resource_conflict(&iomem_resource, res);
- 	if (conflict) {
- 		if (conflict->desc == IORES_DESC_DEVICE_PRIVATE_MEMORY) {
- 			pr_debug("Device unaddressable memory block "
- 				 "memory hotplug at %#010llx !\n",
- 				 (unsigned long long)start);
- 		}
- 		pr_debug("System RAM resource %pR cannot be added\n", res);
- 		kfree(res);
+ 	/*
+ 	 * Request ownership of the new memory range.  This might be
+ 	 * a child of an existing resource that was present but
+ 	 * not marked as busy.
+ 	 */
+ 	res = __request_region(&iomem_resource, start, size,
+ 			       resource_name, flags);
+ 
+ 	if (!res) {
+ 		pr_debug("Unable to reserve System RAM region: %016llx->%016llx\n",
+ 				start, start + size);
  		return ERR_PTR(-EEXIST);
  	}
  	return res;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists