Re: [PATCH 5/6] x86/shstk: don't create the shadow stack for PF_USER_WORKERs
From: Mark Brown
Date: Fri Aug 15 2025 - 13:08:46 EST
On Fri, Aug 15, 2025 at 06:00:23PM +0200, Oleg Nesterov wrote:
> On 08/15, Mark Brown wrote:
> > OK, that's entirely x86 specific - there's no reason we'd want to do
> > that for arm64.
> Since I know nothing about arm64. Any reason we do want to have the unnecessary
> ARCH_SHSTK_SHSTK/shstk on arm64?
If you mean allocating the userspace shadow stack for threads that never
go to userspace then no, it's not needed.
> And... do you agree that shstk_alloc_thread_stack() without update_fpu_shstk()
> in copy_thread() path doesn't look right? Even if nothing really bad can happen.
Honestly the update_fpu_ stuff is sufficently x86 specific that it
doesn't really register as something I'd expect to see in that path.
Attachment:
signature.asc
Description: PGP signature