Skip to content

x86/xsaves: Fix XSAVES issues

Yu-cheng Yu lkml 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest13 patches 3 repliesIn review
  2. v613 patches 10 repliesSuperseded
  3. v5 posting 2/213 patches 16 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v5 posting 1/20 of 12 patches0 repliesSuperseded
v410 patches50 repliesSuperseded
v39 patches6 repliesSuperseded
v29 patches4 repliesSuperseded
v110 patches15 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13x86/xsaves: Define and use fpu_user_xstate_sizearch/x86/include/asm/fpu/xstate.h arch/x86/include/asm/processor.h arch/x86/kernel/fpu/init.c +2 more+73 -370 replies
2/13x86/xsaves: Rename xstate_size to fpu_kernel_xstate_size to distinguish from fpu_user_xstate_sizearch/x86/include/asm/processor.h arch/x86/kernel/fpu/core.c arch/x86/kernel/fpu/init.c +2 more+21 -180 replies
3/13x86/xsaves: Keep init_fpstate.xsave.header.xfeatures as zero for init optimizationarch/x86/kernel/fpu/xstate.c+2 -40 replies
4/13x86/xsaves: Introduce a new check that allows correct xstates copy from kernel to user directlyarch/x86/include/asm/fpu/xstate.h arch/x86/kernel/fpu/signal.c arch/x86/kernel/fpu/xstate.c+4 -20 replies
5/13x86/xsaves: Align xstate components according to CPUIDarch/x86/kernel/fpu/xstate.c+32 -280 replies
6/13x86/xsaves: Supervisor state component offsetarch/x86/include/asm/fpu/types.h arch/x86/include/asm/fpu/xstate.h arch/x86/kernel/fpu/xstate.c+43 -230 replies
7/13x86/xsaves: Fix PTRACE frames for XSAVESarch/x86/include/asm/fpu/xstate.h arch/x86/kernel/fpu/regset.c arch/x86/kernel/fpu/xstate.c+212 -160 replies
8/13x86/xsaves: Fix XSTATE component offset print outarch/x86/kernel/fpu/xstate.c+16 -20 replies
9/13x86/xsaves: Fix xstate_offsets, xstate_sizes for non-extended statesarch/x86/kernel/fpu/xstate.c+9 -00 replies
10/13x86/xsaves: Fix __fpu_restore_sig() for XSAVESarch/x86/kernel/fpu/signal.c+9 -20 replies
11/13x86/xsaves: When a disabled xstate component address is requested, return NULLarch/x86/kernel/fpu/xstate.c+5 -00 replies
12/13x86/xsaves: Fix fpstate_init() for XRSTORSarch/x86/include/asm/fpu/types.h arch/x86/kernel/fpu/core.c+14 -00 replies
13/13x86/xsaves: Re-enable XSAVESarch/x86/kernel/fpu/init.c arch/x86/kernel/fpu/xstate.c+10 -150 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchDave Hansen
1/13R-b
2/13R-b
3/13R-b
4/13R-b
5/13R-b
6/13R-b
7/13R-b
8/13R-b
9/13R-b
10/13R-b
11/13R-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 00/13] x86/xsaves: Fix XSAVES issues

XSAVES is a kernel-mode instruction. It offers a compacted format and memory-write optimization. These patches fix issues in the first implementation.

Changes since Version 6:

There are no functional or code changes, only some cleanup work:

Patch 1 ~ 4: Fix Signed-off-by chain.
Patch 11, 12: Small changes in the comments.

Yu-cheng Yu (13):
x86/xsaves: Define and use fpu_user_xstate_size x86/xsaves: Rename xstate_size to fpu_kernel_xstate_size to
distinguish from fpu_user_xstate_size
x86/xsaves: Keep init_fpstate.xsave.header.xfeatures as zero for init
optimization
x86/xsaves: Introduce a new check that allows correct xstates copy
from kernel to user directly
x86/xsaves: Align xstate components according to CPUID x86/xsaves: Supervisor state component offset
x86/xsaves: Fix PTRACE frames for XSAVES
x86/xsaves: Fix XSTATE component offset print out x86/xsaves: Fix xstate_offsets, xstate_sizes for non-extended states x86/xsaves: Fix __fpu_restore_sig() for XSAVES
x86/xsaves: When a disabled xstate component address is requested,
return NULL
x86/xsaves: Fix fpstate_init() for XRSTORS
x86/xsaves: Re-enable XSAVES

 arch/x86/include/asm/fpu/types.h  |   7 +
 arch/x86/include/asm/fpu/xstate.h |  10 +-
 arch/x86/include/asm/processor.h  |   3 +-
 arch/x86/kernel/fpu/core.c        |  15 +-
 arch/x86/kernel/fpu/init.c        |  34 ++--
 arch/x86/kernel/fpu/regset.c      |  56 +++--
 arch/x86/kernel/fpu/signal.c      |  43 +++-
 arch/x86/kernel/fpu/xstate.c      | 417 ++++++++++++++++++++++++++++++--------
 8 files changed, 444 insertions(+), 141 deletions(-)
Signature · 1 line
1.9.1