Linux-Sgx Archive on
 help / color / Atom feed
* [PATCH for_v25] x86/sgx: Fix exception fixup bug
@ 2020-02-03 20:02 Sean Christopherson
  0 siblings, 0 replies; only message in thread
From: Sean Christopherson @ 2020-02-03 20:02 UTC (permalink / raw)
  To: Jarkko Sakkinen; +Cc: linux-sgx

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 <>
 arch/x86/kernel/traps.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index f2855732b9a7..a814b1aea94d 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -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);
-	if (fixup_vdso_exception(regs, X86_TRAP_GP, error_code, 0))
+	if (fixup_exception(regs, X86_TRAP_GP, error_code, 0))
 	tsk->thread.error_code = error_code;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 20:02 [PATCH for_v25] x86/sgx: Fix exception fixup bug Sean Christopherson

Linux-Sgx Archive on

Archives are clonable:
	git clone --mirror linux-sgx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sgx linux-sgx/ \
	public-inbox-index linux-sgx

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone