Re: [RFC PATCH] x86/mm: Disable PTI for kernel_ident_mapping_init()

2024-11-26 Thread David Woodhouse
On Tue, 2024-11-26 at 07:49 -0800, Dave Hansen wrote: > On 11/26/24 03:42, David Woodhouse wrote: > > I threw this version together and it didn't immediately explode... > > It's better than playing #define games. The damage is also pretty > limited and it helps us avoid plumbing a bit through the

Re: [RFC PATCH] x86/mm: Disable PTI for kernel_ident_mapping_init()

2024-11-26 Thread Dave Hansen
On 11/26/24 03:42, David Woodhouse wrote: > I threw this version together and it didn't immediately explode... It's better than playing #define games. The damage is also pretty limited and it helps us avoid plumbing a bit through the page table handling function arguments.

Re: [RFC PATCH] x86/mm: Disable PTI for kernel_ident_mapping_init()

2024-11-26 Thread David Woodhouse
On Mon, 2024-11-25 at 11:13 -0800, Dave Hansen 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 d

Re: [RFC PATCH] x86/mm: Disable PTI for kernel_ident_mapping_init()

2024-11-25 Thread David Woodhouse
On 25 November 2024 19:13:02 GMT, Dave Hansen 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

Re: [RFC PATCH] x86/mm: Disable PTI for kernel_ident_mapping_init()

2024-11-25 Thread Dave Hansen
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 ta

Re: [RFC PATCH] x86/mm: Disable PTI for kernel_ident_mapping_init()

2024-11-25 Thread David Woodhouse
On Mon, 2024-11-25 at 10:31 -0800, Dave Hansen wrote: > On 11/25/24 09:05, David Woodhouse wrote: > > Not sure I like this very much, but it works, and mirrors what > > arch/x86/boot/compressed/ident_map_64.c already does. > > I don't like it much, either. > > arch/x86/boot/compressed/ is already

Re: [RFC PATCH] x86/mm: Disable PTI for kernel_ident_mapping_init()

2024-11-25 Thread Dave Hansen
On 11/25/24 09:05, David Woodhouse wrote: > Not sure I like this very much, but it works, and mirrors what > arch/x86/boot/compressed/ident_map_64.c already does. I don't like it much, either. arch/x86/boot/compressed/ is already on the road to sharing no code with the core kernel and it's full o