]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/mm: Always "broadcast" PMD setting operations
authorDave Hansen <dave.hansen@linux.intel.com>
Mon, 14 Apr 2025 17:32:35 +0000 (10:32 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 17 Apr 2025 17:39:25 +0000 (10:39 -0700)
commitb0cc4d19f198cdfd1b58c8f5536670d1dc68cbbd
tree8cc9225071e1b2e4e6c92c98cb7f6f8f2a16500d
parent780f97e309302fdee05b31c91a4dc81ded4c3702
x86/mm: Always "broadcast" PMD setting operations

Kernel PMDs can either be shared across processes or private to a
process.  On 64-bit, they are always shared.  32-bit non-PAE hardware
does not have PMDs, but the kernel logically squishes them into the
PGD and treats them as private. Here are the four cases:

64-bit:                Shared
32-bit: non-PAE:       Private
32-bit:     PAE+  PTI: Private
32-bit:     PAE+noPTI: Shared

Note that 32-bit is all "Private" except for PAE+noPTI being an
oddball.  The 32-bit+PAE+noPTI case will be made like the rest of
32-bit shortly.

But until that can be done, temporarily treat the 32-bit+PAE+noPTI
case as Private. This will do unnecessary walks across pgd_list and
unnecessary PTE setting but should be otherwise harmless.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lore.kernel.org/all/20250414173235.F63F50D1%40davehans-spike.ostc.intel.com
arch/x86/mm/pat/set_memory.c
arch/x86/mm/pgtable.c