Re: [PATCH] x86/fpu: Put non-enabled dynamic features into init state on sigreturn
From: Chang S. Bae
Date: Wed Nov 18 2026 - 15:19:16 EST
On 11/17/2026 3:26 AM, Daniel Wade wrote:
On sigreturn restore_fpregs_from_user() restores the features the signal
frame carries and inits the rest, but both masks are limited to
fpstate::user_xfeatures. If the task lost the registers earlier in the
syscall, a dynamic feature it has not enabled yet -- XTILE_DATA before
its first AMX use -- still holds the previous task state, and
How could that happen?
fpregs_mark_activate() makes the registers current's. The first AMX
instruction then raises #NM and fpstate_realloc() clears XFD without
reloading,
Reloading what? XFD traps before the instruction accessing the state, so
there should be nothing to reload.
Well, I have a hard time following the problem...
Thanks,
Chang