Skip to content
Commit 63887c9f authored by Maciej Wieczor-Retman's avatar Maciej Wieczor-Retman Committed by Dave Hansen
Browse files

x86: Compare physical instead of virtual PGD addresses



This is a preparatory patch for when pointers have tags in their
upper address bits. But it's a harmless change on its own.

The mm->pgd virtual address may be tagged because it came out of
the allocator at some point. The __va(read_cr3_pa()) address will
never be tagged (the tag bits are all 1's). A direct pointer value
comparison would fail if one is tagged and the other is not.

To fix this, just compare the physical addresses which are never
affected by tagging.

[ dhansen: subject and changelog munging ]

Signed-off-by: default avatarMaciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/fde443d0e67f76a51e7ab4e96647705840f53ddb.1738686764.git.maciej.wieczor-retman%40intel.com
parent 3ef938c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment