]> git.itanic.dy.fi Git - linux-stable/commit
x86-32, vdso: On system call restart after SYSENTER, use int $0x80
authorH. Peter Anvin <hpa@linux.intel.com>
Mon, 22 Aug 2011 20:27:06 +0000 (13:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Aug 2011 21:08:07 +0000 (14:08 -0700)
commit2bbc3e27c16c993c5f4a1949879c288edec896bc
tree3a3adc662cd9b9c9010053379221cbfe632b659b
parentd64ec7bb4e2e4915e698e2b0dee3bc115f9ff273
x86-32, vdso: On system call restart after SYSENTER, use int $0x80

commit 7ca0758cdb7c241cb4e0490a8d95f0eb5b861daf upstream.

When we enter a 32-bit system call via SYSENTER or SYSCALL, we shuffle
the arguments to match the int $0x80 calling convention.  This was
probably a design mistake, but it's what it is now.  This causes
errors if the system call as to be restarted.

For SYSENTER, we have to invoke the instruction from the vdso as the
return address is hardcoded.  Accordingly, we can simply replace the
jump in the vdso with an int $0x80 instruction and use the slower
entry point for a post-restart.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/CA%2B55aFztZ=r5wa0x26KJQxvZOaQq8s2v3u50wCyJcA-Sc4g8gQ@mail.gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/vdso/vdso32/sysenter.S