This is a note to let you know that I've just added the patch titled

    x86-32, vdso: On system call restart after SYSENTER, use int $0x80

to the 3.0-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-32-vdso-on-system-call-restart-after-sysenter-use-int.patch
and it can be found in the queue-3.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <sta...@kernel.org> know about it.


>From 7ca0758cdb7c241cb4e0490a8d95f0eb5b861daf Mon Sep 17 00:00:00 2001
From: "H. Peter Anvin" <h...@linux.intel.com>
Date: Mon, 22 Aug 2011 13:27:06 -0700
Subject: x86-32, vdso: On system call restart after SYSENTER, use int $0x80

From: "H. Peter Anvin" <h...@linux.intel.com>

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 <torva...@linux-foundation.org>
Signed-off-by: H. Peter Anvin <h...@linux.intel.com>
Link: 
http://lkml.kernel.org/r/CA%2B55aFztZ=r5wa0x26kjqxvzoaqq8s2v3u50wcyjca-sc4g...@mail.gmail.com
Signed-off-by: Greg Kroah-Hartman <gre...@suse.de>

---
 arch/x86/vdso/vdso32/sysenter.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/vdso/vdso32/sysenter.S
+++ b/arch/x86/vdso/vdso32/sysenter.S
@@ -43,7 +43,7 @@ __kernel_vsyscall:
        .space 7,0x90
 
        /* 14: System call restart point is here! (SYSENTER_RETURN-2) */
-       jmp .Lenter_kernel
+       int $0x80
        /* 16: System call normal return point is here! */
 VDSO32_SYSENTER_RETURN:        /* Symbol used by sysenter.c via vdso32-syms.h 
*/
        pop %ebp


Patches currently in stable-queue which might be from h...@linux.intel.com are

queue-3.0/x86-32-vdso-on-system-call-restart-after-sysenter-use-int.patch
queue-3.0/x86-intel-power-correct-the-msr_ia32_energy_perf_bias.patch
queue-3.0/x86-mtrr-lock-stop-machine-during-mtrr-rendezvous-sequence.patch

_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to