public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* New vsyscall emulation breaks JITs
@ 2011-08-05 20:09 Andi Kleen
  2011-08-05 20:23 ` H. Peter Anvin
  0 siblings, 1 reply; 37+ messages in thread
From: Andi Kleen @ 2011-08-05 20:09 UTC (permalink / raw)
  To: luto, x86, linux-kernel, torvalds; +Cc: lueckintel, kimwooyoung


Andy,

We found that your new vsyscall emulation in

commit 5cec93c216db77c45f7ce970d46283bcb1933884
Author: Andy Lutomirski <luto@MIT.EDU>
Date:   Sun Jun 5 13:50:24 2011 -0400

    x86-64: Emulate legacy vsyscalls

breaks JITs that execute x86 code and use the legacy vsyscalls.

The problem is that the JIT translates the vsyscall page into
its code buffer and executes the "int 0xcc" there. Then 
when the kernel gets the interrupt it doesn't see the vsyscall
page as the source and crashes the program.

For some reason several modern executables also seem
to still use the old vsyscall page, so this problem can be hit
quickly.

This happened with pin (http://www.pintool.org/), however
I expect it will affect all user space x86 JITs (valgrind, 
dynamo, qemu-user, etc.)

What to do? Right now this broke existing setups.

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2011-08-11 13:27 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-05 20:09 New vsyscall emulation breaks JITs Andi Kleen
2011-08-05 20:23 ` H. Peter Anvin
2011-08-05 20:26   ` Andi Kleen
2011-08-05 20:36     ` H. Peter Anvin
2011-08-05 20:47       ` Andi Kleen
2011-08-05 20:45   ` Andrew Lutomirski
2011-08-05 20:48     ` H. Peter Anvin
2011-08-05 20:52       ` Andi Kleen
2011-08-05 21:00         ` Andrew Lutomirski
2011-08-05 21:21           ` Andi Kleen
2011-08-05 21:26             ` Andrew Lutomirski
2011-08-05 22:06               ` H. Peter Anvin
2011-08-05 22:11                 ` Andrew Lutomirski
2011-08-06  0:20                   ` Andrew Lutomirski
2011-08-06  0:32                     ` H. Peter Anvin
2011-08-06  3:01                       ` [RFC] x86-64: Allow emulated vsyscalls from user addresses Andy Lutomirski
2011-08-06  3:04                       ` [RFC v2] " Andy Lutomirski
2011-08-06  6:45                         ` Ingo Molnar
2011-08-07 12:19                           ` Borislav Petkov
2011-08-07 12:58                             ` Andrew Lutomirski
2011-08-07 15:44                               ` Borislav Petkov
2011-08-07 16:14                                 ` Andrew Lutomirski
2011-08-11 13:16                         ` Pavel Machek
2011-08-11 13:27                           ` Andrew Lutomirski
2011-08-09 22:27                       ` New vsyscall emulation breaks JITs Suresh Siddha
2011-08-09 13:26             ` Andrew Lutomirski
2011-08-09 15:04               ` Andi Kleen
2011-08-09 15:22                 ` Andrew Lutomirski
2011-08-09 16:47                   ` [RFC] x86-64: Add vsyscall=emulate|native|none option Andy Lutomirski
2011-08-09 19:54                     ` Linus Torvalds
2011-08-09 16:57                   ` New vsyscall emulation breaks JITs H. Peter Anvin
2011-08-09 17:05                     ` Andrew Lutomirski
     [not found]                       ` <1312919938.17118.YahooMailNeo@web120010.mail.ne1.yahoo.com>
2011-08-09 20:59                         ` H. Peter Anvin
2011-08-09 21:04                         ` Andrew Lutomirski
2011-08-09 22:36                           ` Linus Torvalds
2011-08-10  0:56                             ` H. Peter Anvin
     [not found]                             ` <1312934493.45753.YahooMailNeo@web120015.mail.ne1.yahoo.com>
2011-08-10  1:49                               ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox