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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 02 Mar 2020 14:20:20 -0800
From:   Dan Williams <dan.j.williams@...el.com>
To:     linux-acpi@...r.kernel.org
Cc:     Jason Gunthorpe <jgg@...pe.ca>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Wei Yang <richardw.yang@...ux.intel.com>,
        Tom Lendacky <thomas.lendacky@....com>, peterz@...radead.org,
        ard.biesheuvel@...aro.org, linux-nvdimm@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 4/5] resource: Report parent to walk_iomem_res_desc()
 callback

In support of detecting whether a resource might have been been claimed,
report the parent to the walk_iomem_res_desc() callback. For example,
the ACPI HMAT parser publishes "hmem" platform devices per target range.
However, if the HMAT is disabled / missing a fallback driver can attach
devices to the raw memory ranges as a fallback if it sees unclaimed /
orphan "Soft Reserved" resources in the resource tree.

Otherwise, find_next_iomem_res() returns a resource with garbage data
from the stack allocation in __walk_iomem_res_desc() for the res->parent
field.

Cc: Jason Gunthorpe <jgg@...pe.ca>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Wei Yang <richardw.yang@...ux.intel.com>
Cc: Tom Lendacky <thomas.lendacky@....com>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
---
 kernel/resource.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/resource.c b/kernel/resource.c
index 76036a41143b..6e22e312fd55 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -386,6 +386,7 @@ static int find_next_iomem_res(resource_size_t start, resource_size_t end,
 		res->end = min(end, p->end);
 		res->flags = p->flags;
 		res->desc = p->desc;
+		res->parent = p->parent;
 	}
 
 	read_unlock(&resource_lock);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ