x86/sgx: Fix exception fixup bug
PATCH 1/1 x86/sgx: Fix exception fixup bug
Call fixup_vdso_excpetion() in the user mode path of the #GP handler and re-add the fixup_exception() call that was incorrectly sqaushed during the rebase on to upstream/master destined for 5.6.
Fixes 4e776e8f8be6 ("x86/traps: Attempt to fixup exceptions in vDSO before signaling")
Signed-off-by Sean Christopherson <[email protected]>
--- arch/x86/kernel/traps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/kernel/traps.c +4 -1
@@ -522,13 +522,16 @@ dotraplinkage void do_general_protection(struct pt_regs *regs, long error_code) tsk->thread.error_code = error_code; tsk->thread.trap_nr =X86_TRAP_GP ; +if (fixup_vdso_exception (regs,X86_TRAP_GP , error_code,0 )) +return ; +show_signal (tsk,SIGSEGV ,"" , desc, regs, error_code);force_sig (SIGSEGV );return ; } -if (fixup_vdso_exception (regs,X86_TRAP_GP , error_code,0 )) +if (fixup_exception (regs,X86_TRAP_GP , error_code,0 ))return ; tsk->thread.error_code = error_code;
Signature · 1 line
2.24.1