rpms/kernel/F-8 linux-2.6-x86-asmlinkage_protect-sys_io_getevents.patch, NONE, 1.1 kernel.spec, 1.425, 1.426

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Fri Apr 11 21:46:42 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30309

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-x86-asmlinkage_protect-sys_io_getevents.patch 
Log Message:
* Fri Apr 11 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.4-80
- Prevent sys_io_getevents syscall from clobbering the esi register on x86.
  (F9#427707)


linux-2.6-x86-asmlinkage_protect-sys_io_getevents.patch:

--- NEW FILE linux-2.6-x86-asmlinkage_protect-sys_io_getevents.patch ---
Minimal patch for BZ 427707 which also affects F8.

>From upstream commits:

54a015104136974262afa4b8ddd943ea70dec8a2
598af051a79d05b751fe793f1fe09fcf74763e02

---
 fs/aio.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- linux-2.6.24.noarch.orig/fs/aio.c
+++ linux-2.6.24.noarch/fs/aio.c
@@ -1771,6 +1771,14 @@ asmlinkage long sys_io_getevents(aio_con
 				 struct io_event __user *events,
 				 struct timespec __user *timeout)
 {
+#define asmlinkage_protect(n, ret, args...) \
+	__asmlinkage_protect##n(ret, ##args)
+#define __asmlinkage_protect_n(ret, args...) \
+	__asm__ __volatile__ ("" : "=r" (ret) : "0" (ret), ##args)
+#define __asmlinkage_protect5(ret, arg1, arg2, arg3, arg4, arg5) \
+	__asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \
+			      "g" (arg4), "g" (arg5))
+
 	struct kioctx *ioctx = lookup_ioctx(ctx_id);
 	long ret = -EINVAL;
 
@@ -1780,6 +1788,9 @@ asmlinkage long sys_io_getevents(aio_con
 		put_ioctx(ioctx);
 	}
 
+#ifdef CONFIG_X86_32
+	asmlinkage_protect(5, ret, ctx_id, min_nr, nr, events, timeout);
+#endif
 	return ret;
 }
 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.425
retrieving revision 1.426
diff -u -r1.425 -r1.426
--- kernel.spec	9 Apr 2008 21:17:41 -0000	1.425
+++ kernel.spec	11 Apr 2008 21:45:53 -0000	1.426
@@ -589,6 +589,7 @@
 Patch75: linux-2.6-x86-debug-boot.patch
 # Patch76: linux-2.6-x86-dont-use-p6-nops.patch
 Patch77: linux-2.6-x86-clear-df-for-signals.patch
+Patch78: linux-2.6-x86-asmlinkage_protect-sys_io_getevents.patch
 
 Patch86: linux-2.6-alsa-support-sis7019.patch
 Patch87: linux-2.6-alsa-hda-stac-dmic.patch
@@ -1115,6 +1116,8 @@
 # clear DF before calling signal handlers
 # applied on top of utrace
 ApplyPatch linux-2.6-x86-clear-df-for-signals.patch
+# prevent clobber of esi on x86 by sys_io_getevents() syscall
+ApplyPatch linux-2.6-x86-asmlinkage_protect-sys_io_getevents.patch
 
 #
 # PowerPC
@@ -2016,6 +2019,10 @@
 
 
 %changelog
+* Fri Apr 11 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.4-80
+- Prevent sys_io_getevents syscall from clobbering the esi register on x86.
+  (F9#427707)
+
 * Wed Apr 09 2008 John W. Linville <linville at redhat.com> 2.6.24.4-79
 - rt61pci: rt61pci_beacon_update do not free skb twice
 - ssb-pcicore: Fix IRQ TPS flag handling




More information about the scm-commits mailing list