Re: [RFC PATCH 08/16] mm: Introduce kernel_pgtables_set_pkey()

2024-12-10 Thread Kevin Brodsky
On 09/12/2024 11:03, Peter Zijlstra wrote: > On Fri, Dec 06, 2024 at 10:11:02AM +, Kevin Brodsky wrote: >> kernel_pgtables_set_pkey() allows setting the pkey of all page table >> pages in swapper_pg_dir, recursively. This will be needed by >> kpkeys_hardened_pgtables, as it relies on all PTPs b

Re: [RFC PATCH 08/16] mm: Introduce kernel_pgtables_set_pkey()

2024-12-09 Thread Peter Zijlstra
On Fri, Dec 06, 2024 at 10:11:02AM +, Kevin Brodsky wrote: > kernel_pgtables_set_pkey() allows setting the pkey of all page table > pages in swapper_pg_dir, recursively. This will be needed by > kpkeys_hardened_pgtables, as it relies on all PTPs being mapped with > a non-default pkey. Those ini

[RFC PATCH 08/16] mm: Introduce kernel_pgtables_set_pkey()

2024-12-06 Thread Kevin Brodsky
kernel_pgtables_set_pkey() allows setting the pkey of all page table pages in swapper_pg_dir, recursively. This will be needed by kpkeys_hardened_pgtables, as it relies on all PTPs being mapped with a non-default pkey. Those initial kernel page tables cannot practically be assigned a non-default pk