[RFC PATCH] x86/mm: Disable PTI for kernel_ident_mapping_init()
David Woodhouse
dwmw2 at infradead.org
Mon Nov 25 11:36:03 PST 2024
On 25 November 2024 19:13:02 GMT, Dave Hansen <dave.hansen at intel.com> wrote:
>On 11/25/24 10:53, David Woodhouse wrote:
>>> I think we have a lot of software-available space in the page table
>>> pointer entries. What would folks think if we set a special bit in those
>>> p4d entries that said:
>>>
>>> "I don't need to be propagated to
>>> the user portion of the page tables."
>>>
>>> It would obviously get set in this code that you're trying to fix. It
>>> might _also_ be able to be set in in "_USR", like here:
>>>
>>> #define _KERNPG_TABLE_NOENC (__PP|__RW| 0|___A| 0|___D| 0| 0)
>>> #define _PAGE_TABLE_NOENC (__PP|__RW|_USR|___A| 0|___D| 0| 0)
>>>
>>> like:
>>>
>>> #define _USR _PAGE_USER|_PAGE_SW_WHATEVER
>> In fact, do we even need a separate bit? Any PTE without the _PAGE_USER
>> bit set clearly doesn't need to be mirrored into the user page
>> tables...?
>
>I can't think of any exceptions where this would break off the top of my
>head. It seems too simple to work. ;)
I'll throw something together and see if it explodes.
More information about the kexec
mailing list