16395936 x11perf exits with BadWindow error on Solaris 11 TX s11u2_31
authorNiveditha Rau <Niveditha.Rau@Oracle.COM>
Tue, 07 Jan 2014 14:29:12 -0800
changeset 1379 cb88e6b8159d
parent 1378 a5c3425791b0
child 1380 098389962640
16395936 x11perf exits with BadWindow error on Solaris 11 TX 17950657 vnc crashes if compression level is set to levels 1-4 17951414 update to the latest stable 1.14.5 xorg version 17295023 compiz doesn't work with s12_28 on intel graphics 17951734 increase MAX_CLIENT to 256 - the X part of the bug fix for 16794838 16398494 fail to get a session after enabling Xinerama on TX_SPARC Solaris 11.1
open-src/common/Makefile.init
open-src/lib/mesa/Makefile
open-src/lib/mesa/mapfile.externs
open-src/lib/mesa/mesa9-port.patch
open-src/xserver/xorg/16794101.patch
open-src/xserver/xorg/CVE-2013-4396.patch
open-src/xserver/xorg/Makefile
open-src/xserver/xorg/glx-mesa.patch
open-src/xserver/xorg/mapfile-Xorg-externs.i386
open-src/xserver/xorg/mapfile-Xorg-externs.sparc
open-src/xserver/xorg/patch-list
open-src/xserver/xorg/sun-src/tsol/tsolinfo.h
open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c
open-src/xserver/xvnc/17950657.patch
open-src/xserver/xvnc/Makefile
pkg/Makefile
--- a/open-src/common/Makefile.init	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/common/Makefile.init	Tue Jan 07 14:29:12 2014 -0800
@@ -1,7 +1,7 @@
 # -*- Makefile -*- rules commonly shared among X consolidation open source dirs
 # Makefile.init has definitions that are needed before the module/modtype rules
 #
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -392,7 +392,7 @@
 # referenced in multiple places, so it's kept here for easy sharing.
 # 
 # Current Xorg server source tarball to use sources from:
-XORGSERVER_VERS=1.14.1
+XORGSERVER_VERS=1.14.5
 # Minimum Xorg server version that we expect to be ABI compatible with.
 # Usually .99 of the previous minor release series, as that's the convention
 # for the development snapshots of the next release series.
--- a/open-src/lib/mesa/Makefile	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/lib/mesa/Makefile	Tue Jan 07 14:29:12 2014 -0800
@@ -1,6 +1,6 @@
 ###############################################################################
 #
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -117,6 +117,8 @@
 MODULE_LDFLAGS= -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
 		-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
 
+MODULE_LD_OPTIONS += -M $(PWD)/mapfile.externs
+
 # Merge in additional sources from sun-src directory
 ADDITIONAL_SOURCE_DIR=sun-src
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/mesa/mapfile.externs	Tue Jan 07 14:29:12 2014 -0800
@@ -0,0 +1,16 @@
+# Functions which are allowed to be unresolved when building libdricore
+
+{
+  global:
+	_glapi_add_dispatch     	= FUNCTION extern;
+	_glapi_get_dispatch            	= FUNCTION extern; 
+	_glapi_get_context         	= FUNCTION extern;     
+	_glapi_set_context              = FUNCTION extern; 
+	_glapi_Dispatch                 = DATA extern;
+	_glapi_set_dispatch             = FUNCTION extern;
+	_glapi_Context                  = DATA extern;
+	_glapi_get_dispatch_table_size 	= FUNCTION extern;
+	_glthread_GetID		 	= FUNCTION extern;
+	_glapi_check_multithread	= FUNCTION extern;
+};
+
--- a/open-src/lib/mesa/mesa9-port.patch	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/lib/mesa/mesa9-port.patch	Tue Jan 07 14:29:12 2014 -0800
@@ -1,132 +1,3 @@
---- src/mesa/drivers/dri/intel/intel_screen.c   Mon Mar 25 09:22:16 2013
-+++ src/mesa/drivers/dri/intel/intel_screen.c   Mon Mar 25 10:14:00 2013
-@@ -36,6 +36,7 @@
- #include "main/mfeatures.h"
- #include "main/version.h"
- #include "swrast/s_renderbuffer.h"
-+#include "../../../../../include/GL/internal/dri_interface.h"
-
- #include "utils.h"
- #include "xmlpool.h"
---- src/mesa/drivers/dri/i965/brw_context.c     Mon Mar 25 10:57:00 2013
-+++ src/mesa/drivers/dri/i965/brw_context.c     Mon Mar 25 10:58:40 2013
-@@ -395,8 +395,10 @@
-    if ((flags & __DRI_CTX_FLAG_FORWARD_COMPATIBLE) != 0)
-       ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT;
-
-+#ifdef GL_VERSION_4_3
-    if ((flags & __DRI_CTX_FLAG_DEBUG) != 0)
-       ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT;
-+#endif
-
-    return true;
- }
---- src/glx/dri2_glx.c  Thu Feb 21 06:25:41 2013
-+++ src/glx/dri2_glx.c  Mon Mar 25 13:48:18 2013
-@@ -54,6 +54,11 @@
- #define DRI_CONF_VBLANK_DEF_INTERVAL_1 2
- #define DRI_CONF_VBLANK_ALWAYS_SYNC 3
-
-+#define __DRI_CTX_RESET_NO_NOTIFICATION         0
-+#define __DRI_CTX_ATTRIB_RESET_STRATEGY         3
-+#define __DRI2_ROBUSTNESS "DRI_Robustness"
-+
-+
- #undef DRI2_MINOR
- #define DRI2_MINOR 1
-
---- src/glx/dri_common.c        Thu Feb 21 01:25:29 2013
-+++ src/glx/dri_common.c        Mon Mar 25 13:45:06 2013
-@@ -48,6 +48,11 @@
- #define RTLD_GLOBAL 0
- #endif
-
-+#define __DRI_CTX_RESET_NO_NOTIFICATION         0
-+#define __DRI_CTX_RESET_LOSE_CONTEXT            1
-+#define __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS     0x00000004
-+
-+
- /**
-  * Print informational message to stderr if LIBGL_DEBUG is set to
-  * "verbose".
---- src/glx/drisw_glx.c Thu Feb 21 01:25:29 2013
-+++ src/glx/drisw_glx.c Mon Mar 25 13:40:31 2013
-@@ -28,6 +28,9 @@
- #include <dlfcn.h>
- #include "dri_common.h"
-
-+#define __DRI_CTX_RESET_NO_NOTIFICATION         0
-+
-+
- struct drisw_display
- {
-    __GLXDRIdisplay base;
-
---- src/mesa/drivers/dri/i915/Makefile.am	Tue Jun 18 13:26:19 2013
-+++ src/mesa/drivers/dri/i915/Makefile.am	Tue Jun 18 13:26:34 2013
-@@ -53,6 +53,7 @@
- i915_dri_la_LDFLAGS = -module -avoid-version -shared
- i915_dri_la_LIBADD = \
- 	../common/libdricommon.la \
-+	../../../../mapi/shared-glapi/libglapi.la \
- 	$(DRI_LIB_DEPS) \
- 	$(INTEL_LIBS)
- 
---- src/mesa/drivers/dri/radeon/Makefile.am	Tue Jun 18 13:27:05 2013
-+++ src/mesa/drivers/dri/radeon/Makefile.am	Tue Jun 18 13:27:22 2013
-@@ -51,6 +51,7 @@
- radeon_dri_la_LDFLAGS = -module -avoid-version -shared
- radeon_dri_la_LIBADD = \
- 	../common/libdricommon.la \
-+	../../../../mapi/shared-glapi/libglapi.la \
- 	$(DRI_LIB_DEPS) \
- 	$(RADEON_LIBS)
- 
---- src/mesa/drivers/dri/swrast/Makefile.am	Tue Jun 18 13:27:34 2013
-+++ src/mesa/drivers/dri/swrast/Makefile.am	Tue Jun 18 13:27:52 2013
-@@ -48,6 +48,7 @@
- 
- swrast_dri_la_LDFLAGS = -module -avoid-version -shared
- swrast_dri_la_LIBADD = \
-+	../../../../mapi/shared-glapi/libglapi.la \ 
- 	$(DRI_LIB_DEPS)
- 
- # Provide compatibility with scripts for the old Mesa build system for
---- src/mesa/drivers/dri/r200/Makefile.am	Tue Jun 18 13:27:56 2013
-+++ src/mesa/drivers/dri/r200/Makefile.am	Tue Jun 18 13:28:03 2013
-@@ -51,6 +51,7 @@
- r200_dri_la_LDFLAGS = -module -avoid-version -shared
- r200_dri_la_LIBADD = \
- 	../common/libdricommon.la \
-+	../../../../mapi/shared-glapi/libglapi.la \
- 	$(DRI_LIB_DEPS) \
- 	$(RADEON_LIBS)
-
---- src/mesa/drivers/dri/i965/Makefile.am	Tue Jun 18 13:45:59 2013
-+++ src/mesa/drivers/dri/i965/Makefile.am	Tue Jun 18 13:39:37 2013
-@@ -54,6 +54,7 @@
- i965_dri_la_LDFLAGS = -module -avoid-version -shared
- i965_dri_la_LIBADD = \
- 	../common/libdricommon.la \
-+	../../../../mapi/shared-glapi/libglapi.la \
- 	$(DRI_LIB_DEPS) \
- 	$(INTEL_LIBS)
-
-diff -rupN Mesa-9.0.3.ori/src/mesa/libdricore/Makefile.am Mesa-9.0.3/src/mesa/libdricore/Makefile.am
---- src/mesa/libdricore/Makefile.am	2013-03-21 23:26:42.497508661 +0800
-+++ src/mesa/libdricore/Makefile.am	2013-03-22 00:23:31.688844257 +0800
-@@ -45,8 +45,9 @@ libdricore@VERSION@_la_SOURCES = \
- 	$(LIBGLSL_CXX_FILES) \
- 	$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
- 	$(top_builddir)/src/glsl/builtin_function.cpp
--libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
--libdricore@VERSION@_la_LIBADD = libdricore-asm.la
-+libdricore@VERSION@_la_LDFLAGS = ../../mapi/shared-glapi/libglapi.la -version-number 1:0
-+#libdricore@VERSION@_la_LIBADD = libdricore-asm.la
-+libdricore@VERSION@_la_LIBADD = 
- 
- # This is separated from libdricore to avoid conflics in object
- # outputs between main/clip.c and sparc/clip.c.  The documented way to
 --- configure.ac Thu Aug  1 09:21:32 2013
 +++ configure.ac Mon Aug 12 15:50:47 2013
 @@ -1064,7 +1064,7 @@
@@ -139,3 +10,15 @@
      cygwin*)
          DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
 
+--- src/mesa/libdricore/Makefile.am	Fri Dec  6 13:14:32 2013
++++ src/mesa/libdricore/Makefile.am	Fri Dec  6 13:16:01 2013
+@@ -46,7 +46,7 @@
+ 	$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
+ 	$(top_builddir)/src/glsl/builtin_function.cpp
+ libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
+-libdricore@VERSION@_la_LIBADD = libdricore-asm.la
++#libdricore@VERSION@_la_LIBADD =
+ 
+ # This is separated from libdricore to avoid conflics in object
+ # outputs between main/clip.c and sparc/clip.c.  The documented way to
+
--- a/open-src/xserver/xorg/16794101.patch	Fri Dec 20 17:02:21 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
---- a/hw/xfree86/modes/xf86Crtc.c	Tue Apr 16 23:07:39 2013
-+++ b/hw/xfree86/modes/xf86Crtc.c	Wed May 15 09:54:30 2013
-@@ -2599,7 +2599,7 @@
-     xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
-     xf86CrtcPtr crtc = config->crtc[0];
-     int c;
--    int enabled = 0;
-+    int enabled = 0, failed = 0;
- 
-     /* A driver with this hook will take care of this */
-     if (!crtc->funcs->set_mode_major) {
-@@ -2659,11 +2659,12 @@
-                 if (config->output[o]->crtc == crtc)
-                     config->output[o]->crtc = NULL;
-             crtc->enabled = FALSE;
-+            ++failed;
- 	}
-     }
- 
-     xf86DisableUnusedFunctions(scrn);
--    return enabled != 0;
-+    return enabled != 0 || failed == 0;
- }
- 
- /**
--- a/open-src/xserver/xorg/CVE-2013-4396.patch	Fri Dec 20 17:02:21 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-From 7bddc2ba16a2a15773c2ea8947059afa27727764 Mon Sep 17 00:00:00 2001
-From: Alan Coopersmith <[email protected]>
-Date: Mon, 16 Sep 2013 21:47:16 -0700
-Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()
- [CVE-2013-4396]
-
-Save a pointer to the passed in closure structure before copying it
-and overwriting the *c pointer to point to our copy instead of the
-original.  If we hit an error, once we free(c), reset c to point to
-the original structure before jumping to the cleanup code that
-references *c.
-
-Since one of the errors being checked for is whether the server was
-able to malloc(c->nChars * itemSize), the client can potentially pass
-a number of characters chosen to cause the malloc to fail and the
-error path to be taken, resulting in the read from freed memory.
-
-Since the memory is accessed almost immediately afterwards, and the
-X server is mostly single threaded, the odds of the free memory having
-invalid contents are low with most malloc implementations when not using
-memory debugging features, but some allocators will definitely overwrite
-the memory there, leading to a likely crash.
-
-Reported-by: Pedro Ribeiro <[email protected]>
-Signed-off-by: Alan Coopersmith <[email protected]>
-Reviewed-by: Julien Cristau <[email protected]>
----
- dix/dixfonts.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/dix/dixfonts.c b/dix/dixfonts.c
-index feb765d..2e34d37 100644
---- a/dix/dixfonts.c
-+++ b/dix/dixfonts.c
-@@ -1425,6 +1425,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
-             GC *pGC;
-             unsigned char *data;
-             ITclosurePtr new_closure;
-+            ITclosurePtr old_closure;
- 
-             /* We're putting the client to sleep.  We need to
-                save some state.  Similar problem to that handled
-@@ -1436,12 +1437,14 @@ doImageText(ClientPtr client, ITclosurePtr c)
-                 err = BadAlloc;
-                 goto bail;
-             }
-+            old_closure = c;
-             *new_closure = *c;
-             c = new_closure;
- 
-             data = malloc(c->nChars * itemSize);
-             if (!data) {
-                 free(c);
-+                c = old_closure;
-                 err = BadAlloc;
-                 goto bail;
-             }
-@@ -1452,6 +1455,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
-             if (!pGC) {
-                 free(c->data);
-                 free(c);
-+                c = old_closure;
-                 err = BadAlloc;
-                 goto bail;
-             }
-@@ -1464,6 +1468,7 @@ doImageText(ClientPtr client, ITclosurePtr c)
-                 FreeScratchGC(pGC);
-                 free(c->data);
-                 free(c);
-+                c = old_closure;
-                 err = BadAlloc;
-                 goto bail;
-             }
--- 
-1.7.9.2
-
--- a/open-src/xserver/xorg/Makefile	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/xserver/xorg/Makefile	Tue Jan 07 14:29:12 2014 -0800
@@ -2,7 +2,7 @@
 #
 # Xorg server Makefile
 #
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -35,9 +35,9 @@
 MODULE_VERSION=$(XORGSERVER_VERS)
 
 # Checksums for upstream tarball
-TARBALL_MD5   = 6a0f1a1639ada4b9da7e9582bc79252a
-TARBALL_SHA1  = f67a3a250216ab40f0e31648151ee1a457b70a3a
-TARBALL_SHA256= a5adb02571efb7d7459dde83286a3adb77dfd1a52a7348e75d2dc72d6f8d28aa
+TARBALL_MD5   = 89a9e2cbcf2be3bfe3da96f19100c978
+TARBALL_SHA1  = 3891522665195ac722403e34840ec94b0b5cc5bc
+TARBALL_SHA256= 8d0f06bf1416487a5170318477088826a8d737d4a201e996b2dc1ecff47461d1
 
 # Patches to apply to source after unpacking, in order
 # *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xorg/glx-mesa.patch	Tue Jan 07 14:29:12 2014 -0800
@@ -0,0 +1,37 @@
+# Remove this patch once Mesa is updated to the latest release
+--- a/glx/glxdricommon.c	Fri Dec 13 16:15:57 2013
++++ b/glx/glxdricommon.c	Fri Dec 13 16:22:22 2013
+@@ -209,6 +209,7 @@
+ 
+ static const char dri_driver_path[] = DRI_DRIVER_PATH;
+ 
++#if 0
+ /* Temporary define to allow building without a dri_interface.h from
+  * updated Mesa.  Some day when we don't care about Mesa that old any
+  * more this can be removed.
+@@ -216,6 +217,7 @@
+ #ifndef __DRI_DRIVER_GET_EXTENSIONS
+ #define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
+ #endif
++#endif
+ 
+ void *
+ glxProbeDriver(const char *driverName,
+@@ -238,6 +240,7 @@
+         goto cleanup_failure;
+     }
+ 
++#if 0
+     if (asprintf(&get_extensions_name, "%s_%s",
+                  __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) {
+         const __DRIextension **(*get_extensions)(void);
+@@ -249,7 +252,8 @@
+     }
+ 
+     if (!extensions)
+-        extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
++#endif
++    extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS);
+     if (extensions == NULL) {
+         LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n",
+                    driverName, dlerror());
--- a/open-src/xserver/xorg/mapfile-Xorg-externs.i386	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/xserver/xorg/mapfile-Xorg-externs.i386	Tue Jan 07 14:29:12 2014 -0800
@@ -129,6 +129,7 @@
 		CreateWindow                             { FLAGS = EXTERN };
 		CurrentSelections                        { FLAGS = EXTERN };
 		CursorMetricsFromGlyph                   { FLAGS = EXTERN };
+		CursorRefCount                           { FLAGS = EXTERN };
 		DDXRingBell                              { FLAGS = EXTERN };
 		DGAActive                                { FLAGS = EXTERN };
 		DGAAvailable                             { FLAGS = EXTERN };
@@ -456,6 +457,10 @@
 		IsMaster                                 { FLAGS = EXTERN };
 		IsParent                                 { FLAGS = EXTERN };
 		IsPointerDevice                          { FLAGS = EXTERN };
+		LastEventTime                            { FLAGS = EXTERN };
+		LastEventTimeToggleResetAll              { FLAGS = EXTERN };
+		LastEventTimeToggleResetFlag             { FLAGS = EXTERN };
+		LastEventTimeWasReset                    { FLAGS = EXTERN };
 		LegalNewID                               { FLAGS = EXTERN };
 		ListFonts                                { FLAGS = EXTERN };
 		ListenToAllClients                       { FLAGS = EXTERN };
@@ -510,6 +515,7 @@
 		NotClippedByChildren                     { FLAGS = EXTERN };
 		NotImplemented                           { FLAGS = EXTERN };
 		NoticeEventTime                          { FLAGS = EXTERN };
+		NoticeTime                               { FLAGS = EXTERN };
 		NotifyParentProcess                      { FLAGS = EXTERN };
 		NumMotionEvents                          { FLAGS = EXTERN };
 		Ones                                     { FLAGS = EXTERN };
@@ -685,6 +691,7 @@
 		RRDeleteProviderProperty                 { FLAGS = EXTERN };
 		RRDeliverCrtcEvent                       { FLAGS = EXTERN };
 		RRDeliverOutputEvent                     { FLAGS = EXTERN };
+		RRDeliverProviderEvent                   { FLAGS = EXTERN };
 		RRDeliverScreenEvent                     { FLAGS = EXTERN };
 		RRErrorBase                              { FLAGS = EXTERN };
 		RREventBase                              { FLAGS = EXTERN };
@@ -731,11 +738,13 @@
 		RRRegisterRate                           { FLAGS = EXTERN };
 		RRRegisterSize                           { FLAGS = EXTERN };
 		RRReplaceScanoutPixmap                   { FLAGS = EXTERN };
+		RRResourcesChanged                       { FLAGS = EXTERN };
 		RRScreenInit                             { FLAGS = EXTERN };
 		RRScreenSetSizeRange                     { FLAGS = EXTERN };
 		RRScreenSizeNotify                       { FLAGS = EXTERN };
 		RRScreenSizeSet                          { FLAGS = EXTERN };
 		RRSendConfigNotify                       { FLAGS = EXTERN };
+		RRSetChanged                             { FLAGS = EXTERN };
 		RRSetCurrentConfig                       { FLAGS = EXTERN };
 		RRTellChanged                            { FLAGS = EXTERN };
 		RRTransformCompute                       { FLAGS = EXTERN };
@@ -758,6 +767,7 @@
 		RamDacScreenPrivateIndex                 { FLAGS = EXTERN };
 		ReadRequestFromClient                    { FLAGS = EXTERN };
 		RealChildHead                            { FLAGS = EXTERN };
+		RefCursor                                { FLAGS = EXTERN };
 		ReflectStackChange                       { FLAGS = EXTERN };
 		RegionAppend                             { FLAGS = EXTERN };
 		RegionBreak                              { FLAGS = EXTERN };
@@ -1059,6 +1069,7 @@
 		UnlockServer                             { FLAGS = EXTERN };
 		UnmapSubwindows                          { FLAGS = EXTERN };
 		UnmapWindow                              { FLAGS = EXTERN };
+		UnrefCursor                              { FLAGS = EXTERN };
 		UpdateCurrentTime                        { FLAGS = EXTERN };
 		UpdateCurrentTimeIf                      { FLAGS = EXTERN };
 		UseMsg                                   { FLAGS = EXTERN };
@@ -1419,7 +1430,6 @@
 		input_option_set_value                   { FLAGS = EXTERN };
 		inw                                      { FLAGS = EXTERN };
 		isItTimeToYield                          { FLAGS = EXTERN };
-		lastDeviceEventTime                      { FLAGS = EXTERN };
 		lastResourceType                         { FLAGS = EXTERN };
 		maxBigRequestSize                        { FLAGS = EXTERN };
 		miAppendSpans                            { FLAGS = EXTERN };
@@ -2077,6 +2087,7 @@
 		xf86VGAarbiterAllowDRI                   { FLAGS = EXTERN };
 		xf86VGAarbiterDeviceDecodes              { FLAGS = EXTERN };
 		xf86VIDrvMsgVerb                         { FLAGS = EXTERN };
+		xf86VTOwner                              { FLAGS = EXTERN };
 		xf86VTSwitchAway                         { FLAGS = EXTERN };
 		xf86VTSwitchPending                      { FLAGS = EXTERN };
 		xf86VTSwitchTo                           { FLAGS = EXTERN };
--- a/open-src/xserver/xorg/mapfile-Xorg-externs.sparc	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/xserver/xorg/mapfile-Xorg-externs.sparc	Tue Jan 07 14:29:12 2014 -0800
@@ -129,6 +129,7 @@
 		CreateWindow                             { FLAGS = EXTERN };
 		CurrentSelections                        { FLAGS = EXTERN };
 		CursorMetricsFromGlyph                   { FLAGS = EXTERN };
+		CursorRefCount                           { FLAGS = EXTERN };
 		DDXRingBell                              { FLAGS = EXTERN };
 		DGAActive                                { FLAGS = EXTERN };
 		DGAAvailable                             { FLAGS = EXTERN };
@@ -456,6 +457,10 @@
 		IsMaster                                 { FLAGS = EXTERN };
 		IsParent                                 { FLAGS = EXTERN };
 		IsPointerDevice                          { FLAGS = EXTERN };
+		LastEventTime                            { FLAGS = EXTERN };
+		LastEventTimeToggleResetAll              { FLAGS = EXTERN };
+		LastEventTimeToggleResetFlag             { FLAGS = EXTERN };
+		LastEventTimeWasReset                    { FLAGS = EXTERN };
 		LegalNewID                               { FLAGS = EXTERN };
 		ListFonts                                { FLAGS = EXTERN };
 		ListenToAllClients                       { FLAGS = EXTERN };
@@ -510,6 +515,7 @@
 		NotClippedByChildren                     { FLAGS = EXTERN };
 		NotImplemented                           { FLAGS = EXTERN };
 		NoticeEventTime                          { FLAGS = EXTERN };
+		NoticeTime                               { FLAGS = EXTERN };
 		NotifyParentProcess                      { FLAGS = EXTERN };
 		NumMotionEvents                          { FLAGS = EXTERN };
 		Ones                                     { FLAGS = EXTERN };
@@ -685,6 +691,7 @@
 		RRDeleteProviderProperty                 { FLAGS = EXTERN };
 		RRDeliverCrtcEvent                       { FLAGS = EXTERN };
 		RRDeliverOutputEvent                     { FLAGS = EXTERN };
+		RRDeliverProviderEvent                   { FLAGS = EXTERN };
 		RRDeliverScreenEvent                     { FLAGS = EXTERN };
 		RRErrorBase                              { FLAGS = EXTERN };
 		RREventBase                              { FLAGS = EXTERN };
@@ -731,11 +738,13 @@
 		RRRegisterRate                           { FLAGS = EXTERN };
 		RRRegisterSize                           { FLAGS = EXTERN };
 		RRReplaceScanoutPixmap                   { FLAGS = EXTERN };
+		RRResourcesChanged                       { FLAGS = EXTERN };
 		RRScreenInit                             { FLAGS = EXTERN };
 		RRScreenSetSizeRange                     { FLAGS = EXTERN };
 		RRScreenSizeNotify                       { FLAGS = EXTERN };
 		RRScreenSizeSet                          { FLAGS = EXTERN };
 		RRSendConfigNotify                       { FLAGS = EXTERN };
+		RRSetChanged                             { FLAGS = EXTERN };
 		RRSetCurrentConfig                       { FLAGS = EXTERN };
 		RRTellChanged                            { FLAGS = EXTERN };
 		RRTransformCompute                       { FLAGS = EXTERN };
@@ -758,6 +767,7 @@
 		RamDacScreenPrivateIndex                 { FLAGS = EXTERN };
 		ReadRequestFromClient                    { FLAGS = EXTERN };
 		RealChildHead                            { FLAGS = EXTERN };
+		RefCursor                                { FLAGS = EXTERN };
 		ReflectStackChange                       { FLAGS = EXTERN };
 		RegionAppend                             { FLAGS = EXTERN };
 		RegionBreak                              { FLAGS = EXTERN };
@@ -1059,6 +1069,7 @@
 		UnlockServer                             { FLAGS = EXTERN };
 		UnmapSubwindows                          { FLAGS = EXTERN };
 		UnmapWindow                              { FLAGS = EXTERN };
+		UnrefCursor                              { FLAGS = EXTERN };
 		UpdateCurrentTime                        { FLAGS = EXTERN };
 		UpdateCurrentTimeIf                      { FLAGS = EXTERN };
 		UseMsg                                   { FLAGS = EXTERN };
@@ -1419,7 +1430,6 @@
 		input_option_set_value                   { FLAGS = EXTERN };
 		inw                                      { FLAGS = EXTERN };
 		isItTimeToYield                          { FLAGS = EXTERN };
-		lastDeviceEventTime                      { FLAGS = EXTERN };
 		lastResourceType                         { FLAGS = EXTERN };
 		maxBigRequestSize                        { FLAGS = EXTERN };
 		miAppendSpans                            { FLAGS = EXTERN };
@@ -2109,6 +2119,7 @@
 		xf86VGAarbiterAllowDRI                   { FLAGS = EXTERN };
 		xf86VGAarbiterDeviceDecodes              { FLAGS = EXTERN };
 		xf86VIDrvMsgVerb                         { FLAGS = EXTERN };
+		xf86VTOwner                              { FLAGS = EXTERN };
 		xf86VTSwitchAway                         { FLAGS = EXTERN };
 		xf86VTSwitchPending                      { FLAGS = EXTERN };
 		xf86VTSwitchTo                           { FLAGS = EXTERN };
--- a/open-src/xserver/xorg/patch-list	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/xserver/xorg/patch-list	Tue Jan 07 14:29:12 2014 -0800
@@ -1,4 +1,3 @@
-CVE-2013-4396.patch,-p1
 osaudit.patch,-p1
 sun-paths.patch,-p1
 sun-extramodes.patch,-p1
@@ -27,6 +26,6 @@
 cli-nolock.patch,-p1
 16418361.patch,-p1
 sparc-config-improv.patch,-p1
-16794101.patch,-p1
 17404398.patch,-p1
 17465391.patch,-p1
+glx-mesa.patch,-p1
--- a/open-src/xserver/xorg/sun-src/tsol/tsolinfo.h	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolinfo.h	Tue Jan 07 14:29:12 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -91,8 +91,8 @@
 #define XAUDIT_OFFSET     9102
 #define XAUDIT_EXTENSION  128
 
-#define MAX_CLIENT        16
-#define MAX_SLS           16            /* used in atom */
+#define MAX_CLIENT        256
+#define MAX_SLS           256           /* used in atom */
 #define MAX_POLYPROPS     128           /* used in property */
 #define DEF_UID           (uid_t)0      /* uid used for default objects */
 #define INVALID_UID       (uid_t)0xFFFF /* invalid uid */
@@ -291,7 +291,7 @@
 }
 
 
-#define NODE_SLSIZE	16	/* increase sl array by this amount */
+#define NODE_SLSIZE	256	/* increase sl array by this amount */
 typedef struct _TsolNodeRec {
 	unsigned int flags;
 	int slcount; 		/* no. of SLs referenced */
--- a/open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolpolicy.c	Tue Jan 07 14:29:12 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -342,6 +342,13 @@
 		break;
 	}
 
+	/* Ignore unlabeled resources */
+	if (tsolres->sl == NULL) {
+		tsolres->sl= tsolinfo->sl;
+		tsolres->uid = tsolinfo->uid;
+		tsolres->pid = tsolinfo->pid;
+	}
+
 	switch (reqtype) {
 	case X_GetImage:
 	case X_CopyArea:
@@ -372,6 +379,7 @@
 	case X_UngrabKey:
 	case X_GrabButton:
 	case X_UngrabButton:
+	case X_WarpPointer:
 		/*
 		 * Allow pointer grab on root window, as long as
 		 * pointer is currently in a window owned by
@@ -771,7 +779,8 @@
 
 	/* change/set access requires privilege */
 	modes = (DixFreezeAccess | DixGrabAccess | DixManageAccess |
-		 DixSetAttrAccess | DixSetFocusAccess | DixForceAccess);
+		 DixSetAttrAccess | DixSetFocusAccess | DixForceAccess |
+		 DixWriteAccess);
 	if (check_mode & modes) {
 		if (priv_win_devices ||
 		    client_has_privilege(tsolinfo, pset_win_devices))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/17950657.patch	Tue Jan 07 14:29:12 2014 -0800
@@ -0,0 +1,80 @@
+--- a/common/rdr/ZlibOutStream.h	Thu Dec 12 14:31:34 2013
++++ b/common/rdr/ZlibOutStream.h	Thu Dec 12 14:31:41 2013
+@@ -46,7 +46,6 @@
+   private:
+ 
+     int overrun(int itemSize, int nItems);
+-    void checkCompressionLevel();
+ 
+     OutStream* underlying;
+     int compressionLevel;
+--- a/common/rdr//ZlibOutStream.cxx	Thu Dec 12 14:28:19 2013
++++ b/common/rdr/ZlibOutStream.cxx	Thu Dec 12 14:31:28 2013
+@@ -68,6 +68,11 @@
+     level = -1;                 // Z_DEFAULT_COMPRESSION
+ 
+   newLevel = level;
++  if (newLevel != compressionLevel) {
++    if (deflateParams (zs, newLevel, Z_DEFAULT_STRATEGY) != Z_OK)
++      throw Exception("ZlibOutStream: deflateParams failed");
++    compressionLevel = newLevel;
++  }
+ }
+ 
+ int ZlibOutStream::length()
+@@ -94,11 +99,9 @@
+ 
+ //        fprintf(stderr,"zos flush: calling deflate, avail_in %d, avail_out %d\n",
+ //                zs->avail_in,zs->avail_out);
+-      checkCompressionLevel();
+-      if (zs->avail_in != 0) {
+-        int rc = deflate(zs, Z_SYNC_FLUSH);
+-        if (rc != Z_OK) throw Exception("ZlibOutStream: deflate failed");
+-      }
++      int rc = deflate(zs, Z_SYNC_FLUSH);
++      if (rc != Z_OK)
++        throw Exception("ZlibOutStream: deflate failed");
+ 
+ //        fprintf(stderr,"zos flush: after deflate: %d bytes\n",
+ //                zs->next_out-underlying->getptr());
+@@ -133,11 +136,9 @@
+ //        fprintf(stderr,"zos overrun: calling deflate, avail_in %d, avail_out %d\n",
+ //                zs->avail_in,zs->avail_out);
+ 
+-      checkCompressionLevel();
+-      if (zs->avail_in != 0) {
+-        int rc = deflate(zs, 0);
+-        if (rc != Z_OK) throw Exception("ZlibOutStream: deflate failed");
+-      }
++      int rc = deflate(zs, Z_SYNC_FLUSH);
++      if (rc != Z_OK)
++        throw Exception("ZlibOutStream: deflate failed");
+ 
+ //        fprintf(stderr,"zos overrun: after deflate: %d bytes\n",
+ //                zs->next_out-underlying->getptr());
+@@ -164,25 +165,4 @@
+     nItems = (end - ptr) / itemSize;
+ 
+   return nItems;
+-}
+-
+-void ZlibOutStream::checkCompressionLevel()
+-{
+-  if (newLevel != compressionLevel) {
+-
+-    // This is a horrible hack, but after many hours of trying, I couldn't find
+-    // a better way to make this class work properly with both Zlib 1.2.3 and
+-    // 1.2.5.  1.2.3 does a Z_PARTIAL_FLUSH in the body of deflateParams() if
+-    // the compression level has changed, and 1.2.5 does a Z_BLOCK flush.
+-
+-    if (newBehavior) {
+-      int rc = deflate(zs, Z_SYNC_FLUSH);
+-      if (rc != Z_OK) throw Exception("ZlibOutStream: deflate failed");
+-    }
+-
+-    if (deflateParams (zs, newLevel, Z_DEFAULT_STRATEGY) != Z_OK) {
+-      throw Exception("ZlibOutStream: deflateParams failed");
+-    }
+-    compressionLevel = newLevel;
+-  }
+ }
--- a/open-src/xserver/xvnc/Makefile	Fri Dec 20 17:02:21 2013 -0800
+++ b/open-src/xserver/xvnc/Makefile	Tue Jan 07 14:29:12 2014 -0800
@@ -4,7 +4,7 @@
 # Based on Fedora's tigervnc.spec revision 1.20 from
 # http://cvs.fedoraproject.org/viewvc/rpms/tigervnc/devel/tigervnc.spec
 #
-# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -78,6 +78,7 @@
 SOURCE_PATCHES += vnc-nohttpd.patch,-p1
 SOURCE_PATCHES += solaris-port.patch,-p1
 SOURCE_PATCHES += solaris-audit.patch,-p1
+SOURCE_PATCHES += 17950657.patch,-p1
 
 # Need to regenerate autoconf/automake files after patching
 AUTORECONF=yes
--- a/pkg/Makefile	Fri Dec 20 17:02:21 2013 -0800
+++ b/pkg/Makefile	Tue Jan 07 14:29:12 2014 -0800
@@ -2,7 +2,7 @@
 #
 # Makefile for X Consolidation packages
 #
-# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
@@ -505,4 +505,4 @@
 
 fix_perms: 
 	@print "## Fixing proto area permissions"
-	$(PKGDEBUG)find $(PKGROOT) -type f -exec chmod a-w \{\} \+
+	$(PKGDEBUG)find $(PKGROOT) -type f | xargs chmod a-w