X Strike Force XFree86 SVN commit: r2017 - in trunk/debian: . patches
Author: branden
Date: 2004-11-08 15:19:04 -0500 (Mon, 08 Nov 2004)
New Revision: 2017
Modified:
trunk/debian/CHANGESETS
trunk/debian/TODO
trunk/debian/changelog
trunk/debian/patches/600_amd64_support.diff
Log:
Apply some fixes to the XFree86 X server's ELF object loader:
+ Stop conditionally #including <sys/mman.h> since it is unconditionally
imported earlier in the file.
+ Perform an mprotect() for AMD64 Linux systems as well as OpenBSD to
prevent SEGVs on NX-enabled kernels. (Closes: #277699)
+ Fix a problem with parentheses when using the preprocessor (doesn't
affect Debian, but would cause unexpected behavior on OpenBSD).
Modified: trunk/debian/CHANGESETS
===================================================================
--- trunk/debian/CHANGESETS 2004-11-08 19:18:17 UTC (rev 2016)
+++ trunk/debian/CHANGESETS 2004-11-08 20:19:04 UTC (rev 2017)
@@ -244,4 +244,13 @@
Add FAQ entry: What is the story with XFree86 3.x?
2013
+Apply some fixes to the XFree86 X server's ELF object loader:
++ Stop conditionally #including <sys/mman.h> since it is unconditionally
+ imported earlier in the file.
++ Perform an mprotect() for AMD64 Linux systems as well as OpenBSD to
+ prevent SEGVs on NX-enabled kernels. (Closes: #277699)
++ Fix a problem with parentheses when using the preprocessor (doesn't
+ affect Debian, but would cause unexpected behavior on OpenBSD).
+ 2017
+
vim:set ai et sts=4 sw=4 tw=80:
Modified: trunk/debian/TODO
===================================================================
--- trunk/debian/TODO 2004-11-08 19:18:17 UTC (rev 2016)
+++ trunk/debian/TODO 2004-11-08 20:19:04 UTC (rev 2017)
@@ -52,8 +52,6 @@
launch xterm, per recommendation from Recai Oktas. If a valid locale isn't
set, bail out (would resolve #246398). (This patch would be Debian-specific
because validlocale is a Perl utility provided by base-config.)
-* #277699: apply NX kernel support to stop AMD64 kernel users from getting SEGVs
- from the XFree86 X server's ELF object loader [patch; BR]
* #279436: apply David Mosberger's PCI domain fix [patch; BR]
4.3.0.dfsg.1-10
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-11-08 19:18:17 UTC (rev 2016)
+++ trunk/debian/changelog 2004-11-08 20:19:04 UTC (rev 2017)
@@ -124,6 +124,14 @@
* Add FAQ entry: What is the story with XFree86 3.x?
+ * Apply some fixes to the XFree86 X server's ELF object loader:
+ + Stop conditionally #including <sys/mman.h> since it is unconditionally
+ imported earlier in the file.
+ + Perform an mprotect() for AMD64 Linux systems as well as OpenBSD to
+ prevent SEGVs on NX-enabled kernels. (Closes: #277699)
+ + Fix a problem with parentheses when using the preprocessor (doesn't
+ affect Debian, but would cause unexpected behavior on OpenBSD).
+
Changes by Denis Barbier and Fabio M. Di Nitto:
* Edit xc/programs/xkbcomp/symbols/pc/Imakefile so that the new pc/us_intl
@@ -206,7 +214,7 @@
exiting upon encountering the first shell interpeter that fails on the
script; instead, attempt all the interpreters and report all that fail.
- -- Branden Robinson <branden@debian.org> Mon, 8 Nov 2004 14:02:07 -0500
+ -- Branden Robinson <branden@debian.org> Mon, 8 Nov 2004 14:42:42 -0500
xfree86 (4.3.0.dfsg.1-8) unstable; urgency=high
Modified: trunk/debian/patches/600_amd64_support.diff
===================================================================
--- trunk/debian/patches/600_amd64_support.diff 2004-11-08 19:18:17 UTC (rev 2016)
+++ trunk/debian/patches/600_amd64_support.diff 2004-11-08 20:19:04 UTC (rev 2017)
@@ -12,6 +12,13 @@
Use "__x86_64__" to recognize the C library's notion of the AMD64
architecture, not "__AMD64__".
+In the XFree86 X server's ELF object loader:
+* Stop conditionally #including <sys/mman.h> since it is unconditionally
+ imported earlier in the file.
+* Perform an mprotect() for AMD64 Linux systems as well as OpenBSD to
+ prevent SEGVs on NX-enabled kernels (see Debian #277699).
+* Fix a problem with parentheses when using the preprocessor.
+
This patch by Andreas Jochens and Branden Robinson.
Not submitted to XFree86.
@@ -61,3 +68,44 @@
# 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
+@@ -32,9 +32,6 @@
+ # include <sys/fcntl.h>
+ #endif
+ #include <sys/stat.h>
+-#if defined(linux) && defined (__ia64__)
+-#include <sys/mman.h>
+-#endif
+
+ #ifdef DBMALLOC
+ # include <debug/malloc.h>
+@@ -130,7 +127,6 @@
+ #endif
+
+ #if defined (DoMMAPedMerge)
+-# include <sys/mman.h>
+ # 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: