Skip to content

x86/fault: #PF improvements, mostly related to USER bit

Andy Lutomirski linux-efi lkml stable 2 versions – Applied

Status from this message: The following commit has been merged into the x86/mm branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 5 repliesApplied
  2. v111 patches 20 repliesSuperseded

Changes in v2 from the cover letter

- Various changelog improvements.
- Reorder patches (SMAP moved after SMEP)
- Add the efi_recover_from_page_fault() patch
- Tidy up and improve the AMD erratum detection code

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/14x86/fault: Fix AMD erratum #91 errata fixup for user codearch/x86/mm/fault.c+17 -101 reply
2/14x86/fault: Skip the AMD erratum #91 workaround on unaffected CPUsarch/x86/mm/fault.c+13 -00 replies
3/14x86/fault: Fold mm_fault_error() into do_user_addr_fault()arch/x86/mm/fault.c+45 -520 replies
4/14x86/fault/32: Move is_f00f_bug() to do_kern_addr_fault()arch/x86/mm/fault.c+7 -50 replies
5/14x86/fault: Document the locking in the fault_signal_pending() patharch/x86/mm/fault.c+4 -10 replies
6/14x86/fault: Correct a few user vs kernel checks wrt WRUSSarch/x86/mm/fault.c+11 -40 replies
7/14x86/fault: Improve kernel-executing-user-memory handlingarch/x86/mm/fault.c+18 -30 replies
8/14x86/fault: Skip erratum #93 workaround on new CPUsarch/x86/mm/fault.c+2 -33 replies
9/14x86/fault: Split the OOPS code out from no_context()arch/x86/mm/fault.c+62 -540 replies
10/14x86/fault: Bypass no_context() for implicit kernel faults from usermodearch/x86/mm/fault.c+32 -270 replies
11/14x86/fault: Rename no_context() to kernelmode_fixup_or_oops()arch/x86/mm/fault.c+10 -180 replies
12/14x86/fault: Don't look for extable entries for SMEP violationsarch/x86/mm/fault.c+2 -20 replies
13/14x86/fault: Don't run fixups for SMAP violationsarch/x86/mm/fault.c+6 -30 replies
14/14x86/fault, x86/efi: Fix and rename efi_recover_from_page_fault()arch/x86/include/asm/efi.h arch/x86/mm/fault.c arch/x86/platform/efi/quirks.c+19 -101 reply

Reviews trailers per patch

2 of 14 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChristoph HellwigArd Biesheuvel
SeriesR-b
1/14R-b
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14A-b

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

Read the v2 thread

Cover letter [PATCH v2 00/14] x86/fault: #PF improvements, mostly related to USER bit

This series is a whole bunch of page fault cleanups, plus a couple of OOPS diagnostic improvements. The overall goals are to clean up handling of the faulting CPL, the USER bit in the error_code, and the log messages generated by #PF OOPSes.

This series can also be seen as CET preparation. CET introduces the WRUSS instruction, which is the very first way for CPL 0 code to cause a #PF fault with the USER bit set. Let's get the page fault code into shape before we start using WRUSS :)

Changes from v1:
- Various changelog improvements.
- Reorder patches (SMAP moved after SMEP)
- Add the efi_recover_from_page_fault() patch
- Tidy up and improve the AMD erratum detection code

Andy Lutomirski (14):
x86/fault: Fix AMD erratum #91 errata fixup for user code x86/fault: Skip the AMD erratum #91 workaround on unaffected CPUs x86/fault: Fold mm_fault_error() into do_user_addr_fault() x86/fault/32: Move is_f00f_bug() to do_kern_addr_fault() x86/fault: Document the locking in the fault_signal_pending() path x86/fault: Correct a few user vs kernel checks wrt WRUSS x86/fault: Improve kernel-executing-user-memory handling x86/fault: Skip erratum #93 workaround on new CPUs x86/fault: Split the OOPS code out from no_context() x86/fault: Bypass no_context() for implicit kernel faults from
usermode
x86/fault: Rename no_context() to kernelmode_fixup_or_oops() x86/fault: Don't look for extable entries for SMEP violations x86/fault: Don't run fixups for SMAP violations x86/fault, x86/efi: Fix and rename efi_recover_from_page_fault()

 arch/x86/include/asm/efi.h     |   2 +-
 arch/x86/mm/fault.c            | 380 +++++++++++++++++++--------------
 arch/x86/platform/efi/quirks.c |  16 +-
 3 files changed, 227 insertions(+), 171 deletions(-)
Signature · 1 line
2.29.2