Re: [PATCH 0/6] x86/fpu: don't abuse x86_task_fpu(PF_USER_WORKER) in .regset_get() paths
From: Oleg Nesterov
Date: Fri Aug 15 2025 - 11:54:05 EST
Dave, Sohil, what do you think?
OK, it seems that 5/6 (and thus 6/6) needs more discussion, but what
about 1-3 for the start?
These changes simply shift x86_task_fpu() and sync_fpstate() from
.regset_get() paths into the single helper, get_fpstate(). To me this
makes sense...
Oleg.
On 08/14, Oleg Nesterov wrote:
>
> Sorry, I have no idea how to test these changes, please review. Especially
> 4/6 and 5/6, I don't really understand shstk.c.
>
> If you are fine with these changes, I'll try to update the fpregs_soft_get()
> and user_regset.set() paths as well.
>
> Oleg.
> ---
>
> arch/x86/include/asm/shstk.h | 8 ++++----
> arch/x86/kernel/fpu/regset.c | 46 ++++++++++++++++++++++++++------------------
> arch/x86/kernel/fpu/xstate.c | 12 ++++++------
> arch/x86/kernel/fpu/xstate.h | 4 ++--
> arch/x86/kernel/process.c | 2 +-
> arch/x86/kernel/process_64.c | 2 +-
> arch/x86/kernel/shstk.c | 19 +++++++++++++-----
> 7 files changed, 55 insertions(+), 38 deletions(-)