diff options
author | Andy Lutomirski <[email protected]> | 2011-06-05 13:50:24 -0400 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2011-06-07 10:02:35 +0200 |
commit | 5cec93c216db77c45f7ce970d46283bcb1933884 (patch) | |
tree | 1dffa866471cd3f4ad1a342e389d3a14cb87d05f /net/lapb/lapb_timer.c | |
parent | 5dfcea629a08b4684a019cd0cb59d0c9129a6c02 (diff) |
x86-64: Emulate legacy vsyscalls
There's a fair amount of code in the vsyscall page. It contains
a syscall instruction (in the gettimeofday fallback) and who
knows what will happen if an exploit jumps into the middle of
some other code.
Reduce the risk by replacing the vsyscalls with short magic
incantations that cause the kernel to emulate the real
vsyscalls. These incantations are useless if entered in the
middle.
This causes vsyscalls to be a little more expensive than real
syscalls. Fortunately sensible programs don't use them.
The only exception is time() which is still called by glibc
through the vsyscall - but calling time() millions of times
per second is not sensible. glibc has this fixed in the
development tree.
This patch is not perfect: the vread_tsc and vread_hpet
functions are still at a fixed address. Fixing that might
involve making alternative patching work in the vDSO.
Signed-off-by: Andy Lutomirski <[email protected]>
Acked-by: Linus Torvalds <[email protected]>
Cc: Jesper Juhl <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: richard -rw- weinberger <[email protected]>
Cc: Mikael Pettersson <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Louis Rilling <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/e64e1b3c64858820d12c48fa739efbd1485e79d5.1307292171.git.luto@mit.edu
[ Removed the CONFIG option - it's simpler to just do it unconditionally. Tidied up the code as well. ]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions