]> git.baikalelectronics.ru Git - kernel.git/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)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 23 Aug 2011 23:20:10 +0000 (16:20 -0700)
commit3e91651ab76249840d7b63c1db20a20c66284561
tree08ec3c3c18fee22ac12d8436ad8f89a5db37226c
parent0f861ae745938f83c89098ed1ae2fe058361c521
x86-32, vdso: On system call restart after SYSENTER, use int $0x80

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
Cc: <stable@kernel.org>
arch/x86/vdso/vdso32/sysenter.S