Remove graphics/MesaLib7, x11/modular-xorg-server112
Also remove legacy drivers only building against mxs112: * x11/xf86-video-newport * x11/xf86-video-modesetting (integrated into later X versions) According to tnn, these are no longer useful. * Originally kept for drm1 users (NetBSD 6). * The one use case that actually worked was xf86-video-ati6. * That driver has been patched to work with the new server ABI.
This commit is contained in:
parent
a5f04b0790
commit
fb506e5570
128 changed files with 3 additions and 6073 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.841 2019/08/21 16:30:28 nia Exp $
|
||||
# $NetBSD: Makefile,v 1.842 2019/08/21 17:40:41 nia Exp $
|
||||
#
|
||||
|
||||
COMMENT= Graphics tools and libraries
|
||||
|
@ -16,7 +16,6 @@ SUBDIR+= ImageViewer
|
|||
SUBDIR+= Mesa
|
||||
SUBDIR+= MesaDemos
|
||||
SUBDIR+= MesaLib
|
||||
SUBDIR+= MesaLib7
|
||||
SUBDIR+= Ngraph
|
||||
SUBDIR+= OpenRM
|
||||
SUBDIR+= PanoTools
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
The Mesa project began as an open-source implementation of the OpenGL
|
||||
specification - a system for rendering interactive 3D graphics.
|
||||
|
||||
Over the years the project has grown to implement more graphics APIs,
|
||||
including OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API,
|
||||
XvMC and Vulkan.
|
||||
|
||||
A variety of device drivers allows the Mesa libraries to be used in many
|
||||
different environments ranging from software emulation to complete hardware
|
||||
acceleration for modern GPUs.
|
||||
|
||||
This old version of Mesa exists for legacy systems that may not be able
|
||||
to build or run graphics/MesaLib.
|
|
@ -1,132 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.17 2019/08/21 13:44:29 nia Exp $
|
||||
|
||||
DISTNAME?= ${MESA_DISTNAME}
|
||||
PKGNAME= MesaLib7-${MESA_PKGVERSION}
|
||||
PKGREVISION= 4
|
||||
CATEGORIES= graphics
|
||||
MASTER_SITES= ${MESA_SITES}
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= https://www.mesa3d.org/
|
||||
COMMENT= Open source OpenGL implementation (legacy version)
|
||||
|
||||
GNU_CONFIGURE_PREFIX= ${LOCALBASE}/MesaLib7
|
||||
|
||||
DISTFILES+= MesaLib-${MESA_VERSION}${EXTRACT_SUFX}
|
||||
MESA_DISTNAME= MesaLib-${MESA_VERSION}
|
||||
MESA_SITES= ftp://freedesktop.org/pub/mesa/older-versions/7.x/${MESA_VERSION}/
|
||||
MESA_VERSION= 7.11.2
|
||||
MESA_PKGVERSION= ${MESA_VERSION}
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_LANGUAGES= c99 c++
|
||||
USE_TOOLS+= automake bison flex gmake pkg-config makedepend
|
||||
WRKSRC= ${WRKDIR}/Mesa-${MESA_VERSION}
|
||||
DIST_SUBDIR= Mesa-${MESA_PKGVERSION}
|
||||
|
||||
CONFLICTS+= xf86driproto<2.0.4
|
||||
|
||||
PLIST_VARS= dri nodri
|
||||
|
||||
BUILDLINK_PASSTHRU_RPATHDIRS+= ${PREFIX}/MesaLib7/lib
|
||||
|
||||
PKGCONFIG_OVERRIDE+= src/mesa/drivers/dri/dri.pc.in
|
||||
PKGCONFIG_OVERRIDE+= src/mesa/gl.pc.in
|
||||
PKGCONFIG_OVERRIDE+= src/mesa/osmesa.pc.in
|
||||
PKGCONFIG_OVERRIDE+= src/glw/glw.pc.in
|
||||
|
||||
CONFIGURE_ARGS+= --disable-glu
|
||||
CONFIGURE_ARGS+= --disable-glut
|
||||
CONFIGURE_ARGS+= --disable-motif
|
||||
CONFIGURE_ARGS+= --with-gallium-drivers=""
|
||||
CONFIGURE_ARGS+= --disable-gallium-llvm
|
||||
CONFIGURE_ARGS+= --disable-egl
|
||||
|
||||
.include "glx-config.mk"
|
||||
|
||||
PYTHON_FOR_BUILD_ONLY= tool
|
||||
PYTHON_VERSIONS_INCOMPATIBLE= 36 37 # not yet ported as of 7.11.2
|
||||
|
||||
MAKE_ENV+= MAKE=${GMAKE:Q}
|
||||
|
||||
.include "../../mk/compiler.mk"
|
||||
|
||||
.if !empty(PKGSRC_COMPILER:Mccc)
|
||||
CFLAGS+= -D__FUNCTION__=__FILE__
|
||||
.endif
|
||||
|
||||
.if !empty(PKGSRC_COMPILER:Mclang)
|
||||
CFLAGS+= -no-integrated-as -fvisibility=hidden
|
||||
.endif
|
||||
|
||||
BUILDLINK_TRANSFORM.MirBSD+= rm:-fvisibility=hidden
|
||||
|
||||
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
|
||||
# XXX This is not quite enough: we will need to patch the makefile
|
||||
# because it bogusly tries to reuse objects for native tools and target
|
||||
# libraries, and for cross-compiling the objects need to be built
|
||||
# separately. Alternatively, we could just update Mesa to something
|
||||
# less prehistoric...
|
||||
SUBST_CLASSES+= nativecc
|
||||
SUBST_STAGE.nativecc= pre-configure
|
||||
SUBST_MESSAGE.nativecc= Fix makefiles to compile tools with native cc.
|
||||
SUBST_FILES.nativecc+= src/glsl/Makefile
|
||||
SUBST_SED.nativecc+= -e 's,$$(CC),$$(APP_CC),g'
|
||||
SUBST_SED.nativecc+= -e 's,$$(CXX),$$(APP_CXX),g'
|
||||
MAKE_FLAGS+= APP_CC=${NATIVE_CC:Q}
|
||||
MAKE_FLAGS+= APP_CXX=${NATIVE_CXX:Q}
|
||||
.endif
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
.if !empty(MACHINE_PLATFORM:MNetBSD-*)
|
||||
##
|
||||
## NetBSD 3.x and later have pthread stubs in libc
|
||||
##
|
||||
PTHREAD_STUBLIB=
|
||||
.else
|
||||
##
|
||||
## Other platforms may or may not have stubs provided by libc, but pulling in
|
||||
## threading support via the pthread.buildlink3.mk definitions will provide
|
||||
## all the necessary interfaces. This matches the standard configuration for
|
||||
## most platforms as they appear in "${WRKSRC}/configs", and is necessary
|
||||
## for successful linking with libGL under many platforms.
|
||||
##
|
||||
.include "../../mk/pthread.buildlink3.mk"
|
||||
PTHREAD_STUBLIB= ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
|
||||
.endif
|
||||
PKGSRC_MAKE_ENV+= PTHREAD_STUBLIB=${PTHREAD_STUBLIB:Q}
|
||||
MAKE_ENV+= PTHREAD_STUBLIB=${PTHREAD_STUBLIB:Q}
|
||||
|
||||
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
|
||||
MAKE_ENV+= CROSS_COMPILING=yes
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
cd ${WRKSRC} && ${MAKE} configure
|
||||
|
||||
post-extract:
|
||||
.if !empty(PKG_OPTIONS:Mdri) && (${OPSYS} == "SunOS")
|
||||
${CP} ${FILESDIR}/mapfile.externs ${WRKSRC}/src/mesa/drivers/dri/
|
||||
.endif
|
||||
${CP} ${FILESDIR}/gen_matypes.awk ${WRKSRC}/src/mesa/x86
|
||||
${CP} ${FILESDIR}/gen_matypes.sh ${WRKSRC}/src/mesa/x86
|
||||
${CHMOD} a+x ${WRKSRC}/src/mesa/x86/gen_matypes.sh
|
||||
|
||||
#
|
||||
# remove include files installed respectively by ../glu and ../glut
|
||||
#
|
||||
pre-install:
|
||||
${RM} -f ${WRKSRC}/include/GL/glu*.h
|
||||
|
||||
.include "../../lang/python/tool.mk"
|
||||
BUILDLINK_DEPMETHOD.libxml2?= build
|
||||
.include "../../textproc/libxml2/buildlink3.mk"
|
||||
.include "../../x11/xorgproto/buildlink3.mk"
|
||||
.include "../../x11/libX11/buildlink3.mk"
|
||||
.include "../../x11/libXi/buildlink3.mk"
|
||||
.include "../../x11/libXmu/buildlink3.mk"
|
||||
.include "../../x11/libXext/buildlink3.mk"
|
||||
.include "../../x11/libXt/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -1,46 +0,0 @@
|
|||
@comment $NetBSD: PLIST,v 1.3 2018/01/01 22:29:36 rillig Exp $
|
||||
MesaLib7/include/GL/GLwDrawA.h
|
||||
MesaLib7/include/GL/GLwDrawAP.h
|
||||
MesaLib7/include/GL/GLwMDrawA.h
|
||||
MesaLib7/include/GL/GLwMDrawAP.h
|
||||
MesaLib7/include/GL/gl.h
|
||||
MesaLib7/include/GL/gl_mangle.h
|
||||
MesaLib7/include/GL/glext.h
|
||||
MesaLib7/include/GL/glfbdev.h
|
||||
MesaLib7/include/GL/glx.h
|
||||
MesaLib7/include/GL/glx_mangle.h
|
||||
MesaLib7/include/GL/glxext.h
|
||||
${PLIST.dri}MesaLib7/include/GL/internal/dri_interface.h
|
||||
MesaLib7/include/GL/mesa_wgl.h
|
||||
MesaLib7/include/GL/osmesa.h
|
||||
MesaLib7/include/GL/vms_x_fix.h
|
||||
MesaLib7/include/GL/wglext.h
|
||||
MesaLib7/include/GL/wmesa.h
|
||||
${PLIST.dri}MesaLib7/lib/dri/i810_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/i915_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/i965_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/mach64_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/mga_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/r128_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/r200_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/r300_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/r600_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/radeon_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/savage_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/sis_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/swrast_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/tdfx_dri.so
|
||||
${PLIST.dri}MesaLib7/lib/dri/unichrome_dri.so
|
||||
MesaLib7/lib/libGL.so
|
||||
MesaLib7/lib/libGL.so.1
|
||||
MesaLib7/lib/libGL.so.1.2
|
||||
MesaLib7/lib/libGLw.so
|
||||
MesaLib7/lib/libGLw.so.1
|
||||
MesaLib7/lib/libGLw.so.1.0.0
|
||||
${PLIST.nodri}MesaLib7/lib/libOSMesa.so
|
||||
${PLIST.nodri}MesaLib7/lib/libOSMesa.so.7
|
||||
${PLIST.nodri}MesaLib7/lib/libOSMesa.so.7.11.0
|
||||
${PLIST.dri}MesaLib7/lib/pkgconfig/dri.pc
|
||||
MesaLib7/lib/pkgconfig/gl.pc
|
||||
MesaLib7/lib/pkgconfig/glw.pc
|
||||
${PLIST.nodri}MesaLib7/lib/pkgconfig/osmesa.pc
|
|
@ -1,34 +0,0 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.4 2018/09/01 20:46:07 bsiegert Exp $
|
||||
|
||||
BUILDLINK_TREE+= MesaLib7
|
||||
|
||||
.if !defined(MESALIB7_BUILDLINK3_MK)
|
||||
MESALIB7_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.MesaLib7+= MesaLib7>=7.11.2
|
||||
BUILDLINK_PKGSRCDIR.MesaLib7?= ../../graphics/MesaLib7
|
||||
BUILDLINK_FNAME_TRANSFORM.MesaLib7+= -e 's|MesaLib7/||'
|
||||
BUILDLINK_RPATHDIRS+= MesaLib7/lib
|
||||
|
||||
.include "../../mk/bsd.fast.prefs.mk"
|
||||
|
||||
# See <http://developer.apple.com/qa/qa2007/qa1567.html>.
|
||||
.if !empty(MACHINE_PLATFORM:MDarwin-[9].*-*)
|
||||
BUILDLINK_LDFLAGS.MesaLib7+= -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
|
||||
.endif
|
||||
|
||||
pkgbase:= MesaLib7
|
||||
.include "../../mk/pkg-build-options.mk"
|
||||
|
||||
.if ${X11_TYPE} == "native" && ${OPSYS} != "Cygwin" && exists(${X11BASE}/lib/pkgconfig/dri.pc)
|
||||
PKG_BUILD_OPTIONS.MesaLib7+= dri
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_BUILD_OPTIONS.MesaLib7:Mdri)
|
||||
. include "../../graphics/MesaLib/dri.mk"
|
||||
.endif
|
||||
|
||||
.include "../../x11/libXext/buildlink3.mk"
|
||||
.endif # MESALIB7_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -MesaLib7
|
|
@ -1,35 +0,0 @@
|
|||
$NetBSD: distinfo,v 1.4 2018/01/26 09:41:53 jperkin Exp $
|
||||
|
||||
SHA1 (Mesa-7.11.2/MesaLib-7.11.2.tar.bz2) = 5981ac2de8438e5f4a1f3561f2044d700c5f0de9
|
||||
RMD160 (Mesa-7.11.2/MesaLib-7.11.2.tar.bz2) = 656ded1db6c1f6fdd15a3f2cdee1b895d393bcea
|
||||
SHA512 (Mesa-7.11.2/MesaLib-7.11.2.tar.bz2) = f9f93aeb5ba3e4f0cdd7041a7bba6cd18dd8f58446b796849f43c6037297011df826017c32e03f03c8527d4afd3b9096e9ae3cbfb3c86b4ad145c66867198c21
|
||||
Size (Mesa-7.11.2/MesaLib-7.11.2.tar.bz2) = 6257280 bytes
|
||||
SHA1 (patch-af) = da0bd412b81d4b826b6d9b4bb8d98ca1fe0006ba
|
||||
SHA1 (patch-bin_mklib) = a51c6e3082ea127fd89c5e9d7ee614bf36259132
|
||||
SHA1 (patch-configure.ac) = a35dabc387d78282b3eadf3be98380cb84b796d7
|
||||
SHA1 (patch-include_GL_gl.h) = a97ab309556c78d818d0b8bd867b5f2412c141b0
|
||||
SHA1 (patch-src_gallium_auxiliary_util_u__atomic.h) = 68ba9694aca506add2aa96a6892a7227481c2c11
|
||||
SHA1 (patch-src_gallium_include_pipe_p__config.h) = 34f4c2a033dd7a494dd3f51db407002a3388f84e
|
||||
SHA1 (patch-src_glsl_ir__constant__expression.cpp) = 281e281f51afed244b1a29b92942d572fc095124
|
||||
SHA1 (patch-src_glsl_ralloc.c) = 40885fac898058f8e83852a79ca50a74b61121ab
|
||||
SHA1 (patch-src_glu_sgi_glu.exports) = 66609d2ea59b02fc46b41311b0042fe4a2da517f
|
||||
SHA1 (patch-src_glu_sgi_libtess_sweep.c) = 6ee6d67b2178d23e1b7848d64eede6349f46ee96
|
||||
SHA1 (patch-src_glx_XF86dri.c) = b69b7cf5e0d617eca129f0d7f0b06c7603d00db0
|
||||
SHA1 (patch-src_mesa_drivers_dri_common_dri__util.h) = 53e63dcc6243b1872f4e4816b46e92910cf97edc
|
||||
SHA1 (patch-src_mesa_drivers_dri_common_mmio.h) = b6da48111fb2792b1c71eb7549d0f03adceec9f1
|
||||
SHA1 (patch-src_mesa_drivers_dri_i915_intel__batchbuffer.c) = fec8b1a9f6888e9a4225861ea5bda776ecc5f054
|
||||
SHA1 (patch-src_mesa_drivers_dri_i915_intel__tris.c) = 74a2ca9f9c865db9b6212087e442f65bb0621227
|
||||
SHA1 (patch-src_mesa_drivers_dri_i965_brw__draw.c) = ce12dc2d2391300d32776a06f5d0096448019c6b
|
||||
SHA1 (patch-src_mesa_drivers_dri_i965_brw__draw__upload.c) = 44162ca546072669b85093981728e635dda69e55
|
||||
SHA1 (patch-src_mesa_drivers_dri_i965_brw__misc__state.c) = d37f967dea0fc3bd32566d6a26fd434ca9564081
|
||||
SHA1 (patch-src_mesa_drivers_dri_i965_gen6__vs__state.c) = c918b5a91b339e49850d718c957d7e717c2dc130
|
||||
SHA1 (patch-src_mesa_drivers_dri_i965_gen6__wm__state.c) = a8ecf943525888b22ec99fe454b08f43c5d8a911
|
||||
SHA1 (patch-src_mesa_drivers_dri_i965_intel__batchbuffer.c) = 653c87e1123ce9a27b71221fff4119df34abe15f
|
||||
SHA1 (patch-src_mesa_drivers_dri_intel_intel__context.c) = 21d3c08a27817a6358b88101f889120869eebcce
|
||||
SHA1 (patch-src_mesa_drivers_dri_intel_intel__context.h) = 6d394e704636134768a6cb5a200ebcc7bc3f52ed
|
||||
SHA1 (patch-src_mesa_drivers_dri_mach64_mach64__context.h) = fe95c6610de4c1482c568463aca82f53ed0df900
|
||||
SHA1 (patch-src_mesa_drivers_x11_Makefile) = 17b72d2b74d89fbd8db05491cfcf253bb856b139
|
||||
SHA1 (patch-src_mesa_main_compiler.h) = b164781b541cb83b64597facbb7a7e21d8bdb686
|
||||
SHA1 (patch-src_mesa_main_context.c) = 6b6f1e3ad4ea189291fcf221d4b8bfbd650f8908
|
||||
SHA1 (patch-src_mesa_main_imports.c) = d0c50004c749e4c5c136ac2ed50a6989ca90065f
|
||||
SHA1 (patch-src_mesa_main_imports.h) = f5a96195b3a14294ca3389c9fe17a6076c46db8a
|
|
@ -1,31 +0,0 @@
|
|||
# $NetBSD: gen_matypes.awk,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
BEGIN {
|
||||
while (getline) {
|
||||
if (/int main/) break;
|
||||
}
|
||||
}
|
||||
|
||||
/printf/ {
|
||||
printf("printf %s\n", substr($0, 12, length($0) - 14))
|
||||
}
|
||||
/OFFSET\(/ {
|
||||
split(substr($0,12, length($0) - 14), offsets, ",");
|
||||
printf("offset %s \"%s\" \"%s\"\n", offsets[1], offsets[2], offsets[3]);
|
||||
}
|
||||
/OFFSET_HEADER/ {
|
||||
printf("offset_header %s\n", substr($0,19, length($0) - 21))
|
||||
}
|
||||
|
||||
/DEFINE\(/ {
|
||||
split(substr($0,12, length($0) - 14), offsets, ",");
|
||||
printf("define %s \"%s\"\n", offsets[1], offsets[2]);
|
||||
}
|
||||
/DEFINE_HEADER/ {
|
||||
printf("define_header %s\n", substr($0,19, length($0) - 21))
|
||||
}
|
||||
|
||||
/SIZEOF\(/ {
|
||||
split(substr($0,12, length($0) - 14), offsets, ",");
|
||||
printf("sizeof %s \"%s\"\n", offsets[1], offsets[2]);
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: gen_matypes.sh,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
test_condition() {
|
||||
cat > gen_matypes_cross.c << EOF
|
||||
#include "main/glheader.h"
|
||||
#include "main/mtypes.h"
|
||||
#include "tnl/t_context.h"
|
||||
|
||||
#undef offsetof
|
||||
#define offsetof( type, member ) ((size_t) &((type *)0)->member)
|
||||
|
||||
int test_variable[($1) ? 1 : -1];
|
||||
EOF
|
||||
${CC} -c -o /dev/null ${CFLAGS} gen_matypes_cross.c > /dev/null 2>&1
|
||||
}
|
||||
|
||||
compute_powers(){
|
||||
local cur
|
||||
local i
|
||||
cur=1
|
||||
i=1
|
||||
while [ ${i} -le 16 ]; do
|
||||
power_of_two="${cur} ${power_of_two}"
|
||||
cur=`expr ${cur} + ${cur}`
|
||||
i=`expr ${i} + 1`
|
||||
done
|
||||
}
|
||||
|
||||
compute_powers
|
||||
|
||||
offset() {
|
||||
local got_mismatch
|
||||
local bits
|
||||
local o
|
||||
o=0
|
||||
got_mismatch=0
|
||||
for bits in ${power_of_two}; do
|
||||
if test_condition "offsetof($2, $3) >= $o + $bits"; then
|
||||
o=`expr $o + $bits`
|
||||
else
|
||||
got_mismatch=1
|
||||
fi
|
||||
done
|
||||
[ "$got_mismatch" = 0 ] && exit 1
|
||||
printf "#define %s\t%d\n" "$1" $o
|
||||
}
|
||||
|
||||
offset_header() {
|
||||
printf "\n"
|
||||
printf "\n"
|
||||
printf "/* =============================================================\n"
|
||||
printf " * Offsets for %s\n" "$1"
|
||||
printf " */\n"
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
define_header() {
|
||||
printf "\n"
|
||||
printf "/*\n"
|
||||
printf " * Flags for %s\n" "$1"
|
||||
printf " */\n"
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
define() {
|
||||
local bits
|
||||
local v
|
||||
v=0
|
||||
for bits in ${power_of_two}; do
|
||||
if test_condition "$2 >= $v + $bits"; then
|
||||
v=`expr $v + $bits`
|
||||
fi
|
||||
done
|
||||
printf "#define %s\t0x%x\n" "$1" $v
|
||||
}
|
||||
|
||||
sizeof() {
|
||||
local got_mismatch
|
||||
local bits
|
||||
local v
|
||||
v=0
|
||||
got_mismatch=0
|
||||
for bits in ${power_of_two}; do
|
||||
if test_condition "sizeof($2) >= $v + $bits"; then
|
||||
v=`expr $v + $bits`
|
||||
else
|
||||
got_mismatch=1
|
||||
fi
|
||||
done
|
||||
[ "$got_mismatch" = 0 ] && exit 1
|
||||
printf "#define %s\t0x%x\n" "$1" $v
|
||||
}
|
||||
|
||||
awk -f gen_matypes.awk < gen_matypes.c > gen_matypes_tmp.sh
|
||||
. ./gen_matypes_tmp.sh
|
||||
rm gen_matypes_tmp.sh
|
|
@ -1,27 +0,0 @@
|
|||
# Functions which are allowed to be unresolved when building dri modules
|
||||
|
||||
{
|
||||
global:
|
||||
_glapi_Context = DATA extern;
|
||||
_glapi_Dispatch = DATA extern;
|
||||
_glapi_add_dispatch = FUNCTION extern;
|
||||
_glapi_get_dispatch = FUNCTION extern;
|
||||
_glapi_get_dispatch_table_size = FUNCTION extern;
|
||||
_glapi_set_dispatch = FUNCTION extern;
|
||||
_glapi_get_context = FUNCTION extern;
|
||||
_glapi_set_context = FUNCTION extern;
|
||||
_glapi_set_warning_func = FUNCTION extern;
|
||||
_glapi_noop_enable_warnings = FUNCTION extern;
|
||||
_glapi_check_multithread = FUNCTION extern;
|
||||
_glthread_GetID = FUNCTION extern;
|
||||
sl_pp_context_add_extension = FUNCTION extern;
|
||||
sl_pp_context_create = FUNCTION extern;
|
||||
sl_pp_context_error_message = FUNCTION extern;
|
||||
sl_pp_context_destroy = FUNCTION extern;
|
||||
sl_pp_version = FUNCTION extern;
|
||||
sl_cl_compile = FUNCTION extern;
|
||||
|
||||
radeon_gem_get_kernel_name = FUNCTION extern;
|
||||
|
||||
_mesa_bitcount = FUNCTION extern;
|
||||
};
|
|
@ -1,53 +0,0 @@
|
|||
# $NetBSD: glx-config.mk,v 1.2 2018/03/07 11:57:30 wiz Exp $
|
||||
#
|
||||
# used by x11/modular-xorg-server112/options.mk
|
||||
|
||||
.if !defined(GLX_CONFIG_MK)
|
||||
GLX_CONFIG_MK= # empty
|
||||
|
||||
. include "../../mk/bsd.fast.prefs.mk"
|
||||
|
||||
CFLAGS.NetBSD+= -D_NETBSD_SOURCE
|
||||
CFLAGS.NetBSD+= ${ATOMIC_OPS_CHECK}HAVE_NETBSD_ATOMIC_OPS
|
||||
|
||||
. if ${OPSYS} == "NetBSD" && !target(netbsd-atomic-ops-check)
|
||||
.PHONY: netbsd-atomic-opts-check
|
||||
netbsd-atomic-ops-check:
|
||||
ATOMIC_OPS_CHECK!=\
|
||||
if ( ${NM} /usr/lib/libc.so | ${GREP} -q atomic_cas_uint ); then \
|
||||
${ECHO} "-D"; \
|
||||
else \
|
||||
${ECHO} "-U"; \
|
||||
fi
|
||||
.endif
|
||||
|
||||
.if (${MACHINE_ARCH} == "x86_64" || \
|
||||
${MACHINE_ARCH} == "sparc64" || \
|
||||
${MACHINE_ARCH} == "alpha")
|
||||
CFLAGS+= -D__GLX_ALIGN64
|
||||
.endif
|
||||
|
||||
.if !empty(MACHINE_ARCH:Mi386) || !empty(MACHINE_ARCH:Mx86_64)
|
||||
###
|
||||
### This is taken from <sys/arch/i386/include/npx.h>. If we don't override
|
||||
### it, the FPU control word will be restored to 0x037f.
|
||||
###
|
||||
### Also, see patch-aq about the libm functions required (float functions
|
||||
### such as floorf). Proper configuration of this should be a goal of
|
||||
### the Mesa developers; alas, it obviously is not.
|
||||
###
|
||||
### XXX We need a reliable check for these functions.
|
||||
###
|
||||
#/* NetBSD uses IEEE double precision. */
|
||||
CFLAGS.NetBSD+= -DDEFAULT_X86_FPU=0x127f
|
||||
###
|
||||
#/* FreeBSD leaves some exceptions unmasked as well. */
|
||||
###
|
||||
CFLAGS.FreeBSD+= -DDEFAULT_X86_FPU=0x1272
|
||||
. endif
|
||||
|
||||
CFLAGS.FreeBSD+= -DUSE_NATIVE_LIBM_FUNCS
|
||||
CFLAGS.NetBSD+= -DUSE_NATIVE_LIBM_FUNCS
|
||||
CFLAGS.DragonFly+= -DUSE_NATIVE_LIBM_FUNCS
|
||||
|
||||
.endif # GLX_CONFIG_MK
|
|
@ -1,66 +0,0 @@
|
|||
# $NetBSD: options.mk,v 1.3 2016/04/11 04:22:34 dbj Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.MesaLib7
|
||||
PKG_SUPPORTED_OPTIONS=
|
||||
|
||||
# Assembler code build configurations
|
||||
.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") && \
|
||||
${OPSYS} != "Darwin"
|
||||
#PKG_SUPPORTED_OPTIONS+= ${MACHINE_ARCH}
|
||||
#PKG_SUGGESTED_OPTIONS+= ${MACHINE_ARCH}
|
||||
.endif
|
||||
###
|
||||
### XXX There are [probably] others, but let's not get crazy just yet.
|
||||
### This will take a while to test for the myriad platforms we
|
||||
### support.
|
||||
###
|
||||
.if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
|
||||
${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc" || \
|
||||
${MACHINE_ARCH} == "sparc64") && \
|
||||
(${OPSYS} == "NetBSD" || \
|
||||
${OPSYS} == "FreeBSD" || ${OPSYS} == "OpenBSD" || \
|
||||
${OPSYS} == "DragonFly" || ${OPSYS} == "Linux" || \
|
||||
${OPSYS} == "SunOS")
|
||||
PKG_SUPPORTED_OPTIONS+= dri
|
||||
.endif
|
||||
.if !empty(MACHINE_PLATFORM:MNetBSD-[4-9]*-*86*)
|
||||
PKG_SUGGESTED_OPTIONS+= dri
|
||||
.endif
|
||||
.if !empty(MACHINE_PLATFORM:MLinux-*-*86*)
|
||||
PKG_SUGGESTED_OPTIONS+= dri
|
||||
.endif
|
||||
|
||||
.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly" || (${OPSYS} == "SunOS" && ${OS_VERSION} == "5.11")
|
||||
PKG_SUGGESTED_OPTIONS+= dri
|
||||
.endif
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
###
|
||||
### XXX Yes, this is a bit overly verbose; with Mesa, that can't hurt much.
|
||||
### NOTE: there is no assembler code built with libOSMesa.
|
||||
#.if (!empty(PKG_OPTIONS:Mi386) || !empty(PKG_OPTIONS:Mx86_64)) && \
|
||||
# !empty(PKG_OPTIONS:Mdri)
|
||||
#BUILD_TARGET_SUFFIX= -${MACHINE_ARCH}
|
||||
#.else
|
||||
#BUILD_TARGET_SUFFIX= # empty
|
||||
#.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdri)
|
||||
CONFIGURE_ARGS+= --with-driver=dri
|
||||
PLIST.dri= yes
|
||||
BUILDLINK_DEPMETHOD.libpciaccess= full
|
||||
. include "../../sysutils/libpciaccess/buildlink3.mk"
|
||||
USE_BUILTIN.MesaLib= no
|
||||
. include "../../graphics/MesaLib/dri.mk"
|
||||
CONFIGURE_ARGS+= --with-dri-drivers="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon savage sis swrast tdfx unichrome"
|
||||
.else
|
||||
CONFIGURE_ARGS+= --with-driver=xlib
|
||||
PLIST.nodri= yes
|
||||
.if !empty(MACHINE_PLATFORM:MNetBSD-[4-9]*-*86*)
|
||||
PKG_FAIL_REASON+= "The dri option needs to be enabled for this to build on NetBSD."
|
||||
.endif
|
||||
###
|
||||
### XXX building libOSMesa breaks with -j, and GNU make has no .WAIT
|
||||
###
|
||||
#MAKE_JOBS_SAFE= no
|
||||
.endif
|
|
@ -1,21 +0,0 @@
|
|||
$NetBSD: patch-af,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/sis/sis_context.h.orig 2009-01-22 17:38:34.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/sis/sis_context.h
|
||||
@@ -404,7 +404,16 @@ struct sis_context
|
||||
#define MMIO_WMB() __asm __volatile("" : : : "memory")
|
||||
#elif defined(__ia64__)
|
||||
#define MMIO_WMB() __asm __volatile("mf" : : : "memory")
|
||||
+#elif defined(__sparc64__)
|
||||
+#define MMIO_WMB() __asm __volatile("membar #Sync" : : : "memory")
|
||||
+#elif defined(HAVE_NETBSD_ATOMIC_H)
|
||||
+#include <sys/atomic.h>
|
||||
+#define MMIO_WMB() membar_sync() /* XXX is this adequate? */
|
||||
+#elif defined(__sync_synchronize) /* gcc built-in */
|
||||
+#define MMIO_WMB() __sync_synchronize()
|
||||
#else
|
||||
+#warning Please define MMIO_WMB for this platform
|
||||
+#define MMIO_WMB()
|
||||
#error platform needs WMB
|
||||
#endif
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
$NetBSD: patch-bin_mklib,v 1.2 2018/01/26 09:41:53 jperkin Exp $
|
||||
|
||||
Solaris ld seemingly has a hard time swallowing nested archives,
|
||||
so flatten them out as is done for linux.
|
||||
|
||||
Also, to simplify PLIST processing, add versioned shared libraries
|
||||
for SunOS.
|
||||
|
||||
--- bin/mklib.orig Sat Oct 15 00:43:34 2011
|
||||
+++ bin/mklib
|
||||
@@ -305,9 +305,15 @@ fi
|
||||
#
|
||||
# OK, make the library now
|
||||
#
|
||||
+if [ x${PATCH} = "x" ] ; then
|
||||
+ VERSION="${MAJOR}.${MINOR}"
|
||||
+else
|
||||
+ VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
||||
+fi
|
||||
+
|
||||
case $ARCH in
|
||||
|
||||
- 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/* | 'NetBSD')
|
||||
+ 'Linux' | 'OpenBSD' | 'DragonFly' | 'GNU' | GNU/* | 'NetBSD' | 'FreeBSD' | 'MirBSD')
|
||||
# we assume gcc
|
||||
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
@@ -398,12 +404,6 @@ case $ARCH in
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
|
||||
- if [ x${PATCH} = "x" ] ; then
|
||||
- VERSION="${MAJOR}.${MINOR}"
|
||||
- else
|
||||
- VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
||||
- fi
|
||||
-
|
||||
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}.so.${VERSION}
|
||||
|
||||
# rm any old libs
|
||||
@@ -426,7 +426,20 @@ case $ARCH in
|
||||
if [ $STATIC = 1 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.a"
|
||||
echo "mklib: Making SunOS static library: " ${LIBNAME}
|
||||
- FINAL_LIBS=`make_ar_static_lib -ruc 0 ${LIBNAME} ${OBJECTS}`
|
||||
+# FINAL_LIBS=`make_ar_static_lib -ruc 0 ${LIBNAME} ${OBJECTS}`
|
||||
+ OPTS="-rucs"
|
||||
+ if [ "${ALTOPTS}" ] ; then
|
||||
+ OPTS=${ALTOPTS}
|
||||
+ fi
|
||||
+
|
||||
+ # expand .a into .o files
|
||||
+ NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
|
||||
+
|
||||
+ # make static lib
|
||||
+ FINAL_LIBS=`make_ar_static_lib ${OPTS} 0 ${LIBNAME} ${NEW_OBJECTS}`
|
||||
+
|
||||
+ # remove temporary extracted .o files
|
||||
+ rm -rf ${LIBNAME}.obj
|
||||
else
|
||||
if [ $NOPREFIX = 0 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
@@ -517,10 +530,13 @@ case $ARCH in
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS="${LIBNAME}"
|
||||
else
|
||||
- rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
- ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
||||
+ # rm any old libs
|
||||
+ rm -f ${LIBNAME}.${VERSION} ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
+ ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${VERSION} -Wl,-h,${LIBNAME}.${VERSION} ${OBJECTS} ${DEPS}
|
||||
+
|
||||
+ ln -s ${LIBNAME}.${VERSION} ${LIBNAME}.${MAJOR}
|
||||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
- FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
|
||||
+ FINAL_LIBS="${LIBNAME}.${VERSION} ${LIBNAME}.${MAJOR} ${LIBNAME}"
|
||||
fi
|
||||
fi
|
||||
;;
|
|
@ -1,40 +0,0 @@
|
|||
$NetBSD: patch-configure.ac,v 1.2 2016/03/26 23:45:21 joerg Exp $
|
||||
|
||||
--- configure.ac.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ configure.ac
|
||||
@@ -1086,6 +1086,8 @@ if test "$mesa_driver" = dri -o "$mesa_d
|
||||
if test "x$driglx_direct" = xyes; then
|
||||
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
|
||||
fi
|
||||
+ DRI_LIB_MAPFILE='-Wl,-M,$(TOP)/src/mesa/drivers/dri/mapfile.externs'
|
||||
+ DRI_LIB_DEPS="$DRI_LIB_DEPS $DRI_LIB_MAPFILE"
|
||||
;;
|
||||
cygwin*)
|
||||
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
|
||||
@@ -1430,7 +1432,7 @@ if test "x$enable_glu" = xyes; then
|
||||
GLU_PC_LIB_PRIV="-lm"
|
||||
if test "$enable_static" = no; then
|
||||
GLU_LIB_DEPS="-lm"
|
||||
- GLU_MESA_DEPS='-l$(GL_LIB)'
|
||||
+ GLU_MESA_DEPS='$(COMPILER_RPATH_FLAG)$(prefix)/lib -l$(GL_LIB)'
|
||||
else
|
||||
GLU_LIB_DEPS=""
|
||||
GLU_MESA_DEPS=""
|
||||
@@ -1509,7 +1511,7 @@ if test "x$enable_glw" = xyes; then
|
||||
# If static, empty GLW_LIB_DEPS and add libs for programs to link
|
||||
GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV"
|
||||
if test "$enable_static" = no; then
|
||||
- GLW_MESA_DEPS='-l$(GL_LIB)'
|
||||
+ GLW_MESA_DEPS='$(COMPILER_RPATH_FLAG)$(prefix)/lib -l$(GL_LIB)'
|
||||
GLW_LIB_DEPS="$GLW_LIB_DEPS"
|
||||
else
|
||||
APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
|
||||
@@ -1574,7 +1576,7 @@ if test "x$enable_glut" = xyes; then
|
||||
|
||||
# If static, empty GLUT_LIB_DEPS and add libs for programs to link
|
||||
if test "$enable_static" = no; then
|
||||
- GLUT_MESA_DEPS='-l$(GLU_LIB) -l$(GL_LIB)'
|
||||
+ GLUT_MESA_DEPS='$(COMPILER_RPATH_FLAG)$(prefix)/lib -l$(GLU_LIB) -l$(GL_LIB)'
|
||||
else
|
||||
APP_LIB_DEPS="$APP_LIB_DEPS $GLUT_LIB_DEPS"
|
||||
GLUT_LIB_DEPS=""
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-include_GL_gl.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
Check for symbol existence with #ifdef, not #if.
|
||||
Needed since some other files only #define the symbol without a value.
|
||||
|
||||
--- include/GL/gl.h.orig 2011-11-23 01:09:52.000000000 +0000
|
||||
+++ include/GL/gl.h
|
||||
@@ -2094,7 +2094,7 @@ typedef void (APIENTRYP PFNGLMULTITEXCOO
|
||||
|
||||
|
||||
|
||||
-#if GL_ARB_shader_objects
|
||||
+#ifdef GL_ARB_shader_objects
|
||||
|
||||
#ifndef GL_MESA_shader_debug
|
||||
#define GL_MESA_shader_debug 1
|
|
@ -1,107 +0,0 @@
|
|||
$NetBSD: patch-src_gallium_auxiliary_util_u__atomic.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
Add atomic operations for PowerPC platforms without GCC >= 4.1. This
|
||||
should probably be sent to the upstream.
|
||||
|
||||
--- src/gallium/auxiliary/util/u_atomic.h.orig 2014-01-10 06:56:00.000000000 +0000
|
||||
+++ src/gallium/auxiliary/util/u_atomic.h
|
||||
@@ -31,6 +31,8 @@
|
||||
#define PIPE_ATOMIC_ASM_GCC_X86
|
||||
#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64))
|
||||
#define PIPE_ATOMIC_ASM_GCC_X86_64
|
||||
+#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_PPC))
|
||||
+#define PIPE_ATOMIC_ASM_GCC_PPC
|
||||
#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401)
|
||||
#define PIPE_ATOMIC_GCC_INTRINSIC
|
||||
#else
|
||||
@@ -131,6 +133,90 @@ p_atomic_cmpxchg(int32_t *v, int32_t old
|
||||
#endif
|
||||
|
||||
|
||||
+#if defined(PIPE_ATOMIC_ASM_GCC_PPC)
|
||||
+
|
||||
+#define PIPE_ATOMIC "GCC ppc assembly"
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
+#define p_atomic_set(_v, _i) (*(_v) = (_i))
|
||||
+#define p_atomic_read(_v) (*(_v))
|
||||
+
|
||||
+static INLINE boolean
|
||||
+p_atomic_dec_zero(int32_t *v)
|
||||
+{
|
||||
+ int32_t c;
|
||||
+
|
||||
+ __asm__ __volatile__(
|
||||
+ "1: lwarx %0,0,%1\n"
|
||||
+ " addic %0,%0,-1\n"
|
||||
+ " stwcx. %0,0,%1\n"
|
||||
+ " bne- 1b"
|
||||
+ : "=&r" (c)
|
||||
+ : "r" (v)
|
||||
+ : "cc", "memory");
|
||||
+
|
||||
+ return c != 0;
|
||||
+}
|
||||
+
|
||||
+static INLINE void
|
||||
+p_atomic_inc(int32_t *v)
|
||||
+{
|
||||
+ int32_t c;
|
||||
+
|
||||
+ __asm__ __volatile__(
|
||||
+ "1: lwarx %0,0,%1\n"
|
||||
+ " addic %0,%0,1\n"
|
||||
+ " stwcx. %0,0,%1\n"
|
||||
+ " bne- 1b"
|
||||
+ : "=&r" (c)
|
||||
+ : "r" (v)
|
||||
+ : "cc", "memory");
|
||||
+}
|
||||
+
|
||||
+static INLINE void
|
||||
+p_atomic_dec(int32_t *v)
|
||||
+{
|
||||
+ int32_t c;
|
||||
+
|
||||
+ __asm__ __volatile__(
|
||||
+ "1: lwarx %0,0,%1\n"
|
||||
+ " addic %0,%0,-1\n"
|
||||
+ " stwcx. %0,0,%1\n"
|
||||
+ " bne- 1b"
|
||||
+ : "=&r" (c)
|
||||
+ : "r" (v)
|
||||
+ : "cc", "memory");
|
||||
+}
|
||||
+
|
||||
+static INLINE int32_t
|
||||
+p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new)
|
||||
+{
|
||||
+ int32_t oldval;
|
||||
+
|
||||
+ __asm__ __volatile__(
|
||||
+ "1: lwarx %0,0,%2\n"
|
||||
+ " cmpw 0,%0,%3\n"
|
||||
+ " bne- 2f\n"
|
||||
+ " stwcx. %4,0,%2\n"
|
||||
+ " bne- 1b\n"
|
||||
+ "2:\n"
|
||||
+ : "=&r" (oldval), "+m" (*v)
|
||||
+ : "r" (v), "r" (old), "r" (_new)
|
||||
+ : "cc", "memory");
|
||||
+
|
||||
+ return oldval;
|
||||
+}
|
||||
+
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#endif /* PIPE_ATOMIC_ASM_PPC */
|
||||
+
|
||||
+
|
||||
|
||||
/* Implementation using GCC-provided synchronization intrinsics
|
||||
*/
|
|
@ -1,44 +0,0 @@
|
|||
$NetBSD: patch-src_gallium_include_pipe_p__config.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
Adjust Endianness for PowerPC, NetBSD, OpenBSD or SunOS.
|
||||
|
||||
--- src/gallium/include/pipe/p_config.h.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/gallium/include/pipe/p_config.h
|
||||
@@ -99,7 +99,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#if defined(__ppc__) || defined(__ppc64__) || defined(__PPC__)
|
||||
+#if defined(__ppc__) || defined(__ppc64__) || defined(__PPC__) || defined(__powerpc__)
|
||||
#define PIPE_ARCH_PPC
|
||||
#if defined(__ppc64__) || defined(__PPC64__)
|
||||
#define PIPE_ARCH_PPC_64
|
||||
@@ -129,6 +129,28 @@
|
||||
# define PIPE_ARCH_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+#if defined(__NetBSD__)
|
||||
+#include <sys/endian.h>
|
||||
+#else /* OpenBSD */
|
||||
+#include <machine/endian.h>
|
||||
+#endif
|
||||
+
|
||||
+#if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
+# define PIPE_ARCH_LITTLE_ENDIAN
|
||||
+#elif _BYTE_ORDER == _BIG_ENDIAN
|
||||
+# define PIPE_ARCH_BIG_ENDIAN
|
||||
+#endif
|
||||
+
|
||||
+#elif defined(__sun)
|
||||
+#include <sys/isa_defs.h>
|
||||
+
|
||||
+#if defined(_LITTLE_ENDIAN)
|
||||
+# define PIPE_ARCH_LITTLE_ENDIAN
|
||||
+#elif defined(_BIG_ENDIAN)
|
||||
+# define PIPE_ARCH_BIG_ENDIAN
|
||||
+#endif
|
||||
+
|
||||
#else
|
||||
|
||||
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
|
|
@ -1,20 +0,0 @@
|
|||
$NetBSD: patch-src_glsl_ir__constant__expression.cpp,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
* band-aid patch for missing fxp2f(3) on NetBSD<6
|
||||
|
||||
--- src/glsl/ir_constant_expression.cpp.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/glsl/ir_constant_expression.cpp
|
||||
@@ -39,6 +39,13 @@
|
||||
#include "ir_visitor.h"
|
||||
#include "glsl_types.h"
|
||||
|
||||
+#ifdef __NetBSD__
|
||||
+#include <sys/param.h>
|
||||
+# if __NetBSD_Version < 600000000
|
||||
+#define exp2f(x) expf((x) * M_LN2)
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
static float
|
||||
dot(ir_constant *op0, ir_constant *op1)
|
||||
{
|
|
@ -1,23 +0,0 @@
|
|||
$NetBSD: patch-src_glsl_ralloc.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
* Fix exit time segfault of qt5 application with modular xorg
|
||||
|
||||
--- src/glsl/ralloc.c.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/glsl/ralloc.c
|
||||
@@ -272,7 +272,7 @@ ralloc_parent(const void *ptr)
|
||||
|
||||
static void *autofree_context = NULL;
|
||||
|
||||
-static void
|
||||
+static void __attribute__((__destructor__))
|
||||
autofree(void)
|
||||
{
|
||||
ralloc_free(autofree_context);
|
||||
@@ -283,7 +283,6 @@ ralloc_autofree_context(void)
|
||||
{
|
||||
if (unlikely(autofree_context == NULL)) {
|
||||
autofree_context = ralloc_context(NULL);
|
||||
- atexit(autofree);
|
||||
}
|
||||
return autofree_context;
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
$NetBSD: patch-src_glu_sgi_glu.exports,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/glu/sgi/glu.exports.orig 2010-02-05 00:10:40.000000000 +0000
|
||||
+++ src/glu/sgi/glu.exports
|
||||
@@ -57,62 +57,3 @@
|
||||
gluTessVertex
|
||||
gluUnProject
|
||||
gluUnProject4
|
||||
- mgluBeginCurve
|
||||
- mgluBeginPolygon
|
||||
- mgluBeginSurface
|
||||
- mgluBeginTrim
|
||||
- mgluBuild1DMipmapLevels
|
||||
- mgluBuild1DMipmaps
|
||||
- mgluBuild2DMipmapLevels
|
||||
- mgluBuild2DMipmaps
|
||||
- mgluBuild3DMipmapLevels
|
||||
- mgluBuild3DMipmaps
|
||||
- mgluCheckExtension
|
||||
- mgluCylinder
|
||||
- mgluDeleteNurbsRenderer
|
||||
- mgluDeleteQuadric
|
||||
- mgluDeleteTess
|
||||
- mgluDisk
|
||||
- mgluEndCurve
|
||||
- mgluEndPolygon
|
||||
- mgluEndSurface
|
||||
- mgluEndTrim
|
||||
- mgluErrorString
|
||||
- mgluGetNurbsProperty
|
||||
- mgluGetString
|
||||
- mgluGetTessProperty
|
||||
- mgluLoadSamplingMatrices
|
||||
- mgluLookAt
|
||||
- mgluNewNurbsRenderer
|
||||
- mgluNewQuadric
|
||||
- mgluNewTess
|
||||
- mgluNextContour
|
||||
- mgluNurbsCallback
|
||||
- mgluNurbsCallbackData
|
||||
- mgluNurbsCallbackDataEXT
|
||||
- mgluNurbsCurve
|
||||
- mgluNurbsProperty
|
||||
- mgluNurbsSurface
|
||||
- mgluOrtho2D
|
||||
- mgluPartialDisk
|
||||
- mgluPerspective
|
||||
- mgluPickMatrix
|
||||
- mgluProject
|
||||
- mgluPwlCurve
|
||||
- mgluQuadricCallback
|
||||
- mgluQuadricDrawStyle
|
||||
- mgluQuadricNormals
|
||||
- mgluQuadricOrientation
|
||||
- mgluQuadricTexture
|
||||
- mgluScaleImage
|
||||
- mgluSphere
|
||||
- mgluTessBeginContour
|
||||
- mgluTessBeginPolygon
|
||||
- mgluTessCallback
|
||||
- mgluTessEndContour
|
||||
- mgluTessEndPolygon
|
||||
- mgluTessNormal
|
||||
- mgluTessProperty
|
||||
- mgluTessVertex
|
||||
- mgluUnProject
|
||||
- mgluUnProject4
|
|
@ -1,49 +0,0 @@
|
|||
$NetBSD: patch-src_glu_sgi_libtess_sweep.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
Fixes segfaults and crashes in applications using libGLU.
|
||||
--- src/glu/sgi/libtess/sweep.c.orig 2010-10-05 16:56:51.000000000 +0000
|
||||
+++ src/glu/sgi/libtess/sweep.c
|
||||
@@ -546,7 +546,9 @@ static int CheckForRightSplice( GLUtesse
|
||||
if( EdgeSign( eUp->Dst, eLo->Org, eUp->Org ) < 0 ) return FALSE;
|
||||
|
||||
/* eLo->Org appears to be above eUp, so splice eLo->Org into eUp */
|
||||
- RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
|
||||
+ if (RegionAbove(regUp))
|
||||
+ RegionAbove(regUp)->dirty = TRUE;
|
||||
+ regUp->dirty = TRUE;
|
||||
if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1);
|
||||
if ( !__gl_meshSplice( eLo->Oprev, eUp ) ) longjmp(tess->env,1);
|
||||
}
|
||||
@@ -584,7 +586,9 @@ static int CheckForLeftSplice( GLUtessel
|
||||
if( EdgeSign( eUp->Dst, eLo->Dst, eUp->Org ) < 0 ) return FALSE;
|
||||
|
||||
/* eLo->Dst is above eUp, so splice eLo->Dst into eUp */
|
||||
- RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
|
||||
+ if (RegionAbove(regUp))
|
||||
+ RegionAbove(regUp)->dirty = TRUE;
|
||||
+ regUp->dirty = TRUE;
|
||||
e = __gl_meshSplitEdge( eUp );
|
||||
if (e == NULL) longjmp(tess->env,1);
|
||||
if ( !__gl_meshSplice( eLo->Sym, e ) ) longjmp(tess->env,1);
|
||||
@@ -718,7 +722,9 @@ static int CheckForIntersect( GLUtessela
|
||||
* (and wait for ConnectRightVertex to splice it appropriately).
|
||||
*/
|
||||
if( EdgeSign( dstUp, tess->event, &isect ) >= 0 ) {
|
||||
- RegionAbove(regUp)->dirty = regUp->dirty = TRUE;
|
||||
+ if (RegionAbove(regUp))
|
||||
+ RegionAbove(regUp)->dirty = TRUE;
|
||||
+ regUp->dirty = TRUE;
|
||||
if (__gl_meshSplitEdge( eUp->Sym ) == NULL) longjmp(tess->env,1);
|
||||
eUp->Org->s = tess->event->s;
|
||||
eUp->Org->t = tess->event->t;
|
||||
@@ -753,7 +759,9 @@ static int CheckForIntersect( GLUtessela
|
||||
longjmp(tess->env,1);
|
||||
}
|
||||
GetIntersectData( tess, eUp->Org, orgUp, dstUp, orgLo, dstLo );
|
||||
- RegionAbove(regUp)->dirty = regUp->dirty = regLo->dirty = TRUE;
|
||||
+ if (RegionAbove(regUp))
|
||||
+ RegionAbove(regUp)->dirty = TRUE;
|
||||
+ regUp->dirty = regLo->dirty = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
$NetBSD: patch-src_glx_XF86dri.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/glx/XF86dri.c.orig 2010-10-19 17:58:29.000000000 +0000
|
||||
+++ src/glx/XF86dri.c
|
||||
@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include "xf86dristr.h"
|
||||
+#include <limits.h>
|
||||
|
||||
static XExtensionInfo _xf86dri_info_data;
|
||||
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
|
||||
@@ -201,7 +202,11 @@ XF86DRIOpenConnection(Display * dpy, int screen, drm_handle_t * hSAREA,
|
||||
}
|
||||
|
||||
if (rep.length) {
|
||||
- if (!(*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1))) {
|
||||
+ if (rep.busIdStringLength < INT_MAX)
|
||||
+ *busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1);
|
||||
+ else
|
||||
+ *busIdString = NULL;
|
||||
+ if (*busIdString == NULL) {
|
||||
_XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
|
||||
UnlockDisplay(dpy);
|
||||
SyncHandle();
|
||||
@@ -300,9 +301,11 @@ XF86DRIGetClientDriverName(Display * dpy
|
||||
*ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
|
||||
|
||||
if (rep.length) {
|
||||
- if (!
|
||||
- (*clientDriverName =
|
||||
- (char *) Xcalloc(rep.clientDriverNameLength + 1, 1))) {
|
||||
+ if (rep.clientDriverNameLength < INT_MAX)
|
||||
+ *clientDriverName = (char *) Xcalloc(rep.clientDriverNameLength + 1, 1);
|
||||
+ else
|
||||
+ *clientDriverName = NULL;
|
||||
+ if (*clientDriverName == NULL) {
|
||||
_XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
|
||||
UnlockDisplay(dpy);
|
||||
SyncHandle();
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_common_dri__util.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/common/dri_util.h.orig 2011-07-09 01:31:41.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/common/dri_util.h
|
||||
@@ -58,6 +58,10 @@
|
||||
|
||||
#define GLX_BAD_CONTEXT 5
|
||||
|
||||
+#define u_int64_t uint64_t
|
||||
+#define u_int32_t uint32_t
|
||||
+#define u_int8_t uint8_t
|
||||
+
|
||||
typedef struct __DRIswapInfoRec __DRIswapInfo;
|
||||
|
||||
/**
|
|
@ -1,12 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_common_mmio.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/common/mmio.h.orig 2010-02-05 00:10:40.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/common/mmio.h
|
||||
@@ -34,6 +34,7 @@
|
||||
#define MMIO_H
|
||||
|
||||
#include "main/glheader.h"
|
||||
+#include "dri_util.h"
|
||||
|
||||
#if defined( __powerpc__ )
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_i915_intel__batchbuffer.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/i915/intel_batchbuffer.c.orig 2011-10-15 04:29:59.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/i915/intel_batchbuffer.c
|
||||
@@ -427,8 +427,10 @@ intel_batchbuffer_emit_mi_flush(struct i
|
||||
OUT_BATCH(PIPE_CONTROL_INSTRUCTION_FLUSH |
|
||||
PIPE_CONTROL_WRITE_FLUSH |
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
+ PIPE_CONTROL_VF_CACHE_INVALIDATE |
|
||||
PIPE_CONTROL_TC_FLUSH |
|
||||
- PIPE_CONTROL_NO_WRITE);
|
||||
+ PIPE_CONTROL_NO_WRITE |
|
||||
+ PIPE_CONTROL_CS_STALL);
|
||||
OUT_BATCH(0); /* write address */
|
||||
OUT_BATCH(0); /* write data */
|
||||
ADVANCE_BATCH();
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_i915_intel__tris.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/i915/intel_tris.c.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/i915/intel_tris.c
|
||||
@@ -337,7 +337,7 @@ void intel_finish_vb(struct intel_contex
|
||||
* Emit primitives as inline vertices *
|
||||
***********************************************************************/
|
||||
|
||||
-#ifdef __i386__
|
||||
+#if (defined(i386) || defined(__i386__)) && !(defined(__SOLARIS__) || defined(sun))
|
||||
#define COPY_DWORDS( j, vb, vertsize, v ) \
|
||||
do { \
|
||||
int __tmp; \
|
|
@ -1,22 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_i965_brw__draw.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/i965/brw_draw.c.orig 2013-04-23 05:46:06.246377394 +0000
|
||||
+++ src/mesa/drivers/dri/i965/brw_draw.c
|
||||
@@ -168,7 +168,7 @@ static void brw_emit_prim(struct brw_con
|
||||
* and missed flushes of the render cache as it heads to other parts of
|
||||
* the besides the draw code.
|
||||
*/
|
||||
- if (intel->always_flush_cache) {
|
||||
+ if ((intel->always_flush_cache) || (intel->gen == 6)) {
|
||||
intel_batchbuffer_emit_mi_flush(intel);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ static void brw_emit_prim(struct brw_con
|
||||
|
||||
intel->batch.need_workaround_flush = true;
|
||||
|
||||
- if (intel->always_flush_cache) {
|
||||
+ if ((intel->always_flush_cache) || (intel->gen == 6)) {
|
||||
intel_batchbuffer_emit_mi_flush(intel);
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_i965_brw__draw__upload.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/i965/brw_draw_upload.c.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/i965/brw_draw_upload.c
|
||||
@@ -531,8 +531,14 @@ static void brw_emit_vertices(struct brw
|
||||
struct intel_context *intel = intel_context(ctx);
|
||||
GLuint i;
|
||||
|
||||
+ /* workaround for gen6, reserve enough space for HW workaround */
|
||||
+ if (intel->gen == 6) {
|
||||
+ if (intel_batchbuffer_space(intel) < (13 + 4*brw->vb.nr_buffers + 2* brw->vb.nr_enabled)*4)
|
||||
+ intel_batchbuffer_flush(intel);
|
||||
+ }
|
||||
brw_emit_query_begin(brw);
|
||||
|
||||
+
|
||||
/* If the VS doesn't read any inputs (calculating vertex position from
|
||||
* a state variable for some reason, for example), emit a single pad
|
||||
* VERTEX_ELEMENT struct and bail.
|
|
@ -1,142 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_i965_brw__misc__state.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/i965/brw_misc_state.c.orig 2013-04-23 05:46:06.246006959 +0000
|
||||
+++ src/mesa/drivers/dri/i965/brw_misc_state.c
|
||||
@@ -223,6 +223,12 @@ static void emit_depthbuffer(struct brw_
|
||||
struct intel_region *hiz_region = depth_irb ? depth_irb->hiz_region : NULL;
|
||||
unsigned int len;
|
||||
|
||||
+ /* workaround for gen6, reserve enough space for HW workaround */
|
||||
+ if (intel->gen == 6) {
|
||||
+ if (intel_batchbuffer_space(intel) < 31*4)
|
||||
+ intel_batchbuffer_flush(intel);
|
||||
+ }
|
||||
+
|
||||
/* 3DSTATE_DEPTH_BUFFER, 3DSTATE_STENCIL_BUFFER are both
|
||||
* non-pipelined state that will need the PIPE_CONTROL workaround.
|
||||
*/
|
||||
@@ -456,6 +462,12 @@ static void upload_polygon_stipple(struc
|
||||
if (!ctx->Polygon.StippleFlag)
|
||||
return;
|
||||
|
||||
+ /* workaround for gen6, reserve enough space for HW workaround */
|
||||
+ if (intel->gen == 6) {
|
||||
+ if (intel_batchbuffer_space(intel) < 41*4)
|
||||
+ intel_batchbuffer_flush(intel);
|
||||
+ }
|
||||
+
|
||||
if (intel->gen == 6)
|
||||
intel_emit_post_sync_nonzero_flush(intel);
|
||||
|
||||
@@ -504,6 +516,12 @@ static void upload_polygon_stipple_offse
|
||||
if (!ctx->Polygon.StippleFlag)
|
||||
return;
|
||||
|
||||
+ /* workaround for gen6, reserve enough space for HW workaround */
|
||||
+ if (intel->gen == 6) {
|
||||
+ if (intel_batchbuffer_space(intel) < 10*4)
|
||||
+ intel_batchbuffer_flush(intel);
|
||||
+ }
|
||||
+
|
||||
if (intel->gen == 6)
|
||||
intel_emit_post_sync_nonzero_flush(intel);
|
||||
|
||||
@@ -548,6 +566,12 @@ static void upload_aa_line_parameters(st
|
||||
if (!ctx->Line.SmoothFlag || !brw->has_aa_line_parameters)
|
||||
return;
|
||||
|
||||
+ /* workaround for gen6, reserve enough space for HW workaround */
|
||||
+ if (intel->gen == 6) {
|
||||
+ if (intel_batchbuffer_space(intel) < 11*4)
|
||||
+ intel_batchbuffer_flush(intel);
|
||||
+ }
|
||||
+
|
||||
if (intel->gen == 6)
|
||||
intel_emit_post_sync_nonzero_flush(intel);
|
||||
|
||||
@@ -581,6 +605,12 @@ static void upload_line_stipple(struct b
|
||||
if (!ctx->Line.StippleFlag)
|
||||
return;
|
||||
|
||||
+ /* workaround for gen6, reserve enough space for HW workaround */
|
||||
+ if (intel->gen == 6) {
|
||||
+ if (intel_batchbuffer_space(intel) < 11*4)
|
||||
+ intel_batchbuffer_flush(intel);
|
||||
+ }
|
||||
+
|
||||
if (intel->gen == 6)
|
||||
intel_emit_post_sync_nonzero_flush(intel);
|
||||
|
||||
@@ -612,8 +642,62 @@ static void upload_invarient_state( stru
|
||||
struct intel_context *intel = &brw->intel;
|
||||
|
||||
/* 3DSTATE_SIP, 3DSTATE_MULTISAMPLE, etc. are nonpipelined. */
|
||||
- if (intel->gen == 6)
|
||||
- intel_emit_post_sync_nonzero_flush(intel);
|
||||
+ if (intel->gen == 6) {
|
||||
+ int i;
|
||||
+
|
||||
+ if (intel->batch.need_workaround_flush) {
|
||||
+
|
||||
+ BEGIN_BATCH(33);
|
||||
+ OUT_BATCH(_3DSTATE_PIPE_CONTROL);
|
||||
+ OUT_BATCH(PIPE_CONTROL_CS_STALL |
|
||||
+ PIPE_CONTROL_STALL_AT_SCOREBOARD);
|
||||
+ OUT_BATCH(0); /* address */
|
||||
+ OUT_BATCH(0); /* write data */
|
||||
+
|
||||
+ OUT_BATCH(_3DSTATE_PIPE_CONTROL);
|
||||
+ OUT_BATCH(PIPE_CONTROL_WRITE_IMMEDIATE);
|
||||
+ OUT_RELOC(intel->batch.workaround_bo,
|
||||
+ I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, 0);
|
||||
+ OUT_BATCH(0); /* write data */
|
||||
+ } else
|
||||
+ BEGIN_BATCH(25);
|
||||
+ /* Select the 3D pipeline (as opposed to media) */
|
||||
+ OUT_BATCH(brw->CMD_PIPELINE_SELECT << 16 | 0);
|
||||
+
|
||||
+ OUT_BATCH(_3DSTATE_MULTISAMPLE << 16 | (1));
|
||||
+ OUT_BATCH(MS_PIXEL_LOCATION_CENTER |
|
||||
+ MS_NUMSAMPLES_1);
|
||||
+ OUT_BATCH(0); /* positions for 4/8-sample */
|
||||
+
|
||||
+ OUT_BATCH(_3DSTATE_SAMPLE_MASK << 16 | (2 - 2));
|
||||
+ OUT_BATCH(1);
|
||||
+
|
||||
+ if (intel->gen < 7) {
|
||||
+ for (i = 0; i < 4; i++) {
|
||||
+ OUT_BATCH(_3DSTATE_GS_SVB_INDEX << 16 | (4 - 2));
|
||||
+ OUT_BATCH(i << SVB_INDEX_SHIFT);
|
||||
+ OUT_BATCH(0);
|
||||
+ OUT_BATCH(0xffffffff);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* 0x61020000 State Instruction Pointer */
|
||||
+ {
|
||||
+ OUT_BATCH(CMD_STATE_INSN_POINTER);
|
||||
+ OUT_BATCH(0);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ {
|
||||
+ OUT_BATCH(brw->CMD_VF_STATISTICS << 16 |
|
||||
+ (unlikely(INTEL_DEBUG & DEBUG_STATS) ? 1 : 0));
|
||||
+ }
|
||||
+ ADVANCE_BATCH();
|
||||
+
|
||||
+ if (intel->batch.need_workaround_flush)
|
||||
+ intel->batch.need_workaround_flush = false;
|
||||
+
|
||||
+ } else {
|
||||
|
||||
{
|
||||
/* 0x61040000 Pipeline Select */
|
||||
@@ -693,6 +777,7 @@ static void upload_invarient_state( stru
|
||||
|
||||
BRW_BATCH_STRUCT(brw, &vfs);
|
||||
}
|
||||
+ }
|
||||
}
|
||||
|
||||
const struct brw_tracked_state brw_invarient_state = {
|
|
@ -1,17 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_i965_gen6__vs__state.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/i965/gen6_vs_state.c.orig 2011-11-23 01:09:52.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/i965/gen6_vs_state.c
|
||||
@@ -120,6 +120,12 @@ upload_vs_state(struct brw_context *brw)
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
|
||||
+ /* workaround for gen6, reserve enough space for HW workaround */
|
||||
+ if (intel->gen == 6) {
|
||||
+ if (intel_batchbuffer_space(intel) < 23*4)
|
||||
+ intel_batchbuffer_flush(intel);
|
||||
+ }
|
||||
+
|
||||
if (brw->vs.push_const_size == 0) {
|
||||
/* Disable the push constant buffers. */
|
||||
BEGIN_BATCH(5);
|
|
@ -1,38 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_i965_gen6__wm__state.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/i965/gen6_wm_state.c.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/i965/gen6_wm_state.c
|
||||
@@ -102,15 +102,14 @@ upload_wm_state(struct brw_context *brw)
|
||||
/* CACHE_NEW_WM_PROG */
|
||||
if (brw->wm.prog_data->nr_params == 0) {
|
||||
/* Disable the push constant buffers. */
|
||||
- BEGIN_BATCH(5);
|
||||
+ BEGIN_BATCH(14);
|
||||
OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 | (5 - 2));
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0);
|
||||
- ADVANCE_BATCH();
|
||||
} else {
|
||||
- BEGIN_BATCH(5);
|
||||
+ BEGIN_BATCH(14);
|
||||
OUT_BATCH(_3DSTATE_CONSTANT_PS << 16 |
|
||||
GEN6_CONSTANT_BUFFER_0_ENABLE |
|
||||
(5 - 2));
|
||||
@@ -123,7 +122,6 @@ upload_wm_state(struct brw_context *brw)
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0);
|
||||
- ADVANCE_BATCH();
|
||||
}
|
||||
|
||||
dw2 = dw4 = dw5 = dw6 = 0;
|
||||
@@ -183,7 +181,6 @@ upload_wm_state(struct brw_context *brw)
|
||||
dw6 |= brw_count_bits(brw->fragment_program->Base.InputsRead) <<
|
||||
GEN6_WM_NUM_SF_OUTPUTS_SHIFT;
|
||||
|
||||
- BEGIN_BATCH(9);
|
||||
OUT_BATCH(_3DSTATE_WM << 16 | (9 - 2));
|
||||
OUT_BATCH(brw->wm.prog_offset);
|
||||
OUT_BATCH(dw2);
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_i965_intel__batchbuffer.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/i965/intel_batchbuffer.c.orig 2011-10-15 04:29:59.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/i965/intel_batchbuffer.c
|
||||
@@ -427,8 +427,10 @@ intel_batchbuffer_emit_mi_flush(struct i
|
||||
OUT_BATCH(PIPE_CONTROL_INSTRUCTION_FLUSH |
|
||||
PIPE_CONTROL_WRITE_FLUSH |
|
||||
PIPE_CONTROL_DEPTH_CACHE_FLUSH |
|
||||
+ PIPE_CONTROL_VF_CACHE_INVALIDATE |
|
||||
PIPE_CONTROL_TC_FLUSH |
|
||||
- PIPE_CONTROL_NO_WRITE);
|
||||
+ PIPE_CONTROL_NO_WRITE |
|
||||
+ PIPE_CONTROL_CS_STALL);
|
||||
OUT_BATCH(0); /* write address */
|
||||
OUT_BATCH(0); /* write data */
|
||||
ADVANCE_BATCH();
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_intel_intel__context.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/intel/intel_context.c.orig 2011-11-23 01:10:52.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/intel/intel_context.c
|
||||
@@ -737,7 +737,7 @@ intelInitContext(struct intel_context *i
|
||||
driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache,
|
||||
sPriv->myNum, (intel->gen >= 4) ? "i965" : "i915");
|
||||
if (intel->gen < 4)
|
||||
- intel->maxBatchSize = 4096;
|
||||
+ intel->maxBatchSize = 2*4096;
|
||||
else
|
||||
intel->maxBatchSize = sizeof(intel->batch.map);
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_intel_intel__context.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/intel/intel_context.h.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/intel/intel_context.h
|
||||
@@ -304,8 +304,12 @@ struct intel_context
|
||||
driOptionCache optionCache;
|
||||
};
|
||||
|
||||
+#if defined(__sun)
|
||||
+#include <stdlib.h>
|
||||
+#define __progname getexecname()
|
||||
+#else
|
||||
extern char *__progname;
|
||||
-
|
||||
+#endif
|
||||
|
||||
#define SUBPIXEL_X 0.125
|
||||
#define SUBPIXEL_Y 0.125
|
||||
@@ -364,7 +368,7 @@ do { \
|
||||
* than COPY_DWORDS would:
|
||||
* XXX Put this in src/mesa/main/imports.h ???
|
||||
*/
|
||||
-#if defined(i386) || defined(__i386__)
|
||||
+#if (defined(i386) || defined(__i386__)) && !(defined(__SOLARIS__) || defined(sun))
|
||||
static INLINE void * __memcpy(void * to, const void * from, size_t n)
|
||||
{
|
||||
int d0, d1, d2;
|
|
@ -1,23 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_dri_mach64_mach64__context.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/drivers/dri/mach64/mach64_context.h.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/drivers/dri/mach64/mach64_context.h
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "mach64_drm.h"
|
||||
|
||||
#include "main/mtypes.h"
|
||||
-
|
||||
+#include "main/macros.h"
|
||||
#include "mach64_reg.h"
|
||||
|
||||
#include "texmem.h"
|
||||
@@ -298,6 +298,9 @@ extern GLboolean mach64UnbindContext( __
|
||||
#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#include <machine/endian.h>
|
||||
#define bswap_32 bswap32
|
||||
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
+#include <sys/endian.h>
|
||||
+#define bswap_32 bswap32
|
||||
#else
|
||||
#include <byteswap.h>
|
||||
#endif
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_drivers_x11_Makefile,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
Build the x11 version libGL.so with version numbering major 1 and minor 2,
|
||||
the same a the glx version of libGL (simplifies PLIST handling).
|
||||
|
||||
--- src/mesa/drivers/x11/Makefile.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/drivers/x11/Makefile
|
||||
@@ -61,7 +61,7 @@ default: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME
|
||||
|
||||
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(CORE_MESA)
|
||||
@ $(MKLIB) -o $(GL_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
|
||||
- -major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
|
||||
+ -major 1 -minor 2 \
|
||||
-install $(TOP)/$(LIB_DIR) \
|
||||
-cplusplus $(MKLIB_OPTIONS) \
|
||||
-id $(INSTALL_LIB_DIR)/lib$(GL_LIB).$(GL_MAJOR).dylib \
|
|
@ -1,47 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_main_compiler.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/main/compiler.h.orig 2011-11-23 01:09:52.000000000 +0000
|
||||
+++ src/mesa/main/compiler.h
|
||||
@@ -248,7 +248,26 @@ extern "C" {
|
||||
* Try to use a runtime test instead.
|
||||
* For now, only used by some DRI hardware drivers for color/texel packing.
|
||||
*/
|
||||
-#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
|
||||
+#ifdef __sun
|
||||
+#include <sys/isa_defs.h>
|
||||
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
+#include <machine/endian.h>
|
||||
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
+#include <sys/endian.h>
|
||||
+#endif
|
||||
+
|
||||
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN)
|
||||
+# if BYTE_ORDER == BIG_ENDIAN
|
||||
+#define MESA_BIG_ENDIAN 1
|
||||
+# endif
|
||||
+#elif defined(_BYTE_ORDER) && defined(_BIG_ENDIAN)
|
||||
+# if _BYTE_ORDER == _BIG_ENDIAN
|
||||
+#define MESA_BIG_ENDIAN 1
|
||||
+# endif
|
||||
+#elif defined(__sun) && defined(_BIG_ENDIAN)
|
||||
+#define MESA_BIG_ENDIAN 1
|
||||
+#endif
|
||||
+#if MESA_BIG_ENDIAN == 1
|
||||
#if defined(__linux__)
|
||||
#include <byteswap.h>
|
||||
#define CPU_TO_LE32( x ) bswap_32( x )
|
||||
@@ -263,11 +282,13 @@ static INLINE GLuint CPU_TO_LE32(GLuint
|
||||
((x & 0x00ff0000) >> 8) |
|
||||
((x & 0xff000000) >> 24));
|
||||
}
|
||||
+#elif defined(__sun)
|
||||
+#include <sys/byteorder.h>
|
||||
+#define CPU_TO_LE32( x ) BSWAP_32( x )
|
||||
#else /*__linux__ */
|
||||
#include <sys/endian.h>
|
||||
#define CPU_TO_LE32( x ) bswap32( x )
|
||||
#endif /*__linux__*/
|
||||
-#define MESA_BIG_ENDIAN 1
|
||||
#else
|
||||
#define CPU_TO_LE32( x ) ( x )
|
||||
#define MESA_LITTLE_ENDIAN 1
|
|
@ -1,40 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_main_context.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
* Fix exit time segfault of qt5 application with modular xorg
|
||||
|
||||
--- src/mesa/main/context.c.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/main/context.c
|
||||
@@ -383,10 +383,10 @@ _glthread_DECLARE_STATIC_MUTEX(OneTimeLo
|
||||
*
|
||||
* \sa _math_init().
|
||||
*/
|
||||
+static GLbitfield api_init_mask = 0x0;
|
||||
static void
|
||||
one_time_init( struct gl_context *ctx )
|
||||
{
|
||||
- static GLbitfield api_init_mask = 0x0;
|
||||
|
||||
_glthread_LOCK_MUTEX(OneTimeLock);
|
||||
|
||||
@@ -441,14 +441,16 @@ one_time_init( struct gl_context *ctx )
|
||||
|
||||
_glthread_UNLOCK_MUTEX(OneTimeLock);
|
||||
|
||||
- /* Hopefully atexit() is widely available. If not, we may need some
|
||||
- * #ifdef tests here.
|
||||
- */
|
||||
- atexit(_mesa_destroy_shader_compiler);
|
||||
-
|
||||
dummy_enum_func();
|
||||
}
|
||||
|
||||
+static void __attribute__((__destructor__))
|
||||
+one_time_fini(void)
|
||||
+{
|
||||
+ if (api_init_mask)
|
||||
+ _mesa_destroy_shader_compiler();
|
||||
+}
|
||||
+
|
||||
|
||||
/**
|
||||
* Initialize fields of gl_current_attrib (aka ctx->Current.*)
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_main_imports.c,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/main/imports.c.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/main/imports.c
|
||||
@@ -514,7 +514,7 @@ _mesa_ffsll(int64_t val)
|
||||
#endif
|
||||
|
||||
#if !defined(__GNUC__) ||\
|
||||
- ((_GNUC__ == 3 && __GNUC_MINOR__ < 4) && __GNUC__ < 4)
|
||||
+ ((__GNUC__ == 3 && __GNUC_MINOR__ < 4) && __GNUC__ < 4)
|
||||
/**
|
||||
* Return number of bits set in given GLuint.
|
||||
*/
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-src_mesa_main_imports.h,v 1.1 2015/04/05 17:01:37 tnn Exp $
|
||||
|
||||
--- src/mesa/main/imports.h.orig 2011-10-15 00:43:58.000000000 +0000
|
||||
+++ src/mesa/main/imports.h
|
||||
@@ -570,7 +570,7 @@ _mesa_init_sqrt_table(void);
|
||||
#define _mesa_ffs(i) ffs(i)
|
||||
#define _mesa_ffsll(i) ffsll(i)
|
||||
|
||||
-#if ((_GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
|
||||
+#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
|
||||
#define _mesa_bitcount(i) __builtin_popcount(i)
|
||||
#else
|
||||
extern unsigned int
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.841 2019/07/21 10:34:52 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.842 2019/08/21 17:40:41 nia Exp $
|
||||
#
|
||||
|
||||
COMMENT= Packages to support the X window system
|
||||
|
@ -298,7 +298,6 @@ SUBDIR+= mkcomposecache
|
|||
SUBDIR+= mlterm
|
||||
SUBDIR+= modeline
|
||||
SUBDIR+= modular-xorg-server
|
||||
SUBDIR+= modular-xorg-server112
|
||||
SUBDIR+= modular-xorg-xephyr
|
||||
SUBDIR+= modular-xorg-xquartz
|
||||
SUBDIR+= motif
|
||||
|
@ -534,9 +533,7 @@ SUBDIR+= xf86-video-i740
|
|||
SUBDIR+= xf86-video-intel
|
||||
SUBDIR+= xf86-video-mach64
|
||||
SUBDIR+= xf86-video-mga
|
||||
SUBDIR+= xf86-video-modesetting
|
||||
SUBDIR+= xf86-video-neomagic
|
||||
SUBDIR+= xf86-video-newport
|
||||
SUBDIR+= xf86-video-nouveau
|
||||
SUBDIR+= xf86-video-nv
|
||||
SUBDIR+= xf86-video-openchrome
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.22 2018/05/11 13:47:35 wiz Exp $
|
||||
# $NetBSD: buildlink3.mk,v 1.23 2019/08/21 17:40:41 nia Exp $
|
||||
|
||||
BUILDLINK_TREE+= modular-xorg-server
|
||||
|
||||
|
@ -7,28 +7,16 @@ MODULAR_XORG_SERVER_BUILDLINK3_MK:=
|
|||
|
||||
.include "../../mk/bsd.fast.prefs.mk"
|
||||
|
||||
USE_OLD_MODULAR_XORG_SERVER?= no
|
||||
|
||||
.if !empty(USE_OLD_MODULAR_XORG_SERVER:M[yY][eE][sS])
|
||||
BUILDLINK_API_DEPENDS.modular-xorg-server+= modular-xorg-server>=1.12.4nb12<1.17
|
||||
BUILDLINK_PKGSRCDIR.modular-xorg-server?= ../../x11/modular-xorg-server112
|
||||
.else
|
||||
BUILDLINK_API_DEPENDS.modular-xorg-server+= modular-xorg-server>=1.18
|
||||
BUILDLINK_PKGSRCDIR.modular-xorg-server?= ../../x11/modular-xorg-server
|
||||
.endif
|
||||
|
||||
BUILDLINK_DEPMETHOD.libpciaccess= full
|
||||
.include "../../sysutils/libpciaccess/buildlink3.mk"
|
||||
.include "../../x11/pixman/buildlink3.mk"
|
||||
|
||||
.include "../../x11/xorgproto/buildlink3.mk"
|
||||
.if !empty(USE_OLD_MODULAR_XORG_SERVER:M[yY][eE][sS])
|
||||
.include "../../graphics/MesaLib7/buildlink3.mk" # XXX should not be needed for non-dri build
|
||||
.include "../../x11/libXfont/buildlink3.mk"
|
||||
.else
|
||||
.include "../../x11/libXfont2/buildlink3.mk"
|
||||
.include "../../graphics/MesaLib/buildlink3.mk" # XXX should not be needed for non-dri build
|
||||
.endif
|
||||
.endif # MODULAR_XORG_SERVER_BUILDLINK3_MK
|
||||
|
||||
BUILDLINK_TREE+= -modular-xorg-server
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
The X.org X11 Server from the modularized source tree of
|
||||
X.org X11.
|
|
@ -1,16 +0,0 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
For the X server to run you need at least some fonts installed. The
|
||||
recommended approach is to install the entire modular-xorg-fonts
|
||||
meta-package, but failing that the minimum set required is:
|
||||
|
||||
fonts/font-alias
|
||||
fonts/font-misc-misc
|
||||
fonts/font-cursor-misc
|
||||
|
||||
This package does *not* depend on these font packages directly as
|
||||
in some circumstances installing extra copies from pkgsrc would be
|
||||
redundant or possibly harmful.
|
||||
|
||||
===========================================================================
|
|
@ -1,151 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.11 2018/03/07 11:57:38 wiz Exp $
|
||||
|
||||
DISTNAME= xorg-server-1.12.4
|
||||
PKGNAME= modular-${DISTNAME}
|
||||
PKGREVISION= 18
|
||||
CATEGORIES= x11
|
||||
MASTER_SITES= ${MASTER_SITE_XORG:=xserver/}
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://xorg.freedesktop.org/
|
||||
COMMENT= Modular X11 server from modular X.org
|
||||
|
||||
SPECIAL_PERMS+= bin/Xorg ${SETUID_ROOT_PERMS}
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_LIBTOOL= yes
|
||||
USE_TOOLS+= gmake pkg-config
|
||||
USE_LANGUAGES+= c99
|
||||
|
||||
PKGCONFIG_OVERRIDE+= xorg-server.pc.in
|
||||
SHLIBTOOL_OVERRIDE= # empty
|
||||
|
||||
BUILD_DEFS+= VARBASE
|
||||
BUILD_DEFS_EFFECTS+= XKB_OUTPUT_DIR
|
||||
|
||||
OWN_DIRS+= ${VARBASE}/log
|
||||
OWN_DIRS+= ${XKB_OUTPUT_DIR}
|
||||
XKB_OUTPUT_DIR?= ${VARBASE}/db/xkb # XXX sync with xkeyboard-config
|
||||
|
||||
CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
|
||||
CONFIGURE_ARGS+= --with-xkb-output=${XKB_OUTPUT_DIR:Q}
|
||||
|
||||
.if !empty(USE_TOOLS:Mauto*)
|
||||
TOOLS_DEPENDS+= xorg-util-macros>=1.1.5:../../devel/xorg-util-macros
|
||||
.endif
|
||||
|
||||
DEPENDS+= xkbcomp-[0-9]*:../../x11/xkbcomp
|
||||
DEPENDS+= xkeyboard-config-[0-9]*:../../x11/xkeyboard-config
|
||||
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
|
||||
.if empty(USE_OLD_MODULAR_XORG_SERVER:M[yY][eE][sS])
|
||||
PKG_FAIL_REASON+= "This is a legacy X.org server package."
|
||||
PKG_FAIL_REASON+= "You must set USE_OLD_MODULAR_XORG_SERVER=yes in mk.conf"
|
||||
PKG_FAIL_REASON+= "to make xf86-* drivers use the old ABI."
|
||||
.endif
|
||||
|
||||
.if ${OPSYS} == "NetBSD"
|
||||
CONFIGURE_ARGS+= --with-builder-addr="tech-x11@NetBSD.org"
|
||||
CONFIGURE_ARGS+= --with-os-vendor="The NetBSD Foundation"
|
||||
# TLS is not supported by NetBSD<6
|
||||
. if !empty(OS_VERSION:M[0-5].*)
|
||||
CONFIGURE_ENV+= ac_cv_tls=no
|
||||
CONFIGURE_ARGS+= --disable-glx-tls
|
||||
. endif
|
||||
.endif
|
||||
CONFIGURE_ARGS+= --with-os-name=${MACHINE_PLATFORM:Q}
|
||||
|
||||
CONFIGURE_ARGS+= --enable-xorg
|
||||
|
||||
CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/share/fonts/X11
|
||||
|
||||
LEGACY_FONT_PATHS=
|
||||
DEFAULT_FONT_PATHS=
|
||||
.for f in misc TTF OTF Type1 100dpi 75dpi cyrillic
|
||||
DEFAULT_FONT_PATHS+= ${PREFIX}/share/fonts/X11/${f}
|
||||
LEGACY_FONT_PATHS+= ${PREFIX}/lib/X11/fonts/${f}
|
||||
.endfor
|
||||
FONT_PATHS= ${DEFAULT_FONT_PATHS} ${LEGACY_FONT_PATHS}
|
||||
|
||||
CONFIGURE_ARGS+= --with-default-font-path=${FONT_PATHS:ts,:Q}
|
||||
|
||||
CONFIGURE_ARGS+= --disable-config-hal
|
||||
CONFIGURE_ARGS+= --disable-dmx
|
||||
CONFIGURE_ARGS+= --disable-xwin
|
||||
CONFIGURE_ARGS+= --disable-xephyr
|
||||
CONFIGURE_ARGS+= --disable-kdrive
|
||||
#CONFIGURE_ARGS+= --disable-kdrive-vesa
|
||||
CONFIGURE_ARGS+= --disable-xfake
|
||||
CONFIGURE_ARGS+= --disable-xfbdev
|
||||
|
||||
CONFIGURE_ARGS+= --with-int10=x86emu
|
||||
|
||||
CONFIGURE_ENV+= APP_MAN_SUFFIX=1 FILE_MAN_SUFFIX=5
|
||||
CONFIGURE_ENV+= DRIVER_MAN_SUFFIX=4
|
||||
|
||||
PLIST_VARS+= sunos
|
||||
PLIST_SUBST+= SUNOS_ARCH=${SUNOS_ARCH}
|
||||
|
||||
.if ${OPSYS} == "SunOS"
|
||||
PLIST.sunos= yes
|
||||
. if ${MACHINE_ARCH} == "i386"
|
||||
SUNOS_ARCH= ia32
|
||||
. elif ${MACHINE_ARCH} == "x86_64"
|
||||
SUNOS_ARCH= amd64
|
||||
. elif ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
|
||||
SUNOS_ARCH= sparcv8plus
|
||||
. endif
|
||||
.endif
|
||||
|
||||
PLIST_VARS+= sparc
|
||||
.if !empty(MACHINE_ARCH:Msparc*)
|
||||
PLIST.sparc= yes
|
||||
.endif
|
||||
|
||||
# Workaround for PR#41556.
|
||||
# Avoid to use bsd_kqueue_apm, force to use bsd_apm instead.
|
||||
CONFIGURE_ENV.NetBSD+= ac_cv_header_sys_event_h=no
|
||||
|
||||
INSTALLATION_DIRS+= lib/xorg/modules/drivers lib/xorg/modules/input
|
||||
|
||||
BUILDLINK_API_DEPENDS.MesaLib7+= MesaLib7>=7.8.0<10
|
||||
BUILDLINK_API_DEPENDS.xtrans+= xtrans>=1.2.2
|
||||
BUILDLINK_API_DEPENDS.dri+= dri>=7.8
|
||||
BUILDLINK_API_DEPENDS.xfont+= xfont>=1.4.2
|
||||
BUILDLINK_API_DEPENDS.pixman+= pixman>=0.21.8
|
||||
|
||||
BUILD_DEPENDS+= tradcpp-[0-9]*:../../devel/tradcpp
|
||||
CONFIGURE_ENV+= ac_cv_path_RAWCPP="${PREFIX}/bin/tradcpp -Uunix"
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
.include "../../devel/ncurses/buildlink3.mk"
|
||||
.include "../../devel/zlib/buildlink3.mk"
|
||||
.include "../../fonts/libfontenc/buildlink3.mk"
|
||||
.include "../../graphics/MesaLib7/buildlink3.mk"
|
||||
.include "../../security/openssl/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.libpciaccess+= libpciaccess>=0.11.0
|
||||
BUILDLINK_DEPMETHOD.libpciaccess= full
|
||||
.include "../../sysutils/libpciaccess/buildlink3.mk"
|
||||
.include "../../x11/evieext/buildlink3.mk"
|
||||
.include "../../x11/libX11/buildlink3.mk"
|
||||
.include "../../x11/libXau/buildlink3.mk"
|
||||
.include "../../x11/libXaw/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.libXext+= libXext>=1.1.1
|
||||
.include "../../x11/libXext/buildlink3.mk"
|
||||
.include "../../x11/libXfixes/buildlink3.mk"
|
||||
.include "../../x11/libXfont/buildlink3.mk"
|
||||
.include "../../x11/libXt/buildlink3.mk"
|
||||
.include "../../x11/libXxf86misc/buildlink3.mk"
|
||||
.include "../../x11/libXxf86vm/buildlink3.mk"
|
||||
.include "../../x11/libXinerama/buildlink3.mk"
|
||||
.include "../../x11/libdrm/buildlink3.mk"
|
||||
.include "../../x11/libxkbfile/buildlink3.mk"
|
||||
.include "../../x11/libxkbui/buildlink3.mk"
|
||||
.include "../../x11/pixman/buildlink3.mk"
|
||||
.include "../../x11/xorgproto/buildlink3.mk"
|
||||
.include "../../x11/xtrans/buildlink3.mk"
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -1,214 +0,0 @@
|
|||
@comment $NetBSD: PLIST,v 1.2 2015/09/20 16:39:18 tnn Exp $
|
||||
bin/X
|
||||
bin/Xnest
|
||||
bin/Xorg
|
||||
bin/Xvfb
|
||||
bin/cvt
|
||||
bin/gtf
|
||||
include/xorg/BT.h
|
||||
include/xorg/IBM.h
|
||||
include/xorg/TI.h
|
||||
include/xorg/XIstubs.h
|
||||
include/xorg/Xprintf.h
|
||||
include/xorg/bt829.h
|
||||
include/xorg/callback.h
|
||||
include/xorg/client.h
|
||||
include/xorg/closestr.h
|
||||
include/xorg/closure.h
|
||||
include/xorg/colormap.h
|
||||
include/xorg/colormapst.h
|
||||
include/xorg/compiler.h
|
||||
include/xorg/compositeext.h
|
||||
include/xorg/cursor.h
|
||||
include/xorg/cursorstr.h
|
||||
include/xorg/damage.h
|
||||
include/xorg/damagestr.h
|
||||
include/xorg/dbestruct.h
|
||||
include/xorg/dgaproc.h
|
||||
include/xorg/dix.h
|
||||
include/xorg/dixaccess.h
|
||||
include/xorg/dixevents.h
|
||||
include/xorg/dixfont.h
|
||||
include/xorg/dixfontstr.h
|
||||
include/xorg/dixgrabs.h
|
||||
include/xorg/dixstruct.h
|
||||
${PLIST.dri}include/xorg/dri.h
|
||||
include/xorg/dri2.h
|
||||
${PLIST.dri}include/xorg/dristruct.h
|
||||
include/xorg/edid.h
|
||||
include/xorg/events.h
|
||||
include/xorg/exa.h
|
||||
include/xorg/exevents.h
|
||||
include/xorg/extension.h
|
||||
include/xorg/extinit.h
|
||||
include/xorg/extnsionst.h
|
||||
include/xorg/fb.h
|
||||
include/xorg/fbdevhw.h
|
||||
include/xorg/fboverlay.h
|
||||
include/xorg/fbpict.h
|
||||
include/xorg/fbrop.h
|
||||
include/xorg/fi1236.h
|
||||
include/xorg/fourcc.h
|
||||
include/xorg/gc.h
|
||||
include/xorg/gcstruct.h
|
||||
include/xorg/geext.h
|
||||
include/xorg/geint.h
|
||||
include/xorg/globals.h
|
||||
include/xorg/glyphstr.h
|
||||
include/xorg/hotplug.h
|
||||
include/xorg/i2c_def.h
|
||||
include/xorg/input.h
|
||||
include/xorg/inputstr.h
|
||||
include/xorg/list.h
|
||||
include/xorg/mi.h
|
||||
include/xorg/mibstore.h
|
||||
include/xorg/micmap.h
|
||||
include/xorg/micoord.h
|
||||
include/xorg/mifillarc.h
|
||||
include/xorg/mifpoly.h
|
||||
include/xorg/migc.h
|
||||
include/xorg/miline.h
|
||||
include/xorg/mioverlay.h
|
||||
include/xorg/mipict.h
|
||||
include/xorg/mipointer.h
|
||||
include/xorg/mipointrst.h
|
||||
include/xorg/misc.h
|
||||
include/xorg/miscstruct.h
|
||||
include/xorg/mispans.h
|
||||
include/xorg/mistruct.h
|
||||
include/xorg/misync.h
|
||||
include/xorg/misyncstr.h
|
||||
include/xorg/miwideline.h
|
||||
include/xorg/mizerarc.h
|
||||
include/xorg/msp3430.h
|
||||
include/xorg/opaque.h
|
||||
include/xorg/optionstr.h
|
||||
include/xorg/os.h
|
||||
include/xorg/panoramiX.h
|
||||
include/xorg/panoramiXsrv.h
|
||||
include/xorg/picture.h
|
||||
include/xorg/picturestr.h
|
||||
include/xorg/pixmap.h
|
||||
include/xorg/pixmapstr.h
|
||||
include/xorg/privates.h
|
||||
include/xorg/property.h
|
||||
include/xorg/propertyst.h
|
||||
include/xorg/ptrveloc.h
|
||||
include/xorg/randrstr.h
|
||||
include/xorg/region.h
|
||||
include/xorg/regionstr.h
|
||||
include/xorg/registry.h
|
||||
include/xorg/resource.h
|
||||
include/xorg/rgb.h
|
||||
include/xorg/rrtransform.h
|
||||
${PLIST.dri}include/xorg/sarea.h
|
||||
include/xorg/screenint.h
|
||||
include/xorg/scrnintstr.h
|
||||
include/xorg/selection.h
|
||||
include/xorg/servermd.h
|
||||
include/xorg/shadow.h
|
||||
include/xorg/shadowfb.h
|
||||
include/xorg/shmint.h
|
||||
include/xorg/site.h
|
||||
${PLIST.sunos}include/xorg/solaris-${SUNOS_ARCH}.il
|
||||
include/xorg/swaprep.h
|
||||
include/xorg/swapreq.h
|
||||
include/xorg/syncsdk.h
|
||||
include/xorg/tda8425.h
|
||||
include/xorg/tda9850.h
|
||||
include/xorg/tda9885.h
|
||||
include/xorg/uda1380.h
|
||||
include/xorg/validate.h
|
||||
include/xorg/vbe.h
|
||||
include/xorg/vbeModes.h
|
||||
include/xorg/vgaHW.h
|
||||
include/xorg/vidmodeproc.h
|
||||
include/xorg/wfbrename.h
|
||||
include/xorg/window.h
|
||||
include/xorg/windowstr.h
|
||||
include/xorg/xaarop.h
|
||||
include/xorg/xaa.h
|
||||
include/xorg/xaalocal.h
|
||||
include/xorg/xace.h
|
||||
include/xorg/xacestr.h
|
||||
include/xorg/xf86.h
|
||||
include/xorg/xf86Crtc.h
|
||||
include/xorg/xf86Cursor.h
|
||||
include/xorg/xf86DDC.h
|
||||
include/xorg/xf86Modes.h
|
||||
include/xorg/xf86Module.h
|
||||
include/xorg/xf86Opt.h
|
||||
include/xorg/xf86Optionstr.h
|
||||
include/xorg/xf86Optrec.h
|
||||
include/xorg/xf86Parser.h
|
||||
include/xorg/xf86Pci.h
|
||||
include/xorg/xf86PciInfo.h
|
||||
include/xorg/xf86Priv.h
|
||||
include/xorg/xf86Privstr.h
|
||||
include/xorg/xf86RamDac.h
|
||||
include/xorg/xf86RandR12.h
|
||||
${PLIST.sparc}include/xorg/xf86Sbus.h
|
||||
include/xorg/xf86Rename.h
|
||||
include/xorg/xf86VGAarbiter.h
|
||||
include/xorg/xf86Xinput.h
|
||||
include/xorg/xf86_OSlib.h
|
||||
include/xorg/xf86_OSproc.h
|
||||
include/xorg/xf86cmap.h
|
||||
include/xorg/xf86fbman.h
|
||||
include/xorg/xf86i2c.h
|
||||
include/xorg/xf86int10.h
|
||||
include/xorg/xf86sbusBus.h
|
||||
include/xorg/xf86str.h
|
||||
include/xorg/xf86xv.h
|
||||
include/xorg/xf86xvmc.h
|
||||
include/xorg/xf86xvpriv.h
|
||||
include/xorg/xfixes.h
|
||||
include/xorg/xisb.h
|
||||
include/xorg/xkbfile.h
|
||||
include/xorg/xkbrules.h
|
||||
include/xorg/xkbsrv.h
|
||||
include/xorg/xkbstr.h
|
||||
include/xorg/xorg-server.h
|
||||
include/xorg/xorgVersion.h
|
||||
include/xorg/xserver-properties.h
|
||||
include/xorg/xvdix.h
|
||||
include/xorg/xvmcext.h
|
||||
lib/pkgconfig/xorg-server.pc
|
||||
${PLIST.dri}lib/xorg/modules/extensions/libdbe.la
|
||||
${PLIST.dri}lib/xorg/modules/extensions/libdri.la
|
||||
${PLIST.dri}lib/xorg/modules/extensions/libdri2.la
|
||||
${PLIST.dri}lib/xorg/modules/extensions/libextmod.la
|
||||
${PLIST.dri}lib/xorg/modules/extensions/libglx.la
|
||||
${PLIST.dri}lib/xorg/modules/extensions/librecord.la
|
||||
lib/xorg/modules/libexa.la
|
||||
lib/xorg/modules/libfb.la
|
||||
lib/xorg/modules/libfbdevhw.la
|
||||
lib/xorg/modules/libint10.la
|
||||
lib/xorg/modules/libshadow.la
|
||||
lib/xorg/modules/libshadowfb.la
|
||||
lib/xorg/modules/libvbe.la
|
||||
lib/xorg/modules/libvgahw.la
|
||||
lib/xorg/modules/libwfb.la
|
||||
lib/xorg/modules/libxaa.la
|
||||
lib/xorg/modules/multimedia/bt829_drv.la
|
||||
lib/xorg/modules/multimedia/fi1236_drv.la
|
||||
lib/xorg/modules/multimedia/msp3430_drv.la
|
||||
lib/xorg/modules/multimedia/tda8425_drv.la
|
||||
lib/xorg/modules/multimedia/tda9850_drv.la
|
||||
lib/xorg/modules/multimedia/tda9885_drv.la
|
||||
lib/xorg/modules/multimedia/uda1380_drv.la
|
||||
lib/xorg/protocol.txt
|
||||
man/man1/Xnest.1
|
||||
man/man1/Xorg.1
|
||||
man/man1/Xserver.1
|
||||
man/man1/Xvfb.1
|
||||
man/man1/cvt.1
|
||||
man/man1/gtf.1
|
||||
man/man4/exa.4
|
||||
man/man4/fbdevhw.4
|
||||
man/man5/xorg.conf.5
|
||||
man/man5/xorg.conf.d.5
|
||||
share/aclocal/xorg-server.m4
|
||||
${PLIST.dtrace}share/doc/xorg-server/Xserver-DTrace.xml
|
||||
@pkgdir lib/xorg/modules/input
|
||||
@pkgdir lib/xorg/modules/drivers
|
|
@ -1,77 +0,0 @@
|
|||
$NetBSD: distinfo,v 1.5 2017/03/23 17:07:02 joerg Exp $
|
||||
|
||||
SHA1 (xorg-server-1.12.4.tar.bz2) = 6d616874f9c7677bda08dc073c03f83e78fbc585
|
||||
RMD160 (xorg-server-1.12.4.tar.bz2) = 4907b5dc42efd6b3fb6bf9d64f1441080a6a6983
|
||||
SHA512 (xorg-server-1.12.4.tar.bz2) = 70997e8ba4f948829c158e52924753c5691a783dd14e5a86fdce4fc601638dd4e0b281590876b0315a303bf8d5195bdf43ede7113d1d569415a41ab03d938d85
|
||||
Size (xorg-server-1.12.4.tar.bz2) = 5444761 bytes
|
||||
SHA1 (patch-Xext_xcmisc.c) = 8bf7ff8c928b14f6e98d2f1240ea5736bcf43021
|
||||
SHA1 (patch-Xext_xvdisp.c) = 5c85a221d11f9893bc68d223cf75e63c00586a9f
|
||||
SHA1 (patch-Xi_chgdctl.c) = 0bba99d4fe90832d9f364aa4d2eef4ba7f18ff24
|
||||
SHA1 (patch-Xi_chgfctl.c) = 1fb0fb890fc28e5374a00cc29aeee8ae1401f41c
|
||||
SHA1 (patch-Xi_sendexev.c) = 387d7382ad31b85530cdfb068831b29cf2f15755
|
||||
SHA1 (patch-Xi_xiallowev.c) = 4d10addbd669bd3b867b6e209e876806c402f3e2
|
||||
SHA1 (patch-Xi_xichangecursor.c) = f123415ca0b481bca7f43731992d8ce3ef842aac
|
||||
SHA1 (patch-Xi_xichangehierarchy.c) = 35ac279d2f7c4ed57bc583df2067a13c1dbee1bf
|
||||
SHA1 (patch-Xi_xigetclientpointer.c) = 7bac39459d98cf13fcd33582a594f67c53936881
|
||||
SHA1 (patch-Xi_xigrabdev.c) = 882474440142ffd1874b018d2cb3bceeff3c12ce
|
||||
SHA1 (patch-Xi_xipassivegrab.c) = 2a8c97b5e963ae48711db4e9e6c1e7fc6d49d645
|
||||
SHA1 (patch-Xi_xiproperty.c) = ba3fd9f9305f95ecf616cea5b221aa2a5de03096
|
||||
SHA1 (patch-Xi_xiquerydevice.c) = 33d70ace5b969521e573eb4ce416185b910374db
|
||||
SHA1 (patch-Xi_xiquerypointer.c) = e9dc180b4697d7a519d470e4f879a61dd64be2f2
|
||||
SHA1 (patch-Xi_xiselectev.c) = a17d893af3855f8676f4747defcb2b6866db0ec6
|
||||
SHA1 (patch-Xi_xisetclientpointer.c) = 3e1c4c7087383474f39362f9b53bc449d35b28ee
|
||||
SHA1 (patch-Xi_xisetdevfocus.c) = add3a8f096fa90c9966128f8641e447c570a8a11
|
||||
SHA1 (patch-Xi_xiwarppointer.c) = 0567dcc1ff2f8de4fa5caf865edd084611ff8c5c
|
||||
SHA1 (patch-configure) = 031bc0accf1dd71ed687e7aac3fcc9498cb06784
|
||||
SHA1 (patch-configure.ac) = c7dc061377e3bb25425ad3f418c40a45a0e55440
|
||||
SHA1 (patch-dbe_dbe.c) = 7c31812b30613b42e509677b6a430d261046a77a
|
||||
SHA1 (patch-dix_dispatch.c) = 454ce12b27d3906b22f32d7d4c1a3a6a6fb549e3
|
||||
SHA1 (patch-dix_dixfonts.c) = 2f1fd51c538eab12c06b85c4ddab18af25338174
|
||||
SHA1 (patch-dix_region.c) = 0a7fe6f67c4780c003f1e662be20e2294a7562f2
|
||||
SHA1 (patch-exa_exa__render.c) = e20fd4a8d30162d3d7b084ed2dbd46779387f25a
|
||||
SHA1 (patch-glx_glxcmds.c) = 2566885001178f47eb151a2ef84450b60137f3c1
|
||||
SHA1 (patch-glx_glxcmdsswap.c) = b9a0d5386ba928d2db95885f0b68414ffbae71ef
|
||||
SHA1 (patch-glx_glxserver.h) = 47bd1cc49dbf761c042f00adc6db8cec2a038501
|
||||
SHA1 (patch-glx_indirect__program.c) = fb49f91690ff3488e11f4708f23aaa358f98d40c
|
||||
SHA1 (patch-glx_indirect__reqsize.c) = 0b0305bb8b6a215f0e7548bf85ea571bed8df00b
|
||||
SHA1 (patch-glx_indirect__reqsize.h) = fa963a97083dc5b0cf6f80b76905ce1f21ea0d5e
|
||||
SHA1 (patch-glx_indirect__texture__compression.c) = b2af15e99e65c7f43a0218f6813b5bd4407618ea
|
||||
SHA1 (patch-glx_indirect__util.c) = 182c3c5768e87118ace979304a350c137a1119db
|
||||
SHA1 (patch-glx_rensize.c) = 574c5bf883ba9046e5cab52c0bd2919440ad1460
|
||||
SHA1 (patch-glx_single2.c) = 05cd1c9ba051561d68a28e23af7a5e7aaa942b82
|
||||
SHA1 (patch-glx_single2swap.c) = 900787c9b5e5f842141ea146f1b06740cfa7aa81
|
||||
SHA1 (patch-glx_singlepix.c) = 72ac42939b37ae0d57fc06453344ca76cdf2c856
|
||||
SHA1 (patch-glx_singlepixswap.c) = 1e3d54d3082a59d21edd81276980b953efc39ebb
|
||||
SHA1 (patch-glx_swap__interval.c) = 2ff4e2e7d2793dd8558b04c1f72abfa81998f2c6
|
||||
SHA1 (patch-glx_unpack.h) = 5ae5c10c93835cb51c08f5dae05c5a5e2afaad98
|
||||
SHA1 (patch-hw_xfree86_common_compiler.h) = 55ddbe73946ca3d3d8c5c398838cbfa60f06af42
|
||||
SHA1 (patch-hw_xfree86_common_xf86sbusBus.h) = 9095519b466df814bd8a7bc1decbc186d997c5cd
|
||||
SHA1 (patch-hw_xfree86_dri2_dri2.c) = 32a8c309f9ae417c99fe81b6a9c3b1f402880981
|
||||
SHA1 (patch-hw_xfree86_dri2_dri2ext.c) = bc2b57e4bef5ae386d1d3a015c01d243f8880ab4
|
||||
SHA1 (patch-hw_xfree86_os-support_bsd_sparc64__video.c) = d85331bbcf14ccae99bd8485aff8055a9f470f27
|
||||
SHA1 (patch-hw_xfree86_os-support_bus_Sbus.c) = f4e1d8b6ac917e0310e64409f1e4dd246a6107b3
|
||||
SHA1 (patch-hw_xfree86_os-support_bus_xf86Sbus.h) = b05b6c6f7c68bdbfd98b559d9b87a35c229fb946
|
||||
SHA1 (patch-hw_xfree86_os-support_xf86__OSlib.h) = 7c2760509610b44915da077b22899bef9c338cc1
|
||||
SHA1 (patch-include_dix.h) = ab0dc2debd87f29c0ac7f971a3cad4850b239c3a
|
||||
SHA1 (patch-include_regionstr.h) = c6f3e3b263593b622e7087d3ebe2b470cf9526e3
|
||||
SHA1 (patch-os_WaitFor.c) = a76c5ef4e3725f5299fa3f0860183e89c6004a71
|
||||
SHA1 (patch-os_access.c) = 94ee087d68bc9ba713dbe42102f971a1b8e6a3c4
|
||||
SHA1 (patch-os_connection.c) = d6b9bbc1ab34cec6457aa68546105ea5deb6ded6
|
||||
SHA1 (patch-os_io.c) = 6216e35e780706a8d5aaa60652c9ae7b4ec8e6e6
|
||||
SHA1 (patch-os_rpcauth.c) = 6617d5ef0e3cc5e9e10cd8db74f87e347e52ebe3
|
||||
SHA1 (patch-os_xdmcp.c) = 9252ad64caa8429650545c79f78c5dcdaf5b33b8
|
||||
SHA1 (patch-randr_randr.c) = e8d2b72f8230a2a8a6ade47f5459ec9b0849ed0b
|
||||
SHA1 (patch-randr_randrstr.h) = f634438dda61111b3bf3b77580951a638fbdea10
|
||||
SHA1 (patch-randr_rrsdispatch.c) = 13a2e819fea3ab8fa4caee7f9450a518ac41e517
|
||||
SHA1 (patch-render_picture.h) = ec7085022e2c896daaa91378632003aabd957f5e
|
||||
SHA1 (patch-render_render.c) = f86496fc392681d2fba3c50bbd37b24b78bed682
|
||||
SHA1 (patch-test_Makefile.am) = 77caa0c25103307d5bd30178f72e552dbae9555a
|
||||
SHA1 (patch-test_misc.c) = 1615c03ceb595fa976a571455723665025c14aa0
|
||||
SHA1 (patch-test_xi1_Makefile.am) = c5b7a86f6b4e8381c3063fa840de5e238a5877a4
|
||||
SHA1 (patch-test_xi1_protocol-xchangedevicecontrol.c) = e3efd2a5e8f93f6acf2f561451ca3d26a70ad826
|
||||
SHA1 (patch-test_xi2_protocol-xigetclientpointer.c) = e2eb3995d0bae797ba86d81165930dcd7365c74d
|
||||
SHA1 (patch-test_xi2_protocol-xipassivegrabdevice.c) = 503566a73fe797a98f637fb9dd497d55e7e7db1d
|
||||
SHA1 (patch-test_xi2_protocol-xiquerypointer.c) = 6594dff2bccac46aa4b8aec7c517d122517407ad
|
||||
SHA1 (patch-test_xi2_protocol-xiwarppointer.c) = fda57d72b963890478e8e78dfbe2864eb51971d2
|
||||
SHA1 (patch-xfixes_select.c) = 0f0dac08732a54112a2f0a7b3f1393a28fbfd8bc
|
||||
SHA1 (patch-xkb_xkb.c) = 95861e071546428ab5ada2365e2b8201f238577c
|
|
@ -1,41 +0,0 @@
|
|||
# $NetBSD: options.mk,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.modular-xorg-server
|
||||
PKG_SUPPORTED_OPTIONS= dri inet6 debug dtrace
|
||||
PKG_SUGGESTED_OPTIONS= dri inet6
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
PLIST_VARS+= dri dtrace
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdri)
|
||||
PLIST.dri= yes
|
||||
CONFIGURE_ARGS+= --enable-dri
|
||||
CONFIGURE_ARGS+= --enable-glx
|
||||
CONFIGURE_ARGS+= --enable-aiglx
|
||||
.else
|
||||
###
|
||||
### XXX Perhaps we should allow for a built-in glx without dri enabled?
|
||||
###
|
||||
CONFIGURE_ARGS+= --disable-dri
|
||||
CONFIGURE_ARGS+= --disable-glx
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Minet6)
|
||||
CONFIGURE_ARGS+= --enable-ipv6
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-ipv6
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdebug)
|
||||
CONFIGURE_ARGS+= --enable-debug
|
||||
CFLAGS+= -ggdb
|
||||
.endif
|
||||
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdtrace)
|
||||
PLIST.dtrace= yes
|
||||
CONFIGURE_ARGS+= --with-dtrace
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-dtrace
|
||||
.endif
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-Xext_xcmisc.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xext/xcmisc.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xext/xcmisc.c
|
||||
@@ -161,6 +161,7 @@ static int
|
||||
SProcXCMiscGetXIDList(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXCMiscGetXIDListReq);
|
||||
+ REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->count);
|
|
@ -1,167 +0,0 @@
|
|||
$NetBSD: patch-Xext_xvdisp.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xext/xvdisp.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xext/xvdisp.c
|
||||
@@ -1202,6 +1202,7 @@ static int
|
||||
SProcXvQueryExtension(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvQueryExtensionReq);
|
||||
+ REQUEST_SIZE_MATCH(xvQueryExtensionReq);
|
||||
swaps(&stuff->length);
|
||||
return XvProcVector[xv_QueryExtension] (client);
|
||||
}
|
||||
@@ -1210,6 +1211,7 @@ static int
|
||||
SProcXvQueryAdaptors(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvQueryAdaptorsReq);
|
||||
+ REQUEST_SIZE_MATCH(xvQueryAdaptorsReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->window);
|
||||
return XvProcVector[xv_QueryAdaptors] (client);
|
||||
@@ -1219,6 +1221,7 @@ static int
|
||||
SProcXvQueryEncodings(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvQueryEncodingsReq);
|
||||
+ REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
return XvProcVector[xv_QueryEncodings] (client);
|
||||
@@ -1228,6 +1231,7 @@ static int
|
||||
SProcXvGrabPort(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvGrabPortReq);
|
||||
+ REQUEST_SIZE_MATCH(xvGrabPortReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->time);
|
||||
@@ -1238,6 +1242,7 @@ static int
|
||||
SProcXvUngrabPort(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvUngrabPortReq);
|
||||
+ REQUEST_SIZE_MATCH(xvUngrabPortReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->time);
|
||||
@@ -1248,6 +1253,7 @@ static int
|
||||
SProcXvPutVideo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvPutVideoReq);
|
||||
+ REQUEST_SIZE_MATCH(xvPutVideoReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
@@ -1267,6 +1273,7 @@ static int
|
||||
SProcXvPutStill(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvPutStillReq);
|
||||
+ REQUEST_SIZE_MATCH(xvPutStillReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
@@ -1286,6 +1293,7 @@ static int
|
||||
SProcXvGetVideo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvGetVideoReq);
|
||||
+ REQUEST_SIZE_MATCH(xvGetVideoReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
@@ -1305,6 +1313,7 @@ static int
|
||||
SProcXvGetStill(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvGetStillReq);
|
||||
+ REQUEST_SIZE_MATCH(xvGetStillReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
@@ -1324,6 +1333,7 @@ static int
|
||||
SProcXvPutImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvPutImageReq);
|
||||
+ REQUEST_AT_LEAST_SIZE(xvPutImageReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
@@ -1347,6 +1357,7 @@ static int
|
||||
SProcXvShmPutImage(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvShmPutImageReq);
|
||||
+ REQUEST_SIZE_MATCH(xvShmPutImageReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
@@ -1374,6 +1385,7 @@ static int
|
||||
SProcXvSelectVideoNotify(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvSelectVideoNotifyReq);
|
||||
+ REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->drawable);
|
||||
return XvProcVector[xv_SelectVideoNotify] (client);
|
||||
@@ -1383,6 +1395,7 @@ static int
|
||||
SProcXvSelectPortNotify(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvSelectPortNotifyReq);
|
||||
+ REQUEST_SIZE_MATCH(xvSelectPortNotifyReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
return XvProcVector[xv_SelectPortNotify] (client);
|
||||
@@ -1392,6 +1405,7 @@ static int
|
||||
SProcXvStopVideo(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvStopVideoReq);
|
||||
+ REQUEST_SIZE_MATCH(xvStopVideoReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->drawable);
|
||||
@@ -1402,6 +1416,7 @@ static int
|
||||
SProcXvSetPortAttribute(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvSetPortAttributeReq);
|
||||
+ REQUEST_SIZE_MATCH(xvSetPortAttributeReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->attribute);
|
||||
@@ -1413,6 +1428,7 @@ static int
|
||||
SProcXvGetPortAttribute(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvGetPortAttributeReq);
|
||||
+ REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->attribute);
|
||||
@@ -1423,6 +1439,7 @@ static int
|
||||
SProcXvQueryBestSize(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvQueryBestSizeReq);
|
||||
+ REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swaps(&stuff->vid_w);
|
||||
@@ -1436,6 +1453,7 @@ static int
|
||||
SProcXvQueryPortAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvQueryPortAttributesReq);
|
||||
+ REQUEST_SIZE_MATCH(xvQueryPortAttributesReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
return XvProcVector[xv_QueryPortAttributes] (client);
|
||||
@@ -1445,6 +1463,7 @@ static int
|
||||
SProcXvQueryImageAttributes(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvQueryImageAttributesReq);
|
||||
+ REQUEST_SIZE_MATCH(xvQueryImageAttributesReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
swapl(&stuff->id);
|
||||
@@ -1457,6 +1476,7 @@ static int
|
||||
SProcXvListImageFormats(ClientPtr client)
|
||||
{
|
||||
REQUEST(xvListImageFormatsReq);
|
||||
+ REQUEST_SIZE_MATCH(xvListImageFormatsReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->port);
|
||||
return XvProcVector[xv_ListImageFormats] (client);
|
|
@ -1,36 +0,0 @@
|
|||
$NetBSD: patch-Xi_chgdctl.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/chgdctl.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/chgdctl.c
|
||||
@@ -78,7 +78,7 @@ SProcXChangeDeviceControl(ClientPtr clie
|
||||
|
||||
REQUEST(xChangeDeviceControlReq);
|
||||
swaps(&stuff->length);
|
||||
- REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
|
||||
+ REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
|
||||
swaps(&stuff->control);
|
||||
ctl = (xDeviceCtl *) &stuff[1];
|
||||
swaps(&ctl->control);
|
||||
@@ -116,7 +116,7 @@ ProcXChangeDeviceControl(ClientPtr clien
|
||||
devicePresenceNotify dpn;
|
||||
|
||||
REQUEST(xChangeDeviceControlReq);
|
||||
- REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq);
|
||||
+ REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
|
||||
|
||||
len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq));
|
||||
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess);
|
||||
@@ -184,6 +184,10 @@ ProcXChangeDeviceControl(ClientPtr clien
|
||||
break;
|
||||
case DEVICE_ENABLE:
|
||||
e = (xDeviceEnableCtl *) &stuff[1];
|
||||
+ if ((len != bytes_to_int32(sizeof(xDeviceEnableCtl)))) {
|
||||
+ ret = BadLength;
|
||||
+ goto out;
|
||||
+ }
|
||||
|
||||
status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e);
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-Xi_chgfctl.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/chgfctl.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/chgfctl.c
|
||||
@@ -467,6 +467,8 @@ ProcXChangeFeedbackControl(ClientPtr cli
|
||||
xStringFeedbackCtl *f = ((xStringFeedbackCtl *) &stuff[1]);
|
||||
|
||||
if (client->swapped) {
|
||||
+ if (len < bytes_to_int32(sizeof(xStringFeedbackCtl)))
|
||||
+ return BadLength;
|
||||
swaps(&f->num_keysyms);
|
||||
}
|
||||
if (len !=
|
|
@ -1,17 +0,0 @@
|
|||
$NetBSD: patch-Xi_sendexev.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/sendexev.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/sendexev.c
|
||||
@@ -135,6 +135,9 @@ ProcXSendExtensionEvent(ClientPtr client
|
||||
if (ret != Success)
|
||||
return ret;
|
||||
|
||||
+ if (stuff->num_events == 0)
|
||||
+ return ret;
|
||||
+
|
||||
/* The client's event type must be one defined by an extension. */
|
||||
|
||||
first = ((xEvent *) &stuff[1]);
|
|
@ -1,23 +0,0 @@
|
|||
$NetBSD: patch-Xi_xiallowev.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xiallowev.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xiallowev.c
|
||||
@@ -48,6 +48,7 @@ int
|
||||
SProcXIAllowEvents(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIAllowEventsReq);
|
||||
+ REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
@@ -55,6 +56,7 @@ SProcXIAllowEvents(ClientPtr client)
|
||||
if (stuff->length > 3) {
|
||||
xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq *) stuff;
|
||||
|
||||
+ REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
|
||||
swapl(&req_xi22->touchid);
|
||||
swapl(&req_xi22->grab_window);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
$NetBSD: patch-Xi_xichangecursor.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xichangecursor.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xichangecursor.c
|
||||
@@ -57,11 +57,11 @@ int
|
||||
SProcXIChangeCursor(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIChangeCursorReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIChangeCursorReq);
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->win);
|
||||
swapl(&stuff->cursor);
|
||||
swaps(&stuff->deviceid);
|
||||
- REQUEST_SIZE_MATCH(xXIChangeCursorReq);
|
||||
return (ProcXIChangeCursor(client));
|
||||
}
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
$NetBSD: patch-Xi_xichangehierarchy.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xichangehierarchy.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xichangehierarchy.c
|
||||
@@ -407,7 +407,7 @@ int
|
||||
ProcXIChangeHierarchy(ClientPtr client)
|
||||
{
|
||||
xXIAnyHierarchyChangeInfo *any;
|
||||
- int required_len = sizeof(xXIChangeHierarchyReq);
|
||||
+ size_t len; /* length of data remaining in request */
|
||||
int rc = Success;
|
||||
int flags[MAXDEVICES] = { 0 };
|
||||
|
||||
@@ -417,21 +417,46 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
if (!stuff->num_changes)
|
||||
return rc;
|
||||
|
||||
+ if (stuff->length > (INT_MAX >> 2))
|
||||
+ return BadAlloc;
|
||||
+ len = (stuff->length << 2) - sizeof(xXIAnyHierarchyChangeInfo);
|
||||
+
|
||||
any = (xXIAnyHierarchyChangeInfo *) &stuff[1];
|
||||
while (stuff->num_changes--) {
|
||||
+ if (len < sizeof(xXIAnyHierarchyChangeInfo)) {
|
||||
+ rc = BadLength;
|
||||
+ goto unwind;
|
||||
+ }
|
||||
+
|
||||
SWAPIF(swaps(&any->type));
|
||||
SWAPIF(swaps(&any->length));
|
||||
|
||||
- required_len += any->length;
|
||||
- if ((stuff->length * 4) < required_len)
|
||||
+ if ((any->length > (INT_MAX >> 2)) || (len < (any->length << 2)))
|
||||
return BadLength;
|
||||
|
||||
+#define CHANGE_SIZE_MATCH(type) \
|
||||
+ do { \
|
||||
+ if ((len < sizeof(type)) || (any->length != (sizeof(type) >> 2))) { \
|
||||
+ rc = BadLength; \
|
||||
+ goto unwind; \
|
||||
+ } \
|
||||
+ } while(0)
|
||||
+
|
||||
switch (any->type) {
|
||||
case XIAddMaster:
|
||||
{
|
||||
xXIAddMasterInfo *c = (xXIAddMasterInfo *) any;
|
||||
|
||||
+ /* Variable length, due to appended name string */
|
||||
+ if (len < sizeof(xXIAddMasterInfo)) {
|
||||
+ rc = BadLength;
|
||||
+ goto unwind;
|
||||
+ }
|
||||
SWAPIF(swaps(&c->name_len));
|
||||
+ if (c->name_len > (len - sizeof(xXIAddMasterInfo))) {
|
||||
+ rc = BadLength;
|
||||
+ goto unwind;
|
||||
+ }
|
||||
|
||||
rc = add_master(client, c, flags);
|
||||
if (rc != Success)
|
||||
@@ -442,6 +467,7 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
{
|
||||
xXIRemoveMasterInfo *r = (xXIRemoveMasterInfo *) any;
|
||||
|
||||
+ CHANGE_SIZE_MATCH(xXIRemoveMasterInfo);
|
||||
rc = remove_master(client, r, flags);
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
@@ -451,6 +477,7 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
{
|
||||
xXIDetachSlaveInfo *c = (xXIDetachSlaveInfo *) any;
|
||||
|
||||
+ CHANGE_SIZE_MATCH(xXIDetachSlaveInfo);
|
||||
rc = detach_slave(client, c, flags);
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
@@ -460,6 +487,7 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
{
|
||||
xXIAttachSlaveInfo *c = (xXIAttachSlaveInfo *) any;
|
||||
|
||||
+ CHANGE_SIZE_MATCH(xXIAttachSlaveInfo);
|
||||
rc = attach_slave(client, c, flags);
|
||||
if (rc != Success)
|
||||
goto unwind;
|
||||
@@ -467,6 +495,7 @@ ProcXIChangeHierarchy(ClientPtr client)
|
||||
break;
|
||||
}
|
||||
|
||||
+ len -= any->length * 4;
|
||||
any = (xXIAnyHierarchyChangeInfo *) ((char *) any + any->length * 4);
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-Xi_xigetclientpointer.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xigetclientpointer.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xigetclientpointer.c
|
||||
@@ -50,6 +50,7 @@ int
|
||||
SProcXIGetClientPointer(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIGetClientPointerReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIGetClientPointerReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->win);
|
|
@ -1,44 +0,0 @@
|
|||
$NetBSD: patch-Xi_xigrabdev.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xigrabdev.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xigrabdev.c
|
||||
@@ -47,6 +47,11 @@ int
|
||||
SProcXIGrabDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIGrabDeviceReq);
|
||||
+ /*
|
||||
+ * Check here for at least the length of the struct we swap, then
|
||||
+ * let ProcXIGrabDevice check the full size after we swap mask_len.
|
||||
+ */
|
||||
+ REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
@@ -69,7 +74,7 @@ ProcXIGrabDevice(ClientPtr client)
|
||||
int mask_len;
|
||||
|
||||
REQUEST(xXIGrabDeviceReq);
|
||||
- REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
|
||||
+ REQUEST_FIXED_SIZE(xXIGrabDeviceReq, ((size_t) stuff->mask_len) * 4);
|
||||
|
||||
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess);
|
||||
if (ret != Success)
|
||||
@@ -118,6 +123,7 @@ int
|
||||
SProcXIUngrabDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIUngrabDeviceReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
@@ -135,6 +141,7 @@ ProcXIUngrabDevice(ClientPtr client)
|
||||
TimeStamp time;
|
||||
|
||||
REQUEST(xXIUngrabDeviceReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
|
||||
|
||||
ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
|
||||
if (ret != Success)
|
|
@ -1,61 +0,0 @@
|
|||
$NetBSD: patch-Xi_xipassivegrab.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xipassivegrab.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xipassivegrab.c
|
||||
@@ -53,6 +53,7 @@ SProcXIPassiveGrabDevice(ClientPtr clien
|
||||
xXIModifierInfo *mods;
|
||||
|
||||
REQUEST(xXIPassiveGrabDeviceReq);
|
||||
+ REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
@@ -63,6 +64,8 @@ SProcXIPassiveGrabDevice(ClientPtr clien
|
||||
swaps(&stuff->mask_len);
|
||||
swaps(&stuff->num_modifiers);
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq,
|
||||
+ ((uint32_t) stuff->mask_len + stuff->num_modifiers) *4);
|
||||
mods = (xXIModifierInfo *) &stuff[1];
|
||||
|
||||
for (i = 0; i < stuff->num_modifiers; i++, mods++) {
|
||||
@@ -88,7 +91,8 @@ ProcXIPassiveGrabDevice(ClientPtr client
|
||||
int mask_len;
|
||||
|
||||
REQUEST(xXIPassiveGrabDeviceReq);
|
||||
- REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
|
||||
+ REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq,
|
||||
+ ((uint32_t) stuff->mask_len + stuff->num_modifiers) * 4);
|
||||
|
||||
if (stuff->deviceid == XIAllDevices)
|
||||
dev = inputInfo.all_devices;
|
||||
@@ -250,6 +254,7 @@ SProcXIPassiveUngrabDevice(ClientPtr cli
|
||||
uint32_t *modifiers;
|
||||
|
||||
REQUEST(xXIPassiveUngrabDeviceReq);
|
||||
+ REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->grab_window);
|
||||
@@ -257,6 +262,8 @@ SProcXIPassiveUngrabDevice(ClientPtr cli
|
||||
swapl(&stuff->detail);
|
||||
swaps(&stuff->num_modifiers);
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xXIPassiveUngrabDeviceReq,
|
||||
+ ((uint32_t) stuff->num_modifiers) << 2);
|
||||
modifiers = (uint32_t *) &stuff[1];
|
||||
|
||||
for (i = 0; i < stuff->num_modifiers; i++, modifiers++)
|
||||
@@ -275,7 +282,8 @@ ProcXIPassiveUngrabDevice(ClientPtr clie
|
||||
int i, rc;
|
||||
|
||||
REQUEST(xXIPassiveUngrabDeviceReq);
|
||||
- REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
|
||||
+ REQUEST_FIXED_SIZE(xXIPassiveUngrabDeviceReq,
|
||||
+ ((uint32_t) stuff->num_modifiers) << 2);
|
||||
|
||||
if (stuff->deviceid == XIAllDevices)
|
||||
dev = inputInfo.all_devices;
|
|
@ -1,88 +0,0 @@
|
|||
$NetBSD: patch-Xi_xiproperty.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xiproperty.c.orig 2012-08-19 15:45:55.000000000 +0000
|
||||
+++ Xi/xiproperty.c
|
||||
@@ -1007,10 +1007,9 @@ int
|
||||
SProcXListDeviceProperties(ClientPtr client)
|
||||
{
|
||||
REQUEST(xListDevicePropertiesReq);
|
||||
+ REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
-
|
||||
- REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
|
||||
return (ProcXListDeviceProperties(client));
|
||||
}
|
||||
|
||||
@@ -1031,10 +1030,10 @@ int
|
||||
SProcXDeleteDeviceProperty(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDeleteDevicePropertyReq);
|
||||
+ REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->property);
|
||||
- REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
|
||||
return (ProcXDeleteDeviceProperty(client));
|
||||
}
|
||||
|
||||
@@ -1042,13 +1041,13 @@ int
|
||||
SProcXGetDeviceProperty(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGetDevicePropertyReq);
|
||||
+ REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->property);
|
||||
swapl(&stuff->type);
|
||||
swapl(&stuff->longOffset);
|
||||
swapl(&stuff->longLength);
|
||||
- REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
|
||||
return (ProcXGetDeviceProperty(client));
|
||||
}
|
||||
|
||||
@@ -1243,11 +1242,10 @@ int
|
||||
SProcXIListProperties(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIListPropertiesReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIListPropertiesReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
-
|
||||
- REQUEST_SIZE_MATCH(xXIListPropertiesReq);
|
||||
return (ProcXIListProperties(client));
|
||||
}
|
||||
|
||||
@@ -1269,11 +1267,11 @@ int
|
||||
SProcXIDeleteProperty(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIDeletePropertyReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->property);
|
||||
- REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
|
||||
return (ProcXIDeleteProperty(client));
|
||||
}
|
||||
|
||||
@@ -1281,6 +1279,7 @@ int
|
||||
SProcXIGetProperty(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIGetPropertyReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIGetPropertyReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
@@ -1288,7 +1287,6 @@ SProcXIGetProperty(ClientPtr client)
|
||||
swapl(&stuff->type);
|
||||
swapl(&stuff->offset);
|
||||
swapl(&stuff->len);
|
||||
- REQUEST_SIZE_MATCH(xXIGetPropertyReq);
|
||||
return (ProcXIGetProperty(client));
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-Xi_xiquerydevice.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xiquerydevice.c.orig 2012-07-24 04:36:54.000000000 +0000
|
||||
+++ Xi/xiquerydevice.c
|
||||
@@ -54,6 +54,7 @@ int
|
||||
SProcXIQueryDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIQueryDeviceReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
|
||||
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-Xi_xiquerypointer.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xiquerypointer.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xiquerypointer.c
|
||||
@@ -62,6 +62,8 @@ int
|
||||
SProcXIQueryPointer(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIQueryPointerReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIQueryPointerReq);
|
||||
+
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->win);
|
|
@ -1,33 +0,0 @@
|
|||
$NetBSD: patch-Xi_xiselectev.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xiselectev.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xiselectev.c
|
||||
@@ -63,6 +63,7 @@ int
|
||||
SProcXISelectEvents(ClientPtr client)
|
||||
{
|
||||
int i;
|
||||
+ int len;
|
||||
xXIEventMask *evmask;
|
||||
|
||||
REQUEST(xXISelectEventsReq);
|
||||
@@ -71,10 +72,17 @@ SProcXISelectEvents(ClientPtr client)
|
||||
swapl(&stuff->win);
|
||||
swaps(&stuff->num_masks);
|
||||
|
||||
+ len = stuff->length - bytes_to_int32(sizeof(xXISelectEventsReq));
|
||||
evmask = (xXIEventMask *) &stuff[1];
|
||||
for (i = 0; i < stuff->num_masks; i++) {
|
||||
+ if (len < bytes_to_int32(sizeof(xXIEventMask)))
|
||||
+ return BadLength;
|
||||
+ len -= bytes_to_int32(sizeof(xXIEventMask));
|
||||
swaps(&evmask->deviceid);
|
||||
swaps(&evmask->mask_len);
|
||||
+ if (len < evmask->mask_len)
|
||||
+ return BadLength;
|
||||
+ len -= evmask->mask_len;
|
||||
evmask =
|
||||
(xXIEventMask *) (((char *) &evmask[1]) + evmask->mask_len * 4);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
$NetBSD: patch-Xi_xisetclientpointer.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xisetclientpointer.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xisetclientpointer.c
|
||||
@@ -51,10 +51,11 @@ int
|
||||
SProcXISetClientPointer(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXISetClientPointerReq);
|
||||
+ REQUEST_SIZE_MATCH(xXISetClientPointerReq);
|
||||
+
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->win);
|
||||
swaps(&stuff->deviceid);
|
||||
- REQUEST_SIZE_MATCH(xXISetClientPointerReq);
|
||||
return (ProcXISetClientPointer(client));
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
$NetBSD: patch-Xi_xisetdevfocus.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xisetdevfocus.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xisetdevfocus.c
|
||||
@@ -44,6 +44,8 @@ int
|
||||
SProcXISetFocus(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXISetFocusReq);
|
||||
+ REQUEST_AT_LEAST_SIZE(xXISetFocusReq);
|
||||
+
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
swapl(&stuff->focus);
|
||||
@@ -56,6 +58,8 @@ int
|
||||
SProcXIGetFocus(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIGetFocusReq);
|
||||
+ REQUEST_AT_LEAST_SIZE(xXIGetFocusReq);
|
||||
+
|
||||
swaps(&stuff->length);
|
||||
swaps(&stuff->deviceid);
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-Xi_xiwarppointer.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- Xi/xiwarppointer.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ Xi/xiwarppointer.c
|
||||
@@ -56,6 +56,8 @@ int
|
||||
SProcXIWarpPointer(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXIWarpPointerReq);
|
||||
+ REQUEST_SIZE_MATCH(xXIWarpPointerReq);
|
||||
+
|
||||
swaps(&stuff->length);
|
||||
swapl(&stuff->src_win);
|
||||
swapl(&stuff->dst_win);
|
|
@ -1,14 +0,0 @@
|
|||
$NetBSD: patch-configure,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
Allow x86_64 as a SunOS arch.
|
||||
--- configure.orig 2009-10-12 05:04:15.000000000 +0000
|
||||
+++ configure
|
||||
@@ -18293,7 +18293,7 @@ fi
|
||||
sparc*)
|
||||
SOLARIS_INOUT_ARCH="sparcv8plus"
|
||||
;;
|
||||
- i*86)
|
||||
+ i*86|x86_64)
|
||||
if test x$SOLARIS_64 = xyes ; then
|
||||
SOLARIS_INOUT_ARCH="amd64"
|
||||
else
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-configure.ac,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- configure.ac.orig 2012-08-27 05:10:47.000000000 +0000
|
||||
+++ configure.ac
|
||||
@@ -2229,6 +2229,7 @@ hw/kdrive/fbdev/Makefile
|
||||
hw/kdrive/linux/Makefile
|
||||
hw/kdrive/src/Makefile
|
||||
test/Makefile
|
||||
+test/xi1/Makefile
|
||||
test/xi2/Makefile
|
||||
xserver.ent
|
||||
xorg-server.pc
|
|
@ -1,48 +0,0 @@
|
|||
$NetBSD: patch-dbe_dbe.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- dbe/dbe.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ dbe/dbe.c
|
||||
@@ -453,18 +453,20 @@ ProcDbeSwapBuffers(ClientPtr client)
|
||||
DbeSwapInfoPtr swapInfo;
|
||||
xDbeSwapInfo *dbeSwapInfo;
|
||||
int error;
|
||||
- register int i, j;
|
||||
- int nStuff;
|
||||
+ unsigned int i, j;
|
||||
+ unsigned int nStuff;
|
||||
|
||||
REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq);
|
||||
nStuff = stuff->n; /* use local variable for performance. */
|
||||
|
||||
if (nStuff == 0) {
|
||||
+ REQUEST_SIZE_MATCH(xDbeSwapBuffersReq);
|
||||
return Success;
|
||||
}
|
||||
|
||||
if (nStuff > UINT32_MAX / sizeof(DbeSwapInfoRec))
|
||||
return BadAlloc;
|
||||
+ REQUEST_FIXED_SIZE(xDbeSwapBuffersReq, nStuff * sizeof(xDbeSwapInfo));
|
||||
|
||||
/* Get to the swap info appended to the end of the request. */
|
||||
dbeSwapInfo = (xDbeSwapInfo *) &stuff[1];
|
||||
@@ -955,13 +957,16 @@ static int
|
||||
SProcDbeSwapBuffers(ClientPtr client)
|
||||
{
|
||||
REQUEST(xDbeSwapBuffersReq);
|
||||
- register int i;
|
||||
+ unsigned int i;
|
||||
xDbeSwapInfo *pSwapInfo;
|
||||
|
||||
swaps(&stuff->length);
|
||||
REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq);
|
||||
|
||||
swapl(&stuff->n);
|
||||
+ if (stuff->n > UINT32_MAX / sizeof(DbeSwapInfoRec))
|
||||
+ return BadAlloc;
|
||||
+ REQUEST_FIXED_SIZE(xDbeSwapBuffersReq, stuff->n * sizeof(xDbeSwapInfo));
|
||||
|
||||
if (stuff->n != 0) {
|
||||
pSwapInfo = (xDbeSwapInfo *) stuff + 1;
|
|
@ -1,17 +0,0 @@
|
|||
$NetBSD: patch-dix_dispatch.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- dix/dispatch.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ dix/dispatch.c
|
||||
@@ -1952,6 +1952,9 @@ ProcPutImage(ClientPtr client)
|
||||
tmpImage = (char *) &stuff[1];
|
||||
lengthProto = length;
|
||||
|
||||
+ if (lengthProto >= (INT32_MAX / stuff->height))
|
||||
+ return BadLength;
|
||||
+
|
||||
if ((bytes_to_int32(lengthProto * stuff->height) +
|
||||
bytes_to_int32(sizeof(xPutImageReq))) != client->req_len)
|
||||
return BadLength;
|
|
@ -1,74 +0,0 @@
|
|||
$NetBSD: patch-dix_dixfonts.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
Fix CVE-2013-4396.
|
||||
|
||||
From a4d9bf1259ad28f54b6d59a480b2009cc89ca623 Mon Sep 17 00:00:00 2001
|
||||
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Date: Mon, 16 Sep 2013 21:47:16 -0700
|
||||
Subject: [PATCH] Avoid use-after-free in dix/dixfonts.c: doImageText()
|
||||
|
||||
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 <pedrib@gmail.com>
|
||||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
||||
---
|
||||
dix/dixfonts.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
--- dix/dixfonts.c.orig 2012-05-17 17:09:01.000000000 +0000
|
||||
+++ dix/dixfonts.c
|
||||
@@ -1414,6 +1414,7 @@ doImageText(ClientPtr client, ITclosureP
|
||||
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
|
||||
@@ -1425,12 +1426,14 @@ doImageText(ClientPtr client, ITclosureP
|
||||
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;
|
||||
}
|
||||
@@ -1441,6 +1444,7 @@ doImageText(ClientPtr client, ITclosureP
|
||||
if (!pGC) {
|
||||
free(c->data);
|
||||
free(c);
|
||||
+ c = old_closure;
|
||||
err = BadAlloc;
|
||||
goto bail;
|
||||
}
|
||||
@@ -1453,6 +1457,7 @@ doImageText(ClientPtr client, ITclosureP
|
||||
FreeScratchGC(pGC);
|
||||
free(c->data);
|
||||
free(c);
|
||||
+ c = old_closure;
|
||||
err = BadAlloc;
|
||||
goto bail;
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
$NetBSD: patch-dix_region.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- dix/region.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ dix/region.c
|
||||
@@ -169,7 +169,6 @@ Equipment Corporation.
|
||||
((r1)->y1 <= (r2)->y1) && \
|
||||
((r1)->y2 >= (r2)->y2) )
|
||||
|
||||
-#define xallocData(n) malloc(RegionSizeof(n))
|
||||
#define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data)
|
||||
|
||||
#define RECTALLOC_BAIL(pReg,n,bail) \
|
||||
@@ -205,8 +204,9 @@ if (!(pReg)->data || (((pReg)->data->num
|
||||
#define DOWNSIZE(reg,numRects) \
|
||||
if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
|
||||
{ \
|
||||
- RegDataPtr NewData; \
|
||||
- NewData = (RegDataPtr)realloc((reg)->data, RegionSizeof(numRects)); \
|
||||
+ size_t NewSize = RegionSizeof(numRects); \
|
||||
+ RegDataPtr NewData = \
|
||||
+ (NewSize > 0) ? realloc((reg)->data, NewSize) : NULL ; \
|
||||
if (NewData) \
|
||||
{ \
|
||||
NewData->size = (numRects); \
|
||||
@@ -330,17 +330,20 @@ Bool
|
||||
RegionRectAlloc(RegionPtr pRgn, int n)
|
||||
{
|
||||
RegDataPtr data;
|
||||
+ size_t rgnSize;
|
||||
|
||||
if (!pRgn->data) {
|
||||
n++;
|
||||
- pRgn->data = xallocData(n);
|
||||
+ rgnSize = RegionSizeof(n);
|
||||
+ pRgn->data = (rgnSize > 0) ? malloc(rgnSize) : NULL;
|
||||
if (!pRgn->data)
|
||||
return RegionBreak(pRgn);
|
||||
pRgn->data->numRects = 1;
|
||||
*RegionBoxptr(pRgn) = pRgn->extents;
|
||||
}
|
||||
else if (!pRgn->data->size) {
|
||||
- pRgn->data = xallocData(n);
|
||||
+ rgnSize = RegionSizeof(n);
|
||||
+ pRgn->data = (rgnSize > 0) ? malloc(rgnSize) : NULL;
|
||||
if (!pRgn->data)
|
||||
return RegionBreak(pRgn);
|
||||
pRgn->data->numRects = 0;
|
||||
@@ -352,7 +355,8 @@ RegionRectAlloc(RegionPtr pRgn, int n)
|
||||
n = 250;
|
||||
}
|
||||
n += pRgn->data->numRects;
|
||||
- data = (RegDataPtr) realloc(pRgn->data, RegionSizeof(n));
|
||||
+ rgnSize = RegionSizeof(n);
|
||||
+ data = (rgnSize > 0) ? realloc(pRgn->data, rgnSize) : NULL;
|
||||
if (!data)
|
||||
return RegionBreak(pRgn);
|
||||
pRgn->data = data;
|
||||
@@ -1297,6 +1301,7 @@ RegionFromRects(int nrects, xRectangle *
|
||||
{
|
||||
|
||||
RegionPtr pRgn;
|
||||
+ size_t rgnSize;
|
||||
RegDataPtr pData;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
@@ -1323,7 +1328,8 @@ RegionFromRects(int nrects, xRectangle *
|
||||
}
|
||||
return pRgn;
|
||||
}
|
||||
- pData = xallocData(nrects);
|
||||
+ rgnSize = RegionSizeof(nrects);
|
||||
+ pData = (rgnSize > 0) ? malloc(rgnSize) : NULL;
|
||||
if (!pData) {
|
||||
RegionBreak(pRgn);
|
||||
return pRgn;
|
|
@ -1,17 +0,0 @@
|
|||
$NetBSD: patch-exa_exa__render.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
Fix CVE-2013-6424 using
|
||||
http://lists.x.org/archives/xorg-devel/2013-October/037996.html
|
||||
|
||||
--- exa/exa_render.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ exa/exa_render.c
|
||||
@@ -1141,7 +1141,8 @@ exaTrapezoids(CARD8 op, PicturePtr pSrc,
|
||||
|
||||
exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
|
||||
for (; ntrap; ntrap--, traps++)
|
||||
- (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
|
||||
+ if (xTrapezoidValid(traps))
|
||||
+ (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1);
|
||||
exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST);
|
||||
|
||||
xRel = bounds.x1 + xSrc - xDst;
|
|
@ -1,62 +0,0 @@
|
|||
$NetBSD: patch-glx_glxcmds.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/glxcmds.c.orig 2012-08-02 00:59:23.000000000 +0000
|
||||
+++ glx/glxcmds.c
|
||||
@@ -1983,7 +1983,8 @@ __glXDisp_Render(__GLXclientState * cl,
|
||||
if (entry.varsize) {
|
||||
/* variable size command */
|
||||
extra = (*entry.varsize) (pc + __GLX_RENDER_HDR_SIZE,
|
||||
- client->swapped);
|
||||
+ client->swapped,
|
||||
+ left - __GLX_RENDER_HDR_SIZE);
|
||||
if (extra < 0) {
|
||||
extra = 0;
|
||||
}
|
||||
@@ -2060,6 +2061,7 @@ __glXDisp_RenderLarge(__GLXclientState *
|
||||
return BadLength;
|
||||
}
|
||||
pc += sz_xGLXRenderLargeReq;
|
||||
+ int left = (req->length << 2) - sz_xGLXRenderLargeReq;
|
||||
|
||||
if (cl->largeCmdRequestsSoFar == 0) {
|
||||
__GLXrenderSizeData entry;
|
||||
@@ -2100,7 +2102,8 @@ __glXDisp_RenderLarge(__GLXclientState *
|
||||
** will be in the 1st request, so it's okay to do this.
|
||||
*/
|
||||
extra = (*entry.varsize) (pc + __GLX_RENDER_LARGE_HDR_SIZE,
|
||||
- client->swapped);
|
||||
+ client->swapped,
|
||||
+ left - __GLX_RENDER_LARGE_HDR_SIZE);
|
||||
if (extra < 0) {
|
||||
extra = 0;
|
||||
}
|
||||
@@ -2178,17 +2181,16 @@ __glXDisp_RenderLarge(__GLXclientState *
|
||||
** This is the last request; it must have enough bytes to complete
|
||||
** the command.
|
||||
*/
|
||||
- /* NOTE: the two pad macros have been added below; they are needed
|
||||
- ** because the client library pads the total byte count, but not
|
||||
- ** the per-request byte counts. The Protocol Encoding says the
|
||||
- ** total byte count should not be padded, so a proposal will be
|
||||
- ** made to the ARB to relax the padding constraint on the total
|
||||
- ** byte count, thus preserving backward compatibility. Meanwhile,
|
||||
- ** the padding done below fixes a bug that did not allow
|
||||
- ** large commands of odd sizes to be accepted by the server.
|
||||
+ /* NOTE: the pad macro below is needed because the client library
|
||||
+ ** pads the total byte count, but not the per-request byte counts.
|
||||
+ ** The Protocol Encoding says the total byte count should not be
|
||||
+ ** padded, so a proposal will be made to the ARB to relax the
|
||||
+ ** padding constraint on the total byte count, thus preserving
|
||||
+ ** backward compatibility. Meanwhile, the padding done below
|
||||
+ ** fixes a bug that did not allow large commands of odd sizes to
|
||||
+ ** be accepted by the server.
|
||||
*/
|
||||
- if (__GLX_PAD(cl->largeCmdBytesSoFar) !=
|
||||
- __GLX_PAD(cl->largeCmdBytesTotal)) {
|
||||
+ if (safe_pad(cl->largeCmdBytesSoFar) != cl->largeCmdBytesTotal) {
|
||||
client->errorValue = dataBytes;
|
||||
__glXResetLargeCommandStatus(cl);
|
||||
return __glXError(GLXBadLargeRequest);
|
|
@ -1,35 +0,0 @@
|
|||
$NetBSD: patch-glx_glxcmdsswap.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/glxcmdsswap.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/glxcmdsswap.c
|
||||
@@ -962,11 +962,13 @@ __glXDispSwap_RenderLarge(__GLXclientSta
|
||||
int
|
||||
__glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
xGLXVendorPrivateReq *req;
|
||||
GLint vendorcode;
|
||||
__GLXdispatchVendorPrivProcPtr proc;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
+ REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq);
|
||||
|
||||
req = (xGLXVendorPrivateReq *) pc;
|
||||
__GLX_SWAP_SHORT(&req->length);
|
||||
@@ -989,11 +991,13 @@ __glXDispSwap_VendorPrivate(__GLXclientS
|
||||
int
|
||||
__glXDispSwap_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
xGLXVendorPrivateWithReplyReq *req;
|
||||
GLint vendorcode;
|
||||
__GLXdispatchVendorPrivProcPtr proc;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
+ REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateWithReplyReq);
|
||||
|
||||
req = (xGLXVendorPrivateWithReplyReq *) pc;
|
||||
__GLX_SWAP_SHORT(&req->length);
|
|
@ -1,64 +0,0 @@
|
|||
$NetBSD: patch-glx_glxserver.h,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/glxserver.h.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/glxserver.h
|
||||
@@ -167,7 +167,7 @@ typedef int (*__GLXprocPtr) (__GLXclient
|
||||
/*
|
||||
* Tables for computing the size of each rendering command.
|
||||
*/
|
||||
-typedef int (*gl_proto_size_func) (const GLbyte *, Bool);
|
||||
+typedef int (*gl_proto_size_func) (const GLbyte *, Bool, int);
|
||||
|
||||
typedef struct {
|
||||
int bytes;
|
||||
@@ -218,6 +218,47 @@ extern void glxSwapQueryServerStringRepl
|
||||
* Routines for computing the size of variably-sized rendering commands.
|
||||
*/
|
||||
|
||||
+static _X_INLINE int
|
||||
+safe_add(int a, int b)
|
||||
+{
|
||||
+ if (a < 0 || b < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (INT_MAX - a < b)
|
||||
+ return -1;
|
||||
+
|
||||
+ return a + b;
|
||||
+}
|
||||
+
|
||||
+static _X_INLINE int
|
||||
+safe_mul(int a, int b)
|
||||
+{
|
||||
+ if (a < 0 || b < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (a == 0 || b == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (a > INT_MAX / b)
|
||||
+ return -1;
|
||||
+
|
||||
+ return a * b;
|
||||
+}
|
||||
+
|
||||
+static _X_INLINE int
|
||||
+safe_pad(int a)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ if (a < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if ((ret = safe_add(a, 3)) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ return ret & (GLuint)~3;
|
||||
+}
|
||||
+
|
||||
extern int __glXTypeSize(GLenum enm);
|
||||
extern int __glXImageSize(GLenum format, GLenum type,
|
||||
GLenum target, GLsizei w, GLsizei h, GLsizei d,
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-glx_indirect__program.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/indirect_program.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/indirect_program.c
|
||||
@@ -69,6 +69,8 @@ DoGetProgramString(struct __GLXclientSta
|
||||
__GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateWithReplyReq, 8);
|
||||
+
|
||||
pc += __GLX_VENDPRIV_HDR_SIZE;
|
||||
if (cx != NULL) {
|
||||
GLenum target;
|
|
@ -1,568 +0,0 @@
|
|||
$NetBSD: patch-glx_indirect__reqsize.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/indirect_reqsize.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/indirect_reqsize.c
|
||||
@@ -31,24 +31,22 @@
|
||||
#include "indirect_size.h"
|
||||
#include "indirect_reqsize.h"
|
||||
|
||||
-#define __GLX_PAD(x) (((x) + 3) & ~3)
|
||||
-
|
||||
#if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
#undef HAVE_ALIAS
|
||||
#endif
|
||||
#ifdef HAVE_ALIAS
|
||||
#define ALIAS2(from,to) \
|
||||
- GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
|
||||
+ GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \
|
||||
__attribute__ ((alias( # to )));
|
||||
#define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
|
||||
#else
|
||||
#define ALIAS(from,to) \
|
||||
- GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
|
||||
- { return __glX ## to ## ReqSize( pc, swap ); }
|
||||
+ GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \
|
||||
+ { return __glX ## to ## ReqSize( pc, swap, reqlen ); }
|
||||
#endif
|
||||
|
||||
int
|
||||
-__glXCallListsReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXCallListsReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
GLenum type = *(GLenum *) (pc + 4);
|
||||
@@ -60,11 +58,11 @@ __glXCallListsReqSize(const GLbyte * pc,
|
||||
}
|
||||
|
||||
compsize = __glCallLists_size(type);
|
||||
- return __GLX_PAD((compsize * n));
|
||||
+ return safe_pad(safe_mul(compsize, n));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXBitmapReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXBitmapReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -88,7 +86,7 @@ __glXBitmapReqSize(const GLbyte * pc, Bo
|
||||
}
|
||||
|
||||
int
|
||||
-__glXFogfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXFogfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
@@ -98,11 +96,11 @@ __glXFogfvReqSize(const GLbyte * pc, Boo
|
||||
}
|
||||
|
||||
compsize = __glFogfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXLightfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXLightfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
@@ -112,11 +110,11 @@ __glXLightfvReqSize(const GLbyte * pc, B
|
||||
}
|
||||
|
||||
compsize = __glLightfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXLightModelfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXLightModelfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
@@ -126,11 +124,11 @@ __glXLightModelfvReqSize(const GLbyte *
|
||||
}
|
||||
|
||||
compsize = __glLightModelfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXMaterialfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXMaterialfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
@@ -140,11 +138,11 @@ __glXMaterialfvReqSize(const GLbyte * pc
|
||||
}
|
||||
|
||||
compsize = __glMaterialfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXPolygonStippleReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXPolygonStippleReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -164,7 +162,7 @@ __glXPolygonStippleReqSize(const GLbyte
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexParameterfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
@@ -174,11 +172,11 @@ __glXTexParameterfvReqSize(const GLbyte
|
||||
}
|
||||
|
||||
compsize = __glTexParameterfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexImage1DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -206,7 +204,7 @@ __glXTexImage1DReqSize(const GLbyte * pc
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexImage2DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -236,7 +234,7 @@ __glXTexImage2DReqSize(const GLbyte * pc
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexEnvfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexEnvfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
@@ -246,11 +244,11 @@ __glXTexEnvfvReqSize(const GLbyte * pc,
|
||||
}
|
||||
|
||||
compsize = __glTexEnvfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexGendvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexGendvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
@@ -260,11 +258,11 @@ __glXTexGendvReqSize(const GLbyte * pc,
|
||||
}
|
||||
|
||||
compsize = __glTexGendv_size(pname);
|
||||
- return __GLX_PAD((compsize * 8));
|
||||
+ return safe_pad(safe_mul(compsize, 8));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexGenfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexGenfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
@@ -274,11 +272,11 @@ __glXTexGenfvReqSize(const GLbyte * pc,
|
||||
}
|
||||
|
||||
compsize = __glTexGenfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXPixelMapfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXPixelMapfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei mapsize = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -286,11 +284,11 @@ __glXPixelMapfvReqSize(const GLbyte * pc
|
||||
mapsize = bswap_32(mapsize);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((mapsize * 4));
|
||||
+ return safe_pad(safe_mul(mapsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXPixelMapusvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXPixelMapusvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei mapsize = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -298,11 +296,11 @@ __glXPixelMapusvReqSize(const GLbyte * p
|
||||
mapsize = bswap_32(mapsize);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((mapsize * 2));
|
||||
+ return safe_pad(safe_mul(mapsize, 2));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXDrawPixelsReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXDrawPixelsReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -330,7 +328,7 @@ __glXDrawPixelsReqSize(const GLbyte * pc
|
||||
}
|
||||
|
||||
int
|
||||
-__glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
|
||||
@@ -338,11 +336,11 @@ __glXPrioritizeTexturesReqSize(const GLb
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((n * 4) + (n * 4));
|
||||
+ return safe_pad(safe_add(safe_mul(n, 4), safe_mul(n, 4)));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -370,7 +368,7 @@ __glXTexSubImage1DReqSize(const GLbyte *
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -400,7 +398,7 @@ __glXTexSubImage2DReqSize(const GLbyte *
|
||||
}
|
||||
|
||||
int
|
||||
-__glXColorTableReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXColorTableReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -428,7 +426,7 @@ __glXColorTableReqSize(const GLbyte * pc
|
||||
}
|
||||
|
||||
int
|
||||
-__glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
@@ -438,11 +436,11 @@ __glXColorTableParameterfvReqSize(const
|
||||
}
|
||||
|
||||
compsize = __glColorTableParameterfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXColorSubTableReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXColorSubTableReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -470,7 +468,7 @@ __glXColorSubTableReqSize(const GLbyte *
|
||||
}
|
||||
|
||||
int
|
||||
-__glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -498,7 +496,7 @@ __glXConvolutionFilter1DReqSize(const GL
|
||||
}
|
||||
|
||||
int
|
||||
-__glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = 0;
|
||||
@@ -528,7 +526,7 @@ __glXConvolutionFilter2DReqSize(const GL
|
||||
}
|
||||
|
||||
int
|
||||
-__glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 4);
|
||||
GLsizei compsize;
|
||||
@@ -538,11 +536,11 @@ __glXConvolutionParameterfvReqSize(const
|
||||
}
|
||||
|
||||
compsize = __glConvolutionParameterfv_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad(safe_mul(compsize, 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexImage3DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = *(GLint *) (pc + 8);
|
||||
@@ -579,7 +577,7 @@ __glXTexImage3DReqSize(const GLbyte * pc
|
||||
}
|
||||
|
||||
int
|
||||
-__glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLint row_length = *(GLint *) (pc + 4);
|
||||
GLint image_height = *(GLint *) (pc + 8);
|
||||
@@ -613,7 +611,7 @@ __glXTexSubImage3DReqSize(const GLbyte *
|
||||
}
|
||||
|
||||
int
|
||||
-__glXCompressedTexImage1DARBReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXCompressedTexImage1DARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 20);
|
||||
|
||||
@@ -621,11 +619,11 @@ __glXCompressedTexImage1DARBReqSize(cons
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
- return __GLX_PAD(imageSize);
|
||||
+ return safe_pad(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
-__glXCompressedTexImage2DARBReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXCompressedTexImage2DARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 24);
|
||||
|
||||
@@ -633,11 +631,11 @@ __glXCompressedTexImage2DARBReqSize(cons
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
- return __GLX_PAD(imageSize);
|
||||
+ return safe_pad(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
-__glXCompressedTexImage3DARBReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXCompressedTexImage3DARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 28);
|
||||
|
||||
@@ -645,11 +643,11 @@ __glXCompressedTexImage3DARBReqSize(cons
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
- return __GLX_PAD(imageSize);
|
||||
+ return safe_pad(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
-__glXCompressedTexSubImage3DARBReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXCompressedTexSubImage3DARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei imageSize = *(GLsizei *) (pc + 36);
|
||||
|
||||
@@ -657,11 +655,11 @@ __glXCompressedTexSubImage3DARBReqSize(c
|
||||
imageSize = bswap_32(imageSize);
|
||||
}
|
||||
|
||||
- return __GLX_PAD(imageSize);
|
||||
+ return safe_pad(imageSize);
|
||||
}
|
||||
|
||||
int
|
||||
-__glXProgramStringARBReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXProgramStringARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei len = *(GLsizei *) (pc + 8);
|
||||
|
||||
@@ -669,11 +667,11 @@ __glXProgramStringARBReqSize(const GLbyt
|
||||
len = bswap_32(len);
|
||||
}
|
||||
|
||||
- return __GLX_PAD(len);
|
||||
+ return safe_pad(len);
|
||||
}
|
||||
|
||||
int
|
||||
-__glXDrawBuffersARBReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXDrawBuffersARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 0);
|
||||
|
||||
@@ -681,11 +679,11 @@ __glXDrawBuffersARBReqSize(const GLbyte
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((n * 4));
|
||||
+ return safe_pad((n * 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXPointParameterfvEXTReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXPointParameterfvEXTReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum pname = *(GLenum *) (pc + 0);
|
||||
GLsizei compsize;
|
||||
@@ -695,11 +693,11 @@ __glXPointParameterfvEXTReqSize(const GL
|
||||
}
|
||||
|
||||
compsize = __glPointParameterfvEXT_size(pname);
|
||||
- return __GLX_PAD((compsize * 4));
|
||||
+ return safe_pad((compsize * 4));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXProgramParameters4dvNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXProgramParameters4dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei num = *(GLsizei *) (pc + 8);
|
||||
|
||||
@@ -707,11 +705,11 @@ __glXProgramParameters4dvNVReqSize(const
|
||||
num = bswap_32(num);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((num * 32));
|
||||
+ return safe_pad((num * 32));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXProgramParameters4fvNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXProgramParameters4fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei num = *(GLsizei *) (pc + 8);
|
||||
|
||||
@@ -719,11 +717,11 @@ __glXProgramParameters4fvNVReqSize(const
|
||||
num = bswap_32(num);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((num * 16));
|
||||
+ return safe_pad((num * 16));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -731,11 +729,11 @@ __glXVertexAttribs1dvNVReqSize(const GLb
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((n * 8));
|
||||
+ return safe_pad(safe_mul(n, 8));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -743,11 +741,11 @@ __glXVertexAttribs2dvNVReqSize(const GLb
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((n * 16));
|
||||
+ return safe_pad(safe_mul(n, 16));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -755,11 +753,11 @@ __glXVertexAttribs3dvNVReqSize(const GLb
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((n * 24));
|
||||
+ return safe_pad(safe_mul(n, 24));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -767,11 +765,11 @@ __glXVertexAttribs3fvNVReqSize(const GLb
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((n * 12));
|
||||
+ return safe_pad(safe_mul(n, 12));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -779,11 +777,11 @@ __glXVertexAttribs3svNVReqSize(const GLb
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((n * 6));
|
||||
+ return safe_pad(safe_mul(n, 6));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei n = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -791,11 +789,11 @@ __glXVertexAttribs4dvNVReqSize(const GLb
|
||||
n = bswap_32(n);
|
||||
}
|
||||
|
||||
- return __GLX_PAD((n * 32));
|
||||
+ return safe_pad(safe_mul(n, 32));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXProgramNamedParameter4fvNVReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXProgramNamedParameter4fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLsizei len = *(GLsizei *) (pc + 4);
|
||||
|
||||
@@ -803,7 +801,7 @@ __glXProgramNamedParameter4fvNVReqSize(c
|
||||
len = bswap_32(len);
|
||||
}
|
||||
|
||||
- return __GLX_PAD(len);
|
||||
+ return safe_pad(len);
|
||||
}
|
||||
|
||||
ALIAS(Fogiv, Fogfv)
|
|
@ -1,210 +0,0 @@
|
|||
$NetBSD: patch-glx_indirect__reqsize.h,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/indirect_reqsize.h.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/indirect_reqsize.h
|
||||
@@ -36,128 +36,128 @@
|
||||
#define PURE
|
||||
#endif
|
||||
|
||||
-extern PURE _X_HIDDEN int __glXCallListsReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXBitmapReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXFogfvReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXFogivReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXLightfvReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXLightivReqSize(const GLbyte * pc, Bool swap);
|
||||
+extern PURE _X_HIDDEN int __glXCallListsReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXBitmapReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXFogfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXFogivReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXLightfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXLightivReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXLightModelfvReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXLightModelivReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXMaterialfvReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXMaterialivReqSize(const GLbyte * pc, Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXMaterialfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXMaterialivReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXPolygonStippleReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXTexParameterfvReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXTexParameterivReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXTexImage1DReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXTexImage2DReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXTexEnvivReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXTexGendvReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXTexGenfvReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXTexGenivReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXMap1dReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXMap1fReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXMap2dReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXMap2fReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXPixelMapfvReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXPixelMapuivReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXPixelMapusvReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXDrawArraysReqSize(const GLbyte * pc, Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXTexEnvivReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXTexGendvReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXTexGenfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXTexGenivReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXMap1dReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXMap1fReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXMap2dReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXMap2fReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXPixelMapfvReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXPixelMapuivReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXPixelMapusvReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXDrawArraysReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXTexSubImage1DReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXTexSubImage2DReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXColorTableReqSize(const GLbyte * pc, Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXColorTableReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXColorTableParameterivReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXColorSubTableReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
-extern PURE _X_HIDDEN int __glXTexImage3DReqSize(const GLbyte * pc, Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
+extern PURE _X_HIDDEN int __glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXTexSubImage3DReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *
|
||||
- pc, Bool swap);
|
||||
+ pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *
|
||||
- pc, Bool swap);
|
||||
+ pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *
|
||||
- pc, Bool swap);
|
||||
+ pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXProgramStringARBReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXLoadProgramNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *
|
||||
- pc, Bool swap);
|
||||
+ pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXPointParameterivNVReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *
|
||||
- pc, Bool swap);
|
||||
+ pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *
|
||||
- pc, Bool swap);
|
||||
+ pc, Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
extern PURE _X_HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte * pc,
|
||||
- Bool swap);
|
||||
+ Bool swap, int reqlen);
|
||||
|
||||
#undef PURE
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
$NetBSD: patch-glx_indirect__texture__compression.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/indirect_texture_compression.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/indirect_texture_compression.c
|
||||
@@ -47,6 +47,8 @@ __glXDisp_GetCompressedTexImageARB(struc
|
||||
__GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
|
||||
ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 8);
|
||||
+
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
if (cx != NULL) {
|
||||
const GLenum target = *(GLenum *) (pc + 0);
|
||||
@@ -93,6 +95,8 @@ __glXDispSwap_GetCompressedTexImageARB(s
|
||||
__glXForceCurrent(cl, bswap_32(req->contextTag), &error);
|
||||
ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 8);
|
||||
+
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
if (cx != NULL) {
|
||||
const GLenum target = (GLenum) bswap_32(*(int *) (pc + 0));
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-glx_indirect__util.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/indirect_util.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/indirect_util.c
|
||||
@@ -78,7 +78,7 @@ __glXGetAnswerBuffer(__GLXclientState *
|
||||
void *local_buffer, size_t local_size, unsigned alignment)
|
||||
{
|
||||
void *buffer = local_buffer;
|
||||
- const unsigned mask = alignment - 1;
|
||||
+ const intptr_t mask = alignment - 1;
|
||||
|
||||
if (local_size < required_size) {
|
||||
const size_t worst_case_size = required_size + alignment;
|
|
@ -1,96 +0,0 @@
|
|||
$NetBSD: patch-glx_rensize.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/rensize.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/rensize.c
|
||||
@@ -52,7 +52,7 @@ Map1Size(GLint k, GLint order)
|
||||
}
|
||||
|
||||
int
|
||||
-__glXMap1dReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXMap1dReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum target;
|
||||
GLint order, k;
|
||||
@@ -68,7 +68,7 @@ __glXMap1dReqSize(const GLbyte * pc, Boo
|
||||
}
|
||||
|
||||
int
|
||||
-__glXMap1fReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXMap1fReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum target;
|
||||
GLint order, k;
|
||||
@@ -92,7 +92,7 @@ Map2Size(int k, int majorOrder, int mino
|
||||
}
|
||||
|
||||
int
|
||||
-__glXMap2dReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXMap2dReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum target;
|
||||
GLint uorder, vorder, k;
|
||||
@@ -110,7 +110,7 @@ __glXMap2dReqSize(const GLbyte * pc, Boo
|
||||
}
|
||||
|
||||
int
|
||||
-__glXMap2fReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXMap2fReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
GLenum target;
|
||||
GLint uorder, vorder, k;
|
||||
@@ -342,13 +342,14 @@ __glXTypeSize(GLenum enm)
|
||||
}
|
||||
|
||||
int
|
||||
-__glXDrawArraysReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXDrawArraysReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
__GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc;
|
||||
__GLXdispatchDrawArraysComponentHeader *compHeader;
|
||||
GLint numVertexes = hdr->numVertexes;
|
||||
GLint numComponents = hdr->numComponents;
|
||||
GLint arrayElementSize = 0;
|
||||
+ GLint x, size;
|
||||
int i;
|
||||
|
||||
if (swap) {
|
||||
@@ -357,6 +358,13 @@ __glXDrawArraysReqSize(const GLbyte * pc
|
||||
}
|
||||
|
||||
pc += sizeof(__GLXdispatchDrawArraysHeader);
|
||||
+ reqlen -= sizeof(__GLXdispatchDrawArraysHeader);
|
||||
+
|
||||
+ size = safe_mul(sizeof(__GLXdispatchDrawArraysComponentHeader),
|
||||
+ numComponents);
|
||||
+ if (size < 0 || reqlen < 0 || reqlen < size)
|
||||
+ return -1;
|
||||
+
|
||||
compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc;
|
||||
|
||||
for (i = 0; i < numComponents; i++) {
|
||||
@@ -400,17 +408,18 @@ __glXDrawArraysReqSize(const GLbyte * pc
|
||||
return -1;
|
||||
}
|
||||
|
||||
- arrayElementSize += __GLX_PAD(numVals * __glXTypeSize(datatype));
|
||||
+ x = safe_pad(safe_mul(numVals, __glXTypeSize(datatype)));
|
||||
+ if ((arrayElementSize = safe_add(arrayElementSize, x)) < 0)
|
||||
+ return -1;
|
||||
|
||||
pc += sizeof(__GLXdispatchDrawArraysComponentHeader);
|
||||
}
|
||||
|
||||
- return ((numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader)) +
|
||||
- (numVertexes * arrayElementSize));
|
||||
+ return safe_add(size, safe_mul(numVertexes, arrayElementSize));
|
||||
}
|
||||
|
||||
int
|
||||
-__glXSeparableFilter2DReqSize(const GLbyte * pc, Bool swap)
|
||||
+__glXSeparableFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
|
||||
{
|
||||
__GLXdispatchConvolutionFilterHeader *hdr =
|
||||
(__GLXdispatchConvolutionFilterHeader *) pc;
|
|
@ -1,115 +0,0 @@
|
|||
$NetBSD: patch-glx_single2.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/single2.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/single2.c
|
||||
@@ -49,11 +49,14 @@
|
||||
int
|
||||
__glXDisp_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
GLsizei size;
|
||||
GLenum type;
|
||||
__GLXcontext *cx;
|
||||
int error;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 8);
|
||||
+
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
@@ -80,10 +83,13 @@ __glXDisp_FeedbackBuffer(__GLXclientStat
|
||||
int
|
||||
__glXDisp_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
GLsizei size;
|
||||
int error;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
|
||||
+
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
@@ -108,7 +114,7 @@ __glXDisp_SelectBuffer(__GLXclientState
|
||||
int
|
||||
__glXDisp_RenderMode(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
- ClientPtr client;
|
||||
+ ClientPtr client = cl->client;
|
||||
xGLXRenderModeReply reply;
|
||||
__GLXcontext *cx;
|
||||
GLint nitems = 0, retBytes = 0, retval, newModeCheck;
|
||||
@@ -116,6 +122,8 @@ __glXDisp_RenderMode(__GLXclientState *
|
||||
GLenum newMode;
|
||||
int error;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
|
||||
+
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
@@ -192,7 +200,6 @@ __glXDisp_RenderMode(__GLXclientState *
|
||||
** selection array, as per the API for glRenderMode itself.
|
||||
*/
|
||||
noChangeAllowed:;
|
||||
- client = cl->client;
|
||||
reply.length = nitems;
|
||||
reply.type = X_Reply;
|
||||
reply.sequenceNumber = client->sequence;
|
||||
@@ -209,9 +216,12 @@ __glXDisp_RenderMode(__GLXclientState *
|
||||
int
|
||||
__glXDisp_Flush(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
int error;
|
||||
|
||||
+ REQUEST_SIZE_MATCH(xGLXSingleReq);
|
||||
+
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
@@ -225,10 +235,12 @@ __glXDisp_Flush(__GLXclientState * cl, G
|
||||
int
|
||||
__glXDisp_Finish(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
- ClientPtr client;
|
||||
int error;
|
||||
|
||||
+ REQUEST_SIZE_MATCH(xGLXSingleReq);
|
||||
+
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
@@ -319,7 +331,7 @@ __glXcombine_strings(const char *cext_st
|
||||
int
|
||||
DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap)
|
||||
{
|
||||
- ClientPtr client;
|
||||
+ ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
GLenum name;
|
||||
const char *string;
|
||||
@@ -329,6 +341,8 @@ DoGetString(__GLXclientState * cl, GLbyt
|
||||
char *buf = NULL, *buf1 = NULL;
|
||||
GLint length = 0;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
|
||||
+
|
||||
/* If the client has the opposite byte order, swap the contextTag and
|
||||
* the name.
|
||||
*/
|
||||
@@ -345,7 +359,6 @@ DoGetString(__GLXclientState * cl, GLbyt
|
||||
pc += __GLX_SINGLE_HDR_SIZE;
|
||||
name = *(GLenum *) (pc + 0);
|
||||
string = (const char *) CALL_GetString(GET_DISPATCH(), (name));
|
||||
- client = cl->client;
|
||||
|
||||
if (string == NULL)
|
||||
string = "";
|
|
@ -1,105 +0,0 @@
|
|||
$NetBSD: patch-glx_single2swap.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/single2swap.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/single2swap.c
|
||||
@@ -45,6 +45,7 @@
|
||||
int
|
||||
__glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
GLsizei size;
|
||||
GLenum type;
|
||||
|
||||
@@ -52,6 +53,8 @@ __glXDispSwap_FeedbackBuffer(__GLXclient
|
||||
__GLXcontext *cx;
|
||||
int error;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 8);
|
||||
+
|
||||
__GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
@@ -81,12 +84,15 @@ __glXDispSwap_FeedbackBuffer(__GLXclient
|
||||
int
|
||||
__glXDispSwap_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
GLsizei size;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
int error;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
|
||||
+
|
||||
__GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
@@ -113,7 +119,7 @@ __glXDispSwap_SelectBuffer(__GLXclientSt
|
||||
int
|
||||
__glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
- ClientPtr client;
|
||||
+ ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
xGLXRenderModeReply reply;
|
||||
GLint nitems = 0, retBytes = 0, retval, newModeCheck;
|
||||
@@ -124,6 +130,8 @@ __glXDispSwap_RenderMode(__GLXclientStat
|
||||
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
|
||||
int error;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
|
||||
+
|
||||
__GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
@@ -204,7 +212,6 @@ __glXDispSwap_RenderMode(__GLXclientStat
|
||||
** selection array, as per the API for glRenderMode itself.
|
||||
*/
|
||||
noChangeAllowed:;
|
||||
- client = cl->client;
|
||||
reply.length = nitems;
|
||||
reply.type = X_Reply;
|
||||
reply.sequenceNumber = client->sequence;
|
||||
@@ -226,11 +233,14 @@ __glXDispSwap_RenderMode(__GLXclientStat
|
||||
int
|
||||
__glXDispSwap_Flush(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
int error;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
+ REQUEST_SIZE_MATCH(xGLXSingleReq);
|
||||
+
|
||||
__GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
@@ -245,12 +255,14 @@ __glXDispSwap_Flush(__GLXclientState * c
|
||||
int
|
||||
__glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
+ ClientPtr client = cl->client;
|
||||
__GLXcontext *cx;
|
||||
- ClientPtr client;
|
||||
int error;
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
+ REQUEST_SIZE_MATCH(xGLXSingleReq);
|
||||
+
|
||||
__GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
@@ -262,7 +274,6 @@ __glXDispSwap_Finish(__GLXclientState *
|
||||
cx->hasUnflushedCommands = GL_FALSE;
|
||||
|
||||
/* Send empty reply packet to indicate finish is finished */
|
||||
- client = cl->client;
|
||||
__GLX_BEGIN_REPLY(0);
|
||||
__GLX_PUT_RETVAL(0);
|
||||
__GLX_SWAP_REPLY_HEADER();
|
|
@ -1,170 +0,0 @@
|
|||
$NetBSD: patch-glx_singlepix.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/singlepix.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/singlepix.c
|
||||
@@ -55,6 +55,8 @@ __glXDisp_ReadPixels(__GLXclientState *
|
||||
int error;
|
||||
char *answer, answerBuffer[200];
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 28);
|
||||
+
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
@@ -68,7 +70,7 @@ __glXDisp_ReadPixels(__GLXclientState *
|
||||
swapBytes = *(GLboolean *) (pc + 24);
|
||||
lsbFirst = *(GLboolean *) (pc + 25);
|
||||
compsize = __glReadPixels_size(format, type, width, height);
|
||||
- if (compsize < 0)
|
||||
+ if ((compsize = safe_pad(compsize)) < 0)
|
||||
compsize = 0;
|
||||
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
|
||||
@@ -107,6 +109,8 @@ __glXDisp_GetTexImage(__GLXclientState *
|
||||
char *answer, answerBuffer[200];
|
||||
GLint width = 0, height = 0, depth = 1;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 20);
|
||||
+
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
@@ -133,7 +137,7 @@ __glXDisp_GetTexImage(__GLXclientState *
|
||||
*/
|
||||
compsize =
|
||||
__glGetTexImage_size(target, level, format, type, width, height, depth);
|
||||
- if (compsize < 0)
|
||||
+ if ((compsize = safe_pad(compsize)) < 0)
|
||||
compsize = 0;
|
||||
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
|
||||
@@ -169,6 +173,8 @@ __glXDisp_GetPolygonStipple(__GLXclientS
|
||||
GLubyte answerBuffer[200];
|
||||
char *answer;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
|
||||
+
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
return error;
|
||||
@@ -231,15 +237,13 @@ GetSeparableFilter(__GLXclientState * cl
|
||||
compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1);
|
||||
compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1);
|
||||
|
||||
- if (compsize < 0)
|
||||
+ if ((compsize = safe_pad(compsize)) < 0)
|
||||
compsize = 0;
|
||||
- if (compsize2 < 0)
|
||||
+ if ((compsize2 = safe_pad(compsize2)) < 0)
|
||||
compsize2 = 0;
|
||||
- compsize = __GLX_PAD(compsize);
|
||||
- compsize2 = __GLX_PAD(compsize2);
|
||||
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
|
||||
- __GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1);
|
||||
+ __GLX_GET_ANSWER_BUFFER(answer, cl, safe_add(compsize, compsize2), 1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetSeparableFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
|
||||
*(GLenum *) (pc + 4),
|
||||
@@ -265,7 +269,8 @@ int
|
||||
__glXDisp_GetSeparableFilter(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -273,7 +278,8 @@ int
|
||||
__glXDisp_GetSeparableFilterEXT(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -343,7 +349,8 @@ int
|
||||
__glXDisp_GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -351,7 +358,8 @@ int
|
||||
__glXDisp_GetConvolutionFilterEXT(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -411,7 +419,8 @@ int
|
||||
__glXDisp_GetHistogram(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -419,7 +428,8 @@ int
|
||||
__glXDisp_GetHistogramEXT(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -471,7 +481,8 @@ int
|
||||
__glXDisp_GetMinmax(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -479,7 +490,8 @@ int
|
||||
__glXDisp_GetMinmaxEXT(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -540,7 +552,8 @@ int
|
||||
__glXDisp_GetColorTable(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -548,6 +561,7 @@ int
|
||||
__glXDisp_GetColorTableSGI(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
-
|
||||
+ ClientPtr client = cl->client;
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
$NetBSD: patch-glx_singlepixswap.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/singlepixswap.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/singlepixswap.c
|
||||
@@ -57,6 +57,8 @@ __glXDispSwap_ReadPixels(__GLXclientStat
|
||||
int error;
|
||||
char *answer, answerBuffer[200];
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 28);
|
||||
+
|
||||
__GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
@@ -122,6 +124,8 @@ __glXDispSwap_GetTexImage(__GLXclientSta
|
||||
char *answer, answerBuffer[200];
|
||||
GLint width = 0, height = 0, depth = 1;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 20);
|
||||
+
|
||||
__GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
@@ -197,6 +201,8 @@ __glXDispSwap_GetPolygonStipple(__GLXcli
|
||||
|
||||
__GLX_DECLARE_SWAP_VARIABLES;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 4);
|
||||
+
|
||||
__GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag);
|
||||
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
|
||||
if (!cx) {
|
||||
@@ -266,15 +272,13 @@ GetSeparableFilter(__GLXclientState * cl
|
||||
compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1);
|
||||
compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1);
|
||||
|
||||
- if (compsize < 0)
|
||||
+ if ((compsize = safe_pad(compsize)) < 0)
|
||||
compsize = 0;
|
||||
- if (compsize2 < 0)
|
||||
+ if ((compsize2 = safe_pad(compsize2)) < 0)
|
||||
compsize2 = 0;
|
||||
- compsize = __GLX_PAD(compsize);
|
||||
- compsize2 = __GLX_PAD(compsize2);
|
||||
|
||||
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, !swapBytes));
|
||||
- __GLX_GET_ANSWER_BUFFER(answer, cl, compsize + compsize2, 1);
|
||||
+ __GLX_GET_ANSWER_BUFFER(answer, cl, safe_add(compsize, compsize2), 1);
|
||||
__glXClearErrorOccured();
|
||||
CALL_GetSeparableFilter(GET_DISPATCH(), (*(GLenum *) (pc + 0),
|
||||
*(GLenum *) (pc + 4),
|
||||
@@ -302,7 +306,9 @@ int
|
||||
__glXDispSwap_GetSeparableFilter(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -310,7 +316,9 @@ int
|
||||
__glXDispSwap_GetSeparableFilterEXT(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -388,7 +396,9 @@ int
|
||||
__glXDispSwap_GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -396,7 +406,9 @@ int
|
||||
__glXDispSwap_GetConvolutionFilterEXT(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -463,7 +475,9 @@ int
|
||||
__glXDispSwap_GetHistogram(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -471,7 +485,9 @@ int
|
||||
__glXDispSwap_GetHistogramEXT(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -529,7 +545,9 @@ int
|
||||
__glXDispSwap_GetMinmax(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -537,7 +555,9 @@ int
|
||||
__glXDispSwap_GetMinmaxEXT(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -605,7 +625,9 @@ int
|
||||
__glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXSingleReq, 16);
|
||||
return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
|
||||
}
|
||||
|
||||
@@ -613,6 +635,8 @@ int
|
||||
__glXDispSwap_GetColorTableSGI(__GLXclientState * cl, GLbyte * pc)
|
||||
{
|
||||
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
|
||||
+ ClientPtr client = cl->client;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16);
|
||||
return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
$NetBSD: patch-glx_swap__interval.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/swap_interval.c.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/swap_interval.c
|
||||
@@ -50,6 +50,8 @@ DoSwapInterval(__GLXclientState * cl, GL
|
||||
__GLXcontext *cx;
|
||||
GLint interval;
|
||||
|
||||
+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 4);
|
||||
+
|
||||
cx = __glXLookupContextByTag(cl, tag);
|
||||
|
||||
if ((cx == NULL) || (cx->pGlxScreen == NULL)) {
|
|
@ -1,17 +0,0 @@
|
|||
$NetBSD: patch-glx_unpack.h,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- glx/unpack.h.orig 2012-05-17 17:09:02.000000000 +0000
|
||||
+++ glx/unpack.h
|
||||
@@ -83,7 +83,8 @@ extern xGLXSingleReply __glXReply;
|
||||
** pointer.
|
||||
*/
|
||||
#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
|
||||
- if ((size) > sizeof(answerBuffer)) { \
|
||||
+ if (size < 0) return BadLength; \
|
||||
+ else if ((size) > sizeof(answerBuffer)) { \
|
||||
int bump; \
|
||||
if ((cl)->returnBufSize < (size)+(align)) { \
|
||||
(cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \
|
|
@ -1,62 +0,0 @@
|
|||
$NetBSD: patch-hw_xfree86_common_compiler.h,v 1.2 2015/09/20 16:39:18 tnn Exp $
|
||||
|
||||
--- hw/xfree86/common/compiler.h.orig 2012-05-17 17:09:03.000000000 +0000
|
||||
+++ hw/xfree86/common/compiler.h
|
||||
@@ -470,7 +470,7 @@ inl(unsigned short port)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(__sparc__)
|
||||
+#elif (defined(linux) || defined(sun) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)) && defined(__sparc__)
|
||||
|
||||
#ifndef ASI_PL
|
||||
#define ASI_PL 0x88
|
||||
@@ -1392,26 +1392,26 @@ inl(unsigned short port)
|
||||
static __inline__ void
|
||||
outb(unsigned short port, unsigned char val)
|
||||
{
|
||||
- __asm__ __volatile__("out%B0 (%1)"::"a"(val), "d"(port));
|
||||
+ __asm__ __volatile__("outb %0, %1"::"a"(val), "d"(port));
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
outw(unsigned short port, unsigned short val)
|
||||
{
|
||||
- __asm__ __volatile__("out%W0 (%1)"::"a"(val), "d"(port));
|
||||
+ __asm__ __volatile__("outw %0, %1"::"a"(val), "d"(port));
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
outl(unsigned short port, unsigned int val)
|
||||
{
|
||||
- __asm__ __volatile__("out%L0 (%1)"::"a"(val), "d"(port));
|
||||
+ __asm__ __volatile__("outl %0, %1"::"a"(val), "d"(port));
|
||||
}
|
||||
|
||||
static __inline__ unsigned int
|
||||
inb(unsigned short port)
|
||||
{
|
||||
unsigned char ret;
|
||||
- __asm__ __volatile__("in%B0 (%1)":"=a"(ret):"d"(port));
|
||||
+ __asm__ __volatile__("inb %1, %0":"=a"(ret):"d"(port));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1420,7 +1420,7 @@ static __inline__ unsigned int
|
||||
inw(unsigned short port)
|
||||
{
|
||||
unsigned short ret;
|
||||
- __asm__ __volatile__("in%W0 (%1)":"=a"(ret):"d"(port));
|
||||
+ __asm__ __volatile__("inw %1, %0":"=a"(ret):"d"(port));
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1429,7 +1429,7 @@ static __inline__ unsigned int
|
||||
inl(unsigned short port)
|
||||
{
|
||||
unsigned int ret;
|
||||
- __asm__ __volatile__("in%L0 (%1)":"=a"(ret):"d"(port));
|
||||
+ __asm__ __volatile__("inl %1, %0":"=a"(ret):"d"(port));
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
$NetBSD: patch-hw_xfree86_common_xf86sbusBus.h,v 1.1 2015/09/20 16:39:18 tnn Exp $
|
||||
|
||||
NetBSD/sparc64 support partially from xsrc.
|
||||
|
||||
--- hw/xfree86/common/xf86sbusBus.h.orig 2012-05-17 17:09:03.000000000 +0000
|
||||
+++ hw/xfree86/common/xf86sbusBus.h
|
||||
@@ -39,6 +39,8 @@
|
||||
#define SBUS_DEVICE_FFB 0x000b
|
||||
#define SBUS_DEVICE_GT 0x000c
|
||||
#define SBUS_DEVICE_MGX 0x000d
|
||||
+#define SBUS_DEVICE_P9100 0x000e
|
||||
+#define SBUS_DEVICE_AG10E 0x000f
|
||||
|
||||
typedef struct sbus_prom_node {
|
||||
int node;
|
||||
@@ -50,7 +52,7 @@ typedef struct sbus_device {
|
||||
int devId;
|
||||
int fbNum;
|
||||
int fd;
|
||||
- int width, height;
|
||||
+ int width, height, size;
|
||||
sbusPromNode node;
|
||||
char *descr;
|
||||
char *device;
|
|
@ -1,40 +0,0 @@
|
|||
$NetBSD: patch-hw_xfree86_dri2_dri2.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
Fix uninitialized variables warning from clang (X crashes without this)
|
||||
|
||||
dri2.c:242:27: note: initialize the variable 'ref' to silence this warning
|
||||
DRI2DrawableRefPtr ref;
|
||||
dri2.c:320:27: note: initialize the variable 'ref' to silence this warning
|
||||
DRI2DrawableRefPtr ref, next;
|
||||
dri2.c:601:27: note: initialize the variable 'ref' to silence this warning
|
||||
DRI2DrawableRefPtr ref;
|
||||
|
||||
--- hw/xfree86/dri2/dri2.c.orig 2012-08-02 00:05:32.000000000 +0000
|
||||
+++ hw/xfree86/dri2/dri2.c
|
||||
@@ -239,7 +239,7 @@ typedef struct DRI2DrawableRefRec {
|
||||
static DRI2DrawableRefPtr
|
||||
DRI2LookupDrawableRef(DRI2DrawablePtr pPriv, XID id)
|
||||
{
|
||||
- DRI2DrawableRefPtr ref;
|
||||
+ DRI2DrawableRefPtr ref = NULL;
|
||||
|
||||
xorg_list_for_each_entry(ref, &pPriv->reference_list, link) {
|
||||
if (ref->id == id)
|
||||
@@ -317,7 +317,7 @@ DRI2DrawableGone(pointer p, XID id)
|
||||
{
|
||||
DRI2DrawablePtr pPriv = p;
|
||||
DRI2ScreenPtr ds = pPriv->dri2_screen;
|
||||
- DRI2DrawableRefPtr ref, next;
|
||||
+ DRI2DrawableRefPtr ref = NULL, next;
|
||||
WindowPtr pWin;
|
||||
PixmapPtr pPixmap;
|
||||
DrawablePtr pDraw;
|
||||
@@ -598,7 +598,7 @@ static void
|
||||
DRI2InvalidateDrawable(DrawablePtr pDraw)
|
||||
{
|
||||
DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
|
||||
- DRI2DrawableRefPtr ref;
|
||||
+ DRI2DrawableRefPtr ref = NULL;
|
||||
|
||||
if (!pPriv || !pPriv->needInvalidate)
|
||||
return;
|
|
@ -1,17 +0,0 @@
|
|||
$NetBSD: patch-hw_xfree86_dri2_dri2ext.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- hw/xfree86/dri2/dri2ext.c.orig 2012-05-17 17:09:03.000000000 +0000
|
||||
+++ hw/xfree86/dri2/dri2ext.c
|
||||
@@ -263,6 +263,9 @@ ProcDRI2GetBuffers(ClientPtr client)
|
||||
unsigned int *attachments;
|
||||
|
||||
REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4);
|
||||
+ if (stuff->count > (INT_MAX / 4))
|
||||
+ return BadLength;
|
||||
+
|
||||
if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess,
|
||||
&pDrawable, &status))
|
||||
return status;
|
|
@ -1,26 +0,0 @@
|
|||
$NetBSD: patch-hw_xfree86_os-support_bsd_sparc64__video.c,v 1.1 2015/09/20 16:39:18 tnn Exp $
|
||||
|
||||
For some reason we need these symbols to link.
|
||||
|
||||
--- hw/xfree86/os-support/bsd/sparc64_video.c.orig 2012-05-17 17:09:03.000000000 +0000
|
||||
+++ hw/xfree86/os-support/bsd/sparc64_video.c
|
||||
@@ -50,6 +50,19 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
|
||||
pVidMem->initialised = TRUE;
|
||||
}
|
||||
|
||||
+void
|
||||
+xf86SetTVOut(int mode)
|
||||
+{
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+xf86SetRGBOut()
|
||||
+{
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static pointer
|
||||
sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size,
|
||||
int flags)
|
|
@ -1,172 +0,0 @@
|
|||
$NetBSD: patch-hw_xfree86_os-support_bus_Sbus.c,v 1.1 2015/09/20 16:39:18 tnn Exp $
|
||||
|
||||
Merge most of netbsdSbus.c from xsrc.
|
||||
|
||||
--- hw/xfree86/os-support/bus/Sbus.c.orig 2012-08-19 15:45:54.000000000 +0000
|
||||
+++ hw/xfree86/os-support/bus/Sbus.c
|
||||
@@ -34,6 +34,9 @@
|
||||
#ifdef sun
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
+#if defined(__NetBSD__) && defined(__sparc__)
|
||||
+#include <dev/ofw/openfirmio.h>
|
||||
+#endif
|
||||
#include "xf86.h"
|
||||
#include "xf86Priv.h"
|
||||
#include "xf86_OSlib.h"
|
||||
@@ -50,7 +53,6 @@ static int promP1275 = -1;
|
||||
|
||||
#define MAX_PROP 128
|
||||
#define MAX_VAL (4096-128-4)
|
||||
-static struct openpromio *promOpio;
|
||||
|
||||
sbusDevicePtr *xf86SbusInfo = NULL;
|
||||
|
||||
@@ -68,68 +70,75 @@ struct sbus_devtable sbusDeviceTable[] =
|
||||
{SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", NULL, "Sun Graphics Tower"},
|
||||
{SBUS_DEVICE_MGX, -1, "mgx", NULL, "Quantum 3D MGXplus"},
|
||||
{SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "sunleo", "Sun ZX or Turbo ZX"},
|
||||
- {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX"},
|
||||
+ {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX or S24"},
|
||||
{SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "sunffb", "Sun FFB"},
|
||||
{SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "sunffb", "Sun Elite3D"},
|
||||
+ {SBUS_DEVICE_P9100, FBTYPE_P9100, "pnozz", "pnozz", "Weitek P9100"},
|
||||
+ {SBUS_DEVICE_AG10E, FBTYPE_AG10E, "ag10e", "ag10e", "Fujitsu AG-10e"},
|
||||
{0, 0, NULL}
|
||||
};
|
||||
|
||||
+static struct ofiocdesc ofio;
|
||||
+static char of_buf[256];
|
||||
+
|
||||
int
|
||||
promGetSibling(int node)
|
||||
{
|
||||
- promOpio->oprom_size = sizeof(int);
|
||||
|
||||
if (node == -1)
|
||||
return 0;
|
||||
- *(int *) promOpio->oprom_array = node;
|
||||
- if (ioctl(promFd, OPROMNEXT, promOpio) < 0)
|
||||
+ if (ioctl(promFd, OFIOCGETNEXT, &node) < 0)
|
||||
return 0;
|
||||
- promCurrentNode = *(int *) promOpio->oprom_array;
|
||||
- return *(int *) promOpio->oprom_array;
|
||||
+ promCurrentNode = node;
|
||||
+ return node;
|
||||
}
|
||||
|
||||
int
|
||||
promGetChild(int node)
|
||||
{
|
||||
- promOpio->oprom_size = sizeof(int);
|
||||
|
||||
if (!node || node == -1)
|
||||
return 0;
|
||||
- *(int *) promOpio->oprom_array = node;
|
||||
- if (ioctl(promFd, OPROMCHILD, promOpio) < 0)
|
||||
+ if (ioctl(promFd, OFIOCGETCHILD, &node) < 0)
|
||||
return 0;
|
||||
- promCurrentNode = *(int *) promOpio->oprom_array;
|
||||
- return *(int *) promOpio->oprom_array;
|
||||
+ promCurrentNode = node;
|
||||
+ return node;
|
||||
}
|
||||
|
||||
char *
|
||||
promGetProperty(const char *prop, int *lenp)
|
||||
{
|
||||
- promOpio->oprom_size = MAX_VAL;
|
||||
|
||||
- strcpy(promOpio->oprom_array, prop);
|
||||
- if (ioctl(promFd, OPROMGETPROP, promOpio) < 0)
|
||||
+ ofio.of_nodeid = promCurrentNode;
|
||||
+ ofio.of_name = (char *)prop;
|
||||
+ ofio.of_namelen = strlen(prop);
|
||||
+ ofio.of_buf = of_buf;
|
||||
+ ofio.of_buflen = sizeof(of_buf);
|
||||
+
|
||||
+ if (ioctl(promFd, OFIOCGET, &ofio) < 0)
|
||||
return 0;
|
||||
+
|
||||
+ of_buf[ofio.of_buflen] = '\0';
|
||||
+
|
||||
if (lenp)
|
||||
- *lenp = promOpio->oprom_size;
|
||||
- return promOpio->oprom_array;
|
||||
+ *lenp = ofio.of_buflen;
|
||||
+ return of_buf;
|
||||
}
|
||||
|
||||
int
|
||||
promGetBool(const char *prop)
|
||||
{
|
||||
- promOpio->oprom_size = 0;
|
||||
+ ofio.of_nodeid = promCurrentNode;
|
||||
+ ofio.of_name = (char *)prop;
|
||||
+ ofio.of_namelen = strlen(prop);
|
||||
+ ofio.of_buf = of_buf;
|
||||
+ ofio.of_buflen = sizeof(of_buf);
|
||||
|
||||
- *(int *) promOpio->oprom_array = 0;
|
||||
- for (;;) {
|
||||
- promOpio->oprom_size = MAX_PROP;
|
||||
- if (ioctl(promFd, OPROMNXTPROP, promOpio) < 0)
|
||||
- return 0;
|
||||
- if (!promOpio->oprom_size)
|
||||
- return 0;
|
||||
- if (!strcmp(promOpio->oprom_array, prop))
|
||||
- return 1;
|
||||
- }
|
||||
+ if (ioctl(promFd, OFIOCGET, &ofio) < 0)
|
||||
+ return 0;
|
||||
+ if (ofio.of_buflen < 0)
|
||||
+ return 0;
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
#define PROM_NODE_SIBLING 0x01
|
||||
@@ -180,8 +189,8 @@ promIsP1275(void)
|
||||
promP1275 = TRUE;
|
||||
else
|
||||
promP1275 = FALSE;
|
||||
-#elif defined(__FreeBSD__)
|
||||
- promP1275 = TRUE;
|
||||
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+ promP1275 = TRUE;
|
||||
#else
|
||||
#error Missing promIsP1275() function for this OS
|
||||
#endif
|
||||
@@ -198,8 +207,6 @@ sparcPromClose(void)
|
||||
close(promFd);
|
||||
promFd = -1;
|
||||
}
|
||||
- free(promOpio);
|
||||
- promOpio = NULL;
|
||||
promOpenCount = 0;
|
||||
}
|
||||
|
||||
@@ -213,11 +220,6 @@ sparcPromInit(void)
|
||||
promFd = open("/dev/openprom", O_RDONLY, 0);
|
||||
if (promFd == -1)
|
||||
return -1;
|
||||
- promOpio = (struct openpromio *) malloc(4096);
|
||||
- if (!promOpio) {
|
||||
- sparcPromClose();
|
||||
- return -1;
|
||||
- }
|
||||
promRootNode = promGetSibling(0);
|
||||
if (!promRootNode) {
|
||||
sparcPromClose();
|
||||
@@ -399,9 +401,9 @@ sparcPromAssignNodes(void)
|
||||
* were the types of the cards missed. */
|
||||
char buffer[64];
|
||||
int fbNum, devId;
|
||||
- static struct {
|
||||
- int devId;
|
||||
- char *prefix;
|
||||
+ static const struct {
|
||||
+ const int devId;
|
||||
+ const char *prefix;
|
||||
} procFbPrefixes[] = {
|
||||
{SBUS_DEVICE_BW2, "BWtwo"},
|
||||
{SBUS_DEVICE_CG14, "CGfourteen"},
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-hw_xfree86_os-support_bus_xf86Sbus.h,v 1.1 2015/09/20 16:39:18 tnn Exp $
|
||||
|
||||
NetBSD/sparc64 support.
|
||||
|
||||
--- hw/xfree86/os-support/bus/xf86Sbus.h.orig 2012-05-17 17:09:03.000000000 +0000
|
||||
+++ hw/xfree86/os-support/bus/xf86Sbus.h
|
||||
@@ -36,6 +36,8 @@
|
||||
#elif defined(SVR4)
|
||||
#include <sys/fbio.h>
|
||||
#include <sys/openpromio.h>
|
||||
+#elif defined(__NetBSD__) && defined(__sparc64__)
|
||||
+#include <dev/sun/fbio.h>
|
||||
#elif defined(__OpenBSD__) && defined(__sparc64__)
|
||||
/* XXX */
|
||||
#elif defined(CSRG_BASED)
|
|
@ -1,15 +0,0 @@
|
|||
$NetBSD: patch-hw_xfree86_os-support_xf86__OSlib.h,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
* treat DragonFly same as newer FreeBSD.
|
||||
|
||||
--- hw/xfree86/os-support/xf86_OSlib.h.orig 2012-05-17 17:09:03.000000000 +0000
|
||||
+++ hw/xfree86/os-support/xf86_OSlib.h
|
||||
@@ -277,7 +277,7 @@ struct pcvtid {
|
||||
#include <dev/wscons/wsdisplay_usl_io.h>
|
||||
#endif /* WSCONS_SUPPORT */
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
-#if defined(__FreeBSD_kernel_version) && (__FreeBSD_kernel_version >= 500013)
|
||||
+#if defined(__FreeBSD_kernel_version) && (__FreeBSD_kernel_version >= 500013) || defined(__DragonFly__)
|
||||
#include <sys/mouse.h>
|
||||
#else
|
||||
#undef MOUSE_GETINFO
|
|
@ -1,21 +0,0 @@
|
|||
$NetBSD: patch-include_dix.h,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- include/dix.h.orig 2012-05-17 17:09:04.000000000 +0000
|
||||
+++ include/dix.h
|
||||
@@ -72,8 +72,13 @@ SOFTWARE.
|
||||
if ((sizeof(req) >> 2) > client->req_len )\
|
||||
return(BadLength)
|
||||
|
||||
+#define REQUEST_AT_LEAST_EXTRA_SIZE(req, extra) \
|
||||
+ if (((sizeof(req) + ((uint64_t) extra)) >> 2) > client->req_len ) \
|
||||
+ return(BadLength)
|
||||
+
|
||||
#define REQUEST_FIXED_SIZE(req, n)\
|
||||
if (((sizeof(req) >> 2) > client->req_len) || \
|
||||
+ (((n) >> 2) >= client->req_len) || \
|
||||
(((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
|
||||
return(BadLength)
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
$NetBSD: patch-include_regionstr.h,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- include/regionstr.h.orig 2012-05-17 17:09:04.000000000 +0000
|
||||
+++ include/regionstr.h
|
||||
@@ -127,7 +127,10 @@ RegionEnd(RegionPtr reg)
|
||||
static inline size_t
|
||||
RegionSizeof(int n)
|
||||
{
|
||||
- return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
|
||||
+ if (n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec)))
|
||||
+ return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
|
||||
+ else
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
@@ -138,9 +141,10 @@ RegionInit(RegionPtr _pReg, BoxPtr _rect
|
||||
(_pReg)->data = (RegDataPtr) NULL;
|
||||
}
|
||||
else {
|
||||
+ size_t rgnSize;
|
||||
(_pReg)->extents = RegionEmptyBox;
|
||||
- if (((_size) > 1) && ((_pReg)->data =
|
||||
- (RegDataPtr) malloc(RegionSizeof(_size)))) {
|
||||
+ if (((_size) > 1) && ((rgnSize = RegionSizeof(_size)) > 0) &&
|
||||
+ (((_pReg)->data = malloc(rgnSize)) != NULL)) {
|
||||
(_pReg)->data->size = (_size);
|
||||
(_pReg)->data->numRects = 0;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
$NetBSD: patch-os_WaitFor.c,v 1.1 2015/10/11 17:51:47 tnn Exp $
|
||||
|
||||
move X11/Xpoll.h include earlier than sys/select.h to avoid missing
|
||||
out on setting FD_SETSIZE early enough.
|
||||
|
||||
--- os/WaitFor.c.orig 2015-05-21 14:23:54.000000000 +0000
|
||||
+++ os/WaitFor.c
|
||||
@@ -52,6 +52,10 @@ SOFTWARE.
|
||||
*
|
||||
*****************************************************************/
|
||||
|
||||
+#ifdef __NetBSD__
|
||||
+#include <X11/Xpoll.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_DIX_CONFIG_H
|
||||
#include <dix-config.h>
|
||||
#endif
|
|
@ -1,27 +0,0 @@
|
|||
$NetBSD: patch-os_access.c,v 1.1 2015/04/03 09:46:18 tnn Exp $
|
||||
|
||||
X.Org Security Advisory: Dec. 9, 2014
|
||||
Protocol handling issues in X Window System servers
|
||||
|
||||
--- os/access.c.orig 2012-05-17 17:09:04.000000000 +0000
|
||||
+++ os/access.c
|
||||
@@ -1331,6 +1331,10 @@ GetHosts(pointer *data, int *pnHosts, in
|
||||
for (host = validhosts; host; host = host->next) {
|
||||
nHosts++;
|
||||
n += pad_to_int32(host->len) + sizeof(xHostEntry);
|
||||
+ /* Could check for INT_MAX, but in reality having more than 1mb of
|
||||
+ hostnames in the access list is ridiculous */
|
||||
+ if (n >= 1048576)
|
||||
+ break;
|
||||
}
|
||||
if (n) {
|
||||
*data = ptr = malloc(n);
|
||||
@@ -1339,6 +1343,8 @@ GetHosts(pointer *data, int *pnHosts, in
|
||||
}
|
||||
for (host = validhosts; host; host = host->next) {
|
||||
len = host->len;
|
||||
+ if ((ptr + sizeof(xHostEntry) + len) > ((unsigned char *) *data + n))
|
||||
+ break;
|
||||
((xHostEntry *) ptr)->family = host->family;
|
||||
((xHostEntry *) ptr)->length = len;
|
||||
ptr += sizeof(xHostEntry);
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue