x86/fpu: Mop up XSAVES and related damage
Status from this message: The following commit has been merged into the x86/fpu branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest6 patches 11 repliesApplied
- v2 posting 2/214 patches 11 repliesSuperseded
- v2 posting 1/23 of 8 patches 1 replySuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 8 patches | 19 replies | Superseded |
Changes in v3 from the cover letter
- Drop the cleanup patches for now, so the bug fixes make progress
- Fix the PKRU context switch code
- Address review comments
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | x86/fpu: Prevent state corruption in __fpu__restore_sig()arch/ | +1 | 0 replies | |
| 2/6 | x86/fpu: Invalidate FPU state after a failed XRSTOR from a user bufferarch/ | +19 | 0 replies | |
| 3/6 | x86/process: Check PF_KTHREAD and not current->mm for kernel threadsarch/ | +1 | 3 replies | |
| 4/6 | x86/pkru: Make PKRU=0 actually workarch/ | +9 | 6 replies | |
| 5/6 | x86/fpu: Add address range checks to copy_user_to_xstate()arch/ | +3 | 0 replies | |
| 6/6 | selftests/x86: Test signal frame XSTATE header corruption handlingtools/ tools/ | +116 | 1 reply |
Reviews trailers per patch
1 of 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Borislav Petkov | Dave Hansen | Rik van Riel | Babu Moger |
|---|---|---|---|---|
| Series | A-b | A-b | ||
| 1/6 | R-b | |||
| 2/6 | ||||
| 3/6 | ||||
| 4/6 | T-b | |||
| 5/6 | ||||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [patch V3 0/6] x86/fpu: Mop up XSAVES and related damage
syszbot reported a warnon for XRSTOR raising #GP:
https://lore.kernel.org/r/[email protected]
with a syzcaller reproducer and a conclusive bisect result. It took a while to destill a simple C reproducer out of it which allowed to pin point the root cause: The recent addition of supervisor XSTATEs broke the signal restore path for the case where the signal handler wreckaged the XSTATE on stack because it does not sanitize the XSTATE header which causes a subsequent XRSTOR to fail and #GP.
The following series addresses the problem and fixes related issues which were found while inspecting the related changes and testing signal restore and PKRU.
V2 of this can be found here:
https://lore.kernel.org/r/[email protected]
Changes vs. V2:
- Drop the cleanup patches for now, so the bug fixes make progress
- Fix the PKRU context switch code
- Address review comments
Thanks,
tglx