summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pgtable_32.c
diff options
context:
space:
mode:
authorXin Li <xin3.li@intel.com>2023-12-05 11:50:18 +0100
committerBorislav Petkov (AMD) <bp@alien8.de>2024-01-31 22:03:04 +0100
commit5105e7687ad3dffde77f6e4393b5530e83d672dc (patch)
treebc3f17dae2474cf5e4b411b6e249e2c52ceef121 /arch/x86/mm/pgtable_32.c
parentx86/fred: Let ret_from_fork_asm() jmp to asm_fred_exit_user when FRED is enabled (diff)
downloadlinux-5105e7687ad3dffde77f6e4393b5530e83d672dc.tar.xz
linux-5105e7687ad3dffde77f6e4393b5530e83d672dc.zip
x86/fred: Fixup fault on ERETU by jumping to fred_entrypoint_user
If the stack frame contains an invalid user context (e.g. due to invalid SS, a non-canonical RIP, etc.) the ERETU instruction will trap (#SS or #GP). From a Linux point of view, this really should be considered a user space failure, so use the standard fault fixup mechanism to intercept the fault, fix up the exception frame, and redirect execution to fred_entrypoint_user. The end result is that it appears just as if the hardware had taken the exception immediately after completing the transition to user space. Suggested-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Xin Li <xin3.li@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Tested-by: Shan Kang <shan.kang@intel.com> Link: https://lore.kernel.org/r/20231205105030.8698-30-xin3.li@intel.com
Diffstat (limited to 'arch/x86/mm/pgtable_32.c')
0 files changed, 0 insertions, 0 deletions