Commit 1ed308ba authored by Juergen Gross's avatar Juergen Gross Committed by Greg Kroah-Hartman
Browse files

x86/pat: Introduce lookup_address_in_pgd_attr()



[ Upstream commit ceb647b4 ]

Add lookup_address_in_pgd_attr() doing the same as the already
existing lookup_address_in_pgd(), but returning the effective settings
of the NX and RW bits of all walked page table levels, too.

This will be needed in order to match hardware behavior when looking
for effective access rights, especially for detecting writable code
pages.

In order to avoid code duplication, let lookup_address_in_pgd() call
lookup_address_in_pgd_attr() with dummy parameters.

Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20240412151258.9171-2-jgross@suse.com


Stable-dep-of: 5bc8b0f5 ("x86/pat: Fix W^X violation false-positives when running as Xen PV guest")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8bc95468
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment