Commit 2b666859 authored by Adrian Bunk's avatar Adrian Bunk Committed by Ingo Molnar

x86: Default to vsyscall=native for now

This UML breakage:

  linux-2.6.30.1[3800] vsyscall fault (exploit attempt?) ip:ffffffffff600000 cs:33 sp:7fbfb9c498 ax:ffffffffff600000 si:0 di:606790
  linux-2.6.30.1[3856] vsyscall fault (exploit attempt?) ip:ffffffffff600000 cs:33 sp:7fbfb13168 ax:ffffffffff600000 si:0 di:606790

Is caused by commit 3ae36655 ("x86-64: Rework vsyscall emulation and add
vsyscall= parameter") - the vsyscall emulation code is not fully cooked
yet as UML relies on some rather fragile SIGSEGV semantics.

Linus suggested in https://lkml.org/lkml/2011/8/9/376 to default
to vsyscall=native for now, this patch implements that.
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Acked-by: default avatarAndrew Lutomirski <luto@mit.edu>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/20111005214047.GE14406@localhost.pp.htv.fiSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 65112dcc
...@@ -2706,10 +2706,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ...@@ -2706,10 +2706,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
functions are at fixed addresses, they make nice functions are at fixed addresses, they make nice
targets for exploits that can control RIP. targets for exploits that can control RIP.
emulate [default] Vsyscalls turn into traps and are emulate Vsyscalls turn into traps and are emulated
emulated reasonably safely. reasonably safely.
native Vsyscalls are native syscall instructions. native [default] Vsyscalls are native syscall
instructions.
This is a little bit faster than trapping This is a little bit faster than trapping
and makes a few dynamic recompilers work and makes a few dynamic recompilers work
better than they would in emulation mode. better than they would in emulation mode.
......
...@@ -56,7 +56,7 @@ DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data) = ...@@ -56,7 +56,7 @@ DEFINE_VVAR(struct vsyscall_gtod_data, vsyscall_gtod_data) =
.lock = __SEQLOCK_UNLOCKED(__vsyscall_gtod_data.lock), .lock = __SEQLOCK_UNLOCKED(__vsyscall_gtod_data.lock),
}; };
static enum { EMULATE, NATIVE, NONE } vsyscall_mode = EMULATE; static enum { EMULATE, NATIVE, NONE } vsyscall_mode = NATIVE;
static int __init vsyscall_setup(char *str) static int __init vsyscall_setup(char *str)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment