Patch "x86/mm: Relocate page fault error codes to traps.h" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
x86/mm: Relocate page fault error codes to traps.h
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-mm-relocate-page-fault-error-codes-to-traps.h.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
1067f030994c69ca1fba8c607437c8895dcf8509Mon Sep 17 00:00:00 2001
From: Ricardo Neri <[email protected]>
Date: Fri, 27 Oct 2017 13:25:28 -0700
Subject: x86/mm: Relocate page fault error codes to traps.h
From: Ricardo Neri <[email protected]>
commit 1067f030994c69ca1fba8c607437c8895dcf8509 upstream.
Up to this point, only fault.c used the definitions of the page fault error codes. Thus, it made sense to keep them within such file. Other portions of code might be interested in those definitions too. For instance, the User- Mode Instruction Prevention emulation code will use such definitions to emulate a page fault when it is unable to successfully copy the results of the emulated instructions to user space.
While relocating the error code enumeration, the prefix X86_ is used to make it consistent with the rest of the definitions in traps.h. Of course, code using the enumeration had to be updated as well. No functional changes were performed.
--- arch/x86/include/asm/traps.h | 18 ++++++++ arch/x86/mm/fault.c | 88 ++++++++++++++++--------------------------- 2 files changed, 52 insertions(+), 54 deletions(-)
arch/x86/include/asm/traps.h +18 -0
@@ -145,4 +145,22 @@ enum { X86_TRAP_IRET = 32, /* 32, IRET Exception */ }; +/* +* Page fault error code bits: +* +* bit 0 == 0: no page found 1: protection fault +* bit 1 == 0: read access 1: write access +* bit 2 == 0: kernel-mode access 1: user-mode access +* bit 3 == 1: use of reserved bit detected +* bit 4 == 1: fault was an instruction fetch +* bit 5 == 1: protection keys block access +*/ +enum x86_pf_error_code { +X86_PF_PROT =1 <<0 , +X86_PF_WRITE =1 <<1 , +X86_PF_USER =1 <<2 , +X86_PF_RSVD =1 <<3 , +X86_PF_INSTR =1 <<4 , +X86_PF_PK =1 <<5 , +};#endif /* _ASM_X86_TRAPS_H */
arch/x86/mm/fault.c +34 -54
249 lines not on this page · raw message
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/x86-boot-relocate-definition-of-the-initial-state-of-cr0.patch queue-4.14/ptrace-x86-make-user_64bit_mode-available-to-32-bit-builds.patch queue-4.14/x86-mm-relocate-page-fault-error-codes-to-traps.h.patch