[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force XFree86 SVN commit: r2043 - in trunk/debian: . patches



Author: branden
Date: 2004-12-02 23:24:44 -0500 (Thu, 02 Dec 2004)
New Revision: 2043

Modified:
   trunk/debian/CHANGESETS
   trunk/debian/TODO
   trunk/debian/changelog
   trunk/debian/patches/071_nonexecutable_malloced_mem.diff
   trunk/debian/patches/600_amd64_support.diff
Log:
Apply patch from Richard Mortimer to fix the XFree86 X server's ELF object
loader to set the PROT_EXEC flag on mmap()ed modules regardless of machine
architecture.  (It was already trying to do this, but there are two
preprocessor statements involved, and we were only patching one.)
(Closes: #280384)


Modified: trunk/debian/CHANGESETS
===================================================================
--- trunk/debian/CHANGESETS	2004-12-03 02:46:41 UTC (rev 2042)
+++ trunk/debian/CHANGESETS	2004-12-03 04:24:44 UTC (rev 2043)
@@ -323,4 +323,11 @@
 target work again.
     2036
 
+Apply patch from Richard Mortimer to fix the XFree86 X server's ELF object
+loader to set the PROT_EXEC flag on mmap()ed modules regardless of machine
+architecture.  (It was already trying to do this, but there are two
+preprocessor statements involved, and we were only patching one.)
+(Closes: #280384)
+    2043
+
 vim:set ai et sts=4 sw=4 tw=80:

Modified: trunk/debian/TODO
===================================================================
--- trunk/debian/TODO	2004-12-03 02:46:41 UTC (rev 2042)
+++ trunk/debian/TODO	2004-12-03 04:24:44 UTC (rev 2043)
@@ -17,11 +17,6 @@
 4.3.0.dfsg.1-9
 --------------
 
-* Apply patch from Richard Mortimer to fix the XFree86 X server's ELF object
-  loader to set the PROT_EXEC flag on mmap()ed modules regardless of machine
-  architecture.  (It was already trying to do this, but there are two
-  preprocessor statements involved, and we were only patching one.)
-  See #280384.
 * Rev XTerm to patch #197, which fixes #246398 and several other bugs.
 
 4.3.0.dfsg.1-10

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-12-03 02:46:41 UTC (rev 2042)
+++ trunk/debian/changelog	2004-12-03 04:24:44 UTC (rev 2043)
@@ -192,6 +192,12 @@
     one that works on systems that do not have a PCI bus numbered 0.  Thanks,
     David!  (Closes: #279436)
 
+  * Apply patch from Richard Mortimer to fix the XFree86 X server's ELF object
+    loader to set the PROT_EXEC flag on mmap()ed modules regardless of machine
+    architecture.  (It was already trying to do this, but there are two
+    preprocessor statements involved, and we were only patching one.)
+    (Closes: #280384)
+
   Changes by Denis Barbier and Fabio M. Di Nitto:
 
   * Edit xc/programs/xkbcomp/symbols/pc/Imakefile so that the new pc/us_intl
@@ -283,7 +289,7 @@
     Thomas Beige.  Resolves CAN-2004-0914: memory leak, improper use of signed
     integers, and overflows in the Xpm library.  Resync offset in patch #200.
 
- -- Branden Robinson <branden@debian.org>  Thu,  2 Dec 2004 21:43:03 -0500
+ -- Branden Robinson <branden@debian.org>  Thu,  2 Dec 2004 23:23:30 -0500
 
 xfree86 (4.3.0.dfsg.1-8) unstable; urgency=high
 

Modified: trunk/debian/patches/071_nonexecutable_malloced_mem.diff
===================================================================
--- trunk/debian/patches/071_nonexecutable_malloced_mem.diff	2004-12-03 02:46:41 UTC (rev 2042)
+++ trunk/debian/patches/071_nonexecutable_malloced_mem.diff	2004-12-03 04:24:44 UTC (rev 2043)
@@ -5,11 +5,13 @@
 We understand it is Linus' position that programs that assume data to be
 executable are broken, so we enable this code for all Linux platforms.
 
-Original patch (before upstream applied its own version) was by David Mosberger.
+An earlier version of this patch only corrected the first #if.  Thanks to
+Ron Murray, Admar Schoonen, Jurij Smakov, Dieter Jurzitza, and Richard
+Mortimer for their analysis which helped uncover the other two instances.
 
-diff -urN xc/programs/Xserver/hw/xfree86/loader/elfloader.c xc.new/programs/Xserver/hw/xfree86/loader/elfloader.c
---- xc/programs/Xserver/hw/xfree86/loader/elfloader.c	2004-02-07 17:33:29.000000000 -0500
-+++ xc.new/programs/Xserver/hw/xfree86/loader/elfloader.c	2004-02-07 17:29:03.000000000 -0500
+diff -u xc/programs/Xserver/hw/xfree86/loader/elfloader.c~ xc.new/programs/Xserver/hw/xfree86/loader/elfloader.c
+--- xc/programs/Xserver/hw/xfree86/loader/elfloader.c~	2004-12-02 21:54:11.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/loader/elfloader.c	2004-12-02 22:01:41.000000000 -0500
 @@ -957,7 +957,7 @@
  	    ErrorF( "ELFCreateGOT() Unable to reallocate memory!!!!\n" );
  	    return FALSE;
@@ -19,3 +21,21 @@
  	{
  	    unsigned long page_size = getpagesize();
  	    unsigned long round;
+@@ -2728,7 +2728,7 @@
+ 	elffile->lsection[j].size=SecSize(i);
+ 	elffile->lsection[j].flags=flags;
+ 	switch (SecType(i)) {
+-#ifdef __OpenBSD__
++#if defined(linux) || defined(__OpenBSD__)
+ 	case SHT_PROGBITS:
+ 	    mprotect(elffile->lsection[j].saddr, SecSize(i), 
+ 		     PROT_READ|PROT_WRITE|PROT_EXEC);
+@@ -2925,7 +2925,7 @@
+ 	ErrorF( "Unable to allocate ELF sections\n" );
+ 	return NULL;
+     }
+-#  if defined(linux) && defined(__ia64__) || defined(__OpenBSD__)
++#  if defined(linux) || defined(__OpenBSD__)
+     {
+ 	unsigned long page_size = getpagesize();
+ 	unsigned long round;

Modified: trunk/debian/patches/600_amd64_support.diff
===================================================================
--- trunk/debian/patches/600_amd64_support.diff	2004-12-03 02:46:41 UTC (rev 2042)
+++ trunk/debian/patches/600_amd64_support.diff	2004-12-03 04:24:44 UTC (rev 2043)
@@ -68,8 +68,8 @@
  # define ARCH_PCI_INIT ix86PciInit
  # define INCLUDE_XF86_MAP_PCI_MEM
  # define INCLUDE_XF86_NO_DOMAIN
---- xc/programs/Xserver/hw/xfree86/loader/elfloader.c~	2004-11-08 14:25:42.000000000 -0500
-+++ xc/programs/Xserver/hw/xfree86/loader/elfloader.c	2004-11-08 14:33:41.000000000 -0500
+--- xc/programs/Xserver/hw/xfree86/loader/elfloader.c~	2004-12-02 22:09:27.000000000 -0500
++++ xc/programs/Xserver/hw/xfree86/loader/elfloader.c	2004-12-02 22:11:58.000000000 -0500
 @@ -32,9 +32,6 @@
  # include <sys/fcntl.h>
  #endif
@@ -88,24 +88,3 @@
  # define MergeSectionAlloc
  # define MMAP_PROT	(PROT_READ | PROT_WRITE | PROT_EXEC)
  # if !defined(linux)
-@@ -2740,9 +2736,9 @@
- 	elffile->lsection[j].size=SecSize(i);
- 	elffile->lsection[j].flags=flags;
- 	switch (SecType(i)) {
--#ifdef __OpenBSD__
-+#if (defined(linux) && defined(__x86_64__)) || defined(__OpenBSD__)
- 	case SHT_PROGBITS:
--	    mprotect(elffile->lsection[j].saddr, SecSize(i), 
-+	    mprotect(elffile->lsection[j].saddr, SecSize(i),
- 		     PROT_READ|PROT_WRITE|PROT_EXEC);
- 	    break;
- #endif
-@@ -2937,7 +2933,7 @@
- 	ErrorF( "Unable to allocate ELF sections\n" );
- 	return NULL;
-     }
--#  if defined(linux) && defined(__ia64__) || defined(__OpenBSD__)
-+#  if (defined(linux) && defined(__ia64__)) || defined(__OpenBSD__)
-     {
- 	unsigned long page_size = getpagesize();
- 	unsigned long round;



Reply to: