summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/entry.S
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-06-23 02:29:25 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-22 18:41:19 -0700
commit75154f402ef18e459ff97ddece25656b6c2b329c (patch)
tree6757b77ee2c712c4b64f334ff8c5b1a41a64083b /arch/x86_64/kernel/entry.S
parente2f1f19272f8de0374ad297b9806f8b6509e0013 (diff)
downloadlinux-75154f402ef18e459ff97ddece25656b6c2b329c.tar.gz
linux-75154f402ef18e459ff97ddece25656b6c2b329c.tar.bz2
linux-75154f402ef18e459ff97ddece25656b6c2b329c.zip
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 <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/kernel/entry.S')
-rw-r--r--arch/x86_64/kernel/entry.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index fa984b53e7e6..a67f87bf4015 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)