mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
x86/pat: Restructure _lookup_address_cpa()
[ Upstream commit02eac06b82] Modify _lookup_address_cpa() to no longer use lookup_address(), but only lookup_address_in_pgd(). This is done in preparation of using lookup_address_in_pgd_attr(). No functional change intended. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20240412151258.9171-4-jgross@suse.com Stable-dep-of:5bc8b0f5da("x86/pat: Fix W^X violation false-positives when running as Xen PV guest") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e77e497bc5
commit
d126173b96
@@ -744,11 +744,14 @@ EXPORT_SYMBOL_GPL(lookup_address);
|
|||||||
static pte_t *_lookup_address_cpa(struct cpa_data *cpa, unsigned long address,
|
static pte_t *_lookup_address_cpa(struct cpa_data *cpa, unsigned long address,
|
||||||
unsigned int *level)
|
unsigned int *level)
|
||||||
{
|
{
|
||||||
if (cpa->pgd)
|
pgd_t *pgd;
|
||||||
return lookup_address_in_pgd(cpa->pgd + pgd_index(address),
|
|
||||||
address, level);
|
|
||||||
|
|
||||||
return lookup_address(address, level);
|
if (!cpa->pgd)
|
||||||
|
pgd = pgd_offset_k(address);
|
||||||
|
else
|
||||||
|
pgd = cpa->pgd + pgd_index(address);
|
||||||
|
|
||||||
|
return lookup_address_in_pgd(pgd, address, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user