x86-64: Fill unused parts of the vsyscall page with 0xcc
authorAndy Lutomirski <luto@MIT.EDU>
Sun, 5 Jun 2011 17:50:23 +0000 (13:50 -0400)
committerIngo Molnar <mingo@elte.hu>
Mon, 6 Jun 2011 07:43:14 +0000 (09:43 +0200)
commit5dfcea629a08b4684a019cd0cb59d0c9129a6c02
tree0f8c7ae0db1cc4d7bf75dc7dd5612de7c741145c
parentbb5fe2f78eadf5a52d8dcbf9a57728fd107af97b
x86-64: Fill unused parts of the vsyscall page with 0xcc

Jumping to 0x00 might do something depending on the following
bytes. Jumping to 0xcc is a trap.  So fill the unused parts of
the vsyscall page with 0xcc to make it useless for exploits to
jump there.

Signed-off-by: Andy Lutomirski <luto@mit.edu>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Jan Beulich <JBeulich@novell.com>
Cc: richard -rw- weinberger <richard.weinberger@gmail.com>
Cc: Mikael Pettersson <mikpe@it.uu.se>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Louis Rilling <Louis.Rilling@kerlabs.com>
Cc: Valdis.Kletnieks@vt.edu
Cc: pageexec@freemail.hu
Link: http://lkml.kernel.org/r/ed54bfcfbe50a9070d20ec1edbe0d149e22a4568.1307292171.git.luto@mit.edu
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/vmlinux.lds.S