From 75154f402ef18e459ff97ddece25656b6c2b329c Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sat, 23 Jun 2007 02:29:25 +0200 Subject: x86_64: Ignore compat mode SYSCALL when IA32_EMULATION is not defined Previously a program could switch to a compat mode segment and then execute SYSCALL and it would jump to an uninitialized MSR and crash the kernel. Instead supply a dummy target for this case. Pointed out by Jan Beulich Cc: jbeulich@novell.com Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- arch/x86_64/kernel/entry.S | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/x86_64/kernel/entry.S') diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index fa984b5..a67f87b 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S @@ -1163,3 +1163,10 @@ ENTRY(call_softirq) ret CFI_ENDPROC ENDPROC(call_softirq) + +KPROBE_ENTRY(ignore_sysret) + CFI_STARTPROC + mov $-ENOSYS,%eax + sysret + CFI_ENDPROC +ENDPROC(ignore_sysret) -- cgit v1.1