Patch audit: recover remaining upstream patches
This integrates the remaining upstream patches which had to be merged.
Index: TODO
===================================================================
--- TODO (revision 309)
+++ TODO (working copy)
@@ -33,17 +23,6 @@
* patches to xc/programs/Xserver/hw/xfree86/drivers/{mga,rendition}/Imakefile
now in patch 908
- + The following need to be backported from upstream (upstream CVS revisions
- noted):
- xc/include/extensions/xf86mscstr.h @ 1.3
- xc/programs/Xserver/Xext/xf86misc.c @ 1.2
- xc/programs/Xserver/Xext/xf86misc.c @ 1.3
- xc/programs/Xserver/hw/xfree86/common/compiler.h @ 1.5
- xc/programs/Xserver/hw/xfree86/loader/elfloader.c @ 1.5
-
- + Grab Thomas Winischhofer's post-6.8.2 fixes to MiscPassMessage() from CVS
- (see Debian #285807).
-
* Make sure xdm upgrades work properly
xorg-x11 6.8.2-2 (unstable)
Index: patches/0000_backport_from_upstream.diff
===================================================================
--- patches/0000_backport_from_upstream.diff (revision 309)
+++ patches/0000_backport_from_upstream.diff (working copy)
@@ -42,6 +42,16 @@
Rename XFree86CustomVersion to XorgCustomVersion in the Debian
Maintainer section.
+2004-12-15 Thomas Winischhofer <thomas@winischhofer.net>
+
+ * Fix MISC extension's PassMessage(). Make it actually
+ work (MsgVal was trashed) and fix memory leaks.
+ * Increase MISC extension's minor number to 9 to indicate
+ that PassMessage() is actually usable
+
+[No changelog entry, but it's Thomas Winischhofer again: message from CVS log]
+ Another fix for MiscPassMessage(): Initialize returned "status".
+
2004-12-17 Alex Deucher <agd5f@yahoo.com>
* programs/Xserver/hw/xfree86/drivers/ati/r128.h:
@@ -107,6 +117,15 @@
intended to prevent this, but it apparently is not in effect yet
when linux.cf is parsed.)
+2005-04-04 Egbert Eich <eich-at-freedesktop-dot-org>
+
+ * programs/Xserver/hw/xfree86/common/compiler.h:
+ * programs/Xserver/hw/xfree86/loader/elfloader.c:
+ (ELFCollectSections):
+ When not using dlopen ia64 needs an extra cache
+ flush to ensure the icache is coherent when modules
+ are loaded (Alex Williamson).
+
2005-04-05 Daniel Stone <daniel@freedesktop.org>
* programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c:
@@ -1495,3 +1514,96 @@
if ((image->bits_per_pixel | image->depth) == 1) {
ibu = image->bitmap_unit;
for (y = 0; y < height; y++)
+Index: xc/include/extensions/xf86mscstr.h
+===================================================================
+--- xc/include/extensions/xf86mscstr.h (revision 309)
++++ xc/include/extensions/xf86mscstr.h (working copy)
+@@ -14,7 +14,7 @@
+ #define XF86MISCNAME "XFree86-Misc"
+
+ #define XF86MISC_MAJOR_VERSION 0 /* current version numbers */
+-#define XF86MISC_MINOR_VERSION 8
++#define XF86MISC_MINOR_VERSION 9
+
+ typedef struct _XF86MiscQueryVersion {
+ CARD8 reqType; /* always XF86MiscReqCode */
+Index: xc/programs/Xserver/hw/xfree86/common/compiler.h
+===================================================================
+--- xc/programs/Xserver/hw/xfree86/common/compiler.h (revision 309)
++++ xc/programs/Xserver/hw/xfree86/common/compiler.h (working copy)
+@@ -478,7 +478,7 @@
+ # ifndef __INTEL_COMPILER
+ # define ia64_flush_cache(Addr) \
+ __asm__ __volatile__ ( \
+- "fc %0;;;" \
++ "fc.i %0;;;" \
+ "sync.i;;;" \
+ "mf;;;" \
+ "srlz.i;;;" \
+Index: xc/programs/Xserver/hw/xfree86/loader/elfloader.c
+===================================================================
+--- xc/programs/Xserver/hw/xfree86/loader/elfloader.c (revision 309)
++++ xc/programs/Xserver/hw/xfree86/loader/elfloader.c (working copy)
+@@ -2785,6 +2785,14 @@
+ mprotect( (char *)elffile->lsection[j].saddr - round,
+ SecSize(i) + round, PROT_READ | PROT_WRITE | PROT_EXEC);
+ }
++#ifdef __ia64__
++ {
++ int k;
++ for (k = 0; k < SecSize(i); k += 32)
++ ia64_flush_cache(elffile->lsection[j].saddr+k);
++ ia64_flush_cache(elffile->lsection[j].saddr+SecSize(i)-1);
++ }
++#endif
+ break;
+ #endif
+ case SHT_SYMTAB:
+Index: xc/programs/Xserver/Xext/xf86misc.c
+===================================================================
+--- xc/programs/Xserver/Xext/xf86misc.c (revision 309)
++++ xc/programs/Xserver/Xext/xf86misc.c (working copy)
+@@ -582,20 +582,29 @@
+ strncpy(msgtype,(char*)(&stuff[1]),stuff->typelen);
+ } else return BadValue;
+ if (stuff->vallen) {
+- if (!(msgval = xalloc(stuff->vallen)))
++ if (!(msgval = xalloc(stuff->vallen))) {
++ xfree(msgtype);
+ return BadAlloc;
+- strncpy(msgval,(char*)(&stuff[1] + ((stuff->typelen + 3) & ~3)),
++ }
++ strncpy(msgval,(char*)((char*)&stuff[1] + ((stuff->typelen + 3) & ~3)),
+ stuff->vallen);
+- } else return BadValue;
++ } else {
++ xfree(msgtype);
++ return BadValue;
++ }
+
+- if ((retval= MiscExtPassMessage(stuff->screen,msgtype,msgval,&retstr)) != 0)
++ if ((retval = MiscExtPassMessage(stuff->screen,msgtype,msgval,&retstr)) != 0) {
++ xfree(msgtype);
++ xfree(msgval);
+ return retval;
++ }
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.mesglen = (retstr? strlen(retstr): 0);
+ rep.length = (SIZEOF(xXF86MiscPassMessageReply) - SIZEOF(xGenericReply) +
+ ((rep.mesglen + 3) & ~3)) >> 2;
++ rep.status = 0;
+
+ if (client->swapped) {
+ swaps(&rep.sequenceNumber, n);
+@@ -607,6 +616,9 @@
+ if (rep.mesglen)
+ WriteToClient(client, rep.mesglen, (char *)retstr);
+
++ xfree(msgtype);
++ xfree(msgval);
++
+ return (client->noClientException);
+ }
+
--
Don't say I didn't warn you.
Reply to: