]> git.ipfire.org Git - thirdparty/linux.git/commit
x86/fpu: Refactor xfeature bitmask update code for sigframe XSAVE
authorChang S. Bae <chang.seok.bae@intel.com>
Wed, 16 Apr 2025 02:16:57 +0000 (19:16 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 16 Apr 2025 08:01:00 +0000 (10:01 +0200)
commit64e54461ab6e8524a8de4e63b7d1a3e4481b5cf3
tree3a7de04e83d0134b978446043e6f2a800d768b84
parent39cd7fad39ce2ffbeb21939c805ee55f3ec808d4
x86/fpu: Refactor xfeature bitmask update code for sigframe XSAVE

Currently, saving register states in the signal frame, the legacy feature
bits are always set in xregs_state->header->xfeatures. This code sequence
can be generalized for reuse in similar cases.

Refactor the logic to ensure a consistent approach across similar usages.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250416021720.12305-8-chang.seok.bae@intel.com
arch/x86/kernel/fpu/signal.c
arch/x86/kernel/fpu/xstate.h