From: Romain Naour Date: Sat, 7 Oct 2017 13:01:56 +0000 (+0200) Subject: package/x11r7/xserver_xorg-server: rename patch directory after the last version... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7cf8a08feb67052d9b3502dbdcbeaeda26b55665;p=buildroot.git package/x11r7/xserver_xorg-server: rename patch directory after the last version bump The last bump [1] forgot to rename the patch directory and remove upstream patches. We still need to fix the monotonic clock check which doesn't work when cross-compiling. [1] 436659c55f8d3c6155546cfc666a13c793d992f9 Signed-off-by: Romain Naour Cc: Bernd Kuhls Cc: Peter Korsgaard Acked-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- diff --git a/package/x11r7/xserver_xorg-server/1.19.3/0001-modesettings-needs-dri2.patch b/package/x11r7/xserver_xorg-server/1.19.3/0001-modesettings-needs-dri2.patch deleted file mode 100644 index 4ef95efc3e..0000000000 --- a/package/x11r7/xserver_xorg-server/1.19.3/0001-modesettings-needs-dri2.patch +++ /dev/null @@ -1,19 +0,0 @@ -Kernel modesettings support also depends on dri2, see -http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/Makefile.am#n46 - -Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=91584 - -Signed-off-by: Bernd Kuhls - -diff -uNr xorg-server-1.17.2.org/configure.ac xorg-server-1.17.2/configure.ac ---- xorg-server-1.17.2.org/configure.ac 2015-06-16 17:42:40.000000000 +0200 -+++ xorg-server-1.17.2/configure.ac 2015-08-08 10:44:59.702382624 +0200 -@@ -2036,7 +2036,7 @@ - XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" - fi - -- if test "x$DRM" = xyes; then -+ if test "x$DRM" = xyes -a "x$DRI2" = xyes; then - dnl 2.4.46 is required for cursor hotspot support. - PKG_CHECK_EXISTS(libdrm >= 2.4.46) - XORG_DRIVER_MODESETTING=yes diff --git a/package/x11r7/xserver_xorg-server/1.19.3/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch b/package/x11r7/xserver_xorg-server/1.19.3/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch deleted file mode 100644 index c5f04bf251..0000000000 --- a/package/x11r7/xserver_xorg-server/1.19.3/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch +++ /dev/null @@ -1,66 +0,0 @@ -Discover monotonic clock using compile-time check - -monotonic clock check does not work when cross-compiling. - -Upstream-Status: Denied [Does not work on OpenBSD] -Signed-off-by: Jussi Kukkonen - - - -Original patch follows: - -When xorg-xserver is being cross-compiled, there is currently no way -for us to detect whether the monotonic clock is available on the -target system, because we aren't able to run a test program on the host -system. Currently, in this situation, we default to not use the -monotonic clock. One problem with this situation is that the user will -be treated as idle when the date is updated. - -To fix this situation, we now use a compile-time check to detect whether the -monotonic clock is available. This check can run just fine when we are -cross-compiling. - -Signed-off-by: David James - -Downloaded from -https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch - -Signed-off-by: Bernd Kuhls ---- - configure.ac | 17 +++++++---------- - 1 file changed, 7 insertions(+), 10 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f7ab48c..26e85cd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1048,19 +1048,16 @@ if ! test "x$have_clock_gettime" = xno; then - CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" - fi - -- AC_RUN_IFELSE([AC_LANG_SOURCE([ -+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ - #include -- --int main(int argc, char *argv[[]]) { -- struct timespec tp; -- -- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) -+#include -+int main() { -+#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) -+ #error No monotonic clock -+#endif - return 0; -- else -- return 1; - } -- ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], -- [MONOTONIC_CLOCK="cross compiling"]) -+]])],[MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no]) - - LIBS="$LIBS_SAVE" - CPPFLAGS="$CPPFLAGS_SAVE" --- -2.1.4 - diff --git a/package/x11r7/xserver_xorg-server/1.19.3/0003-Remove-check-for-useSIGIO-option.patch b/package/x11r7/xserver_xorg-server/1.19.3/0003-Remove-check-for-useSIGIO-option.patch deleted file mode 100644 index d4f0cca67e..0000000000 --- a/package/x11r7/xserver_xorg-server/1.19.3/0003-Remove-check-for-useSIGIO-option.patch +++ /dev/null @@ -1,53 +0,0 @@ -From cf407b16cd65ad6e26a9c8e5984e163409a5c0f7 Mon Sep 17 00:00:00 2001 -From: Prabhu Sundararaj -Date: Mon, 30 Jan 2017 16:32:06 -0600 -Subject: [PATCH] Remove check for useSIGIO option - -Original patch follows: -Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removes the configure of useSIGIO -option. - -As the xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO -and OsReleaseSIGIO. - -No longer the check for useSIGIO is needed - -Upstream-Status: Pending - -Signed-off-by: Prabhu Sundararaj - -Downloaded from -https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch - -Signed-off-by: Mylène Josserand ---- - hw/xfree86/os-support/shared/sigio.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c -index 884a71c..be76498 100644 ---- a/hw/xfree86/os-support/shared/sigio.c -+++ b/hw/xfree86/os-support/shared/sigio.c -@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) - int i; - int installed = FALSE; - -- if (!xf86Info.useSIGIO) -- return 0; -- - for (i = 0; i < MAX_FUNCS; i++) { - if (!xf86SigIOFuncs[i].f) { - if (xf86IsPipe(fd)) -@@ -256,9 +253,6 @@ xf86RemoveSIGIOHandler(int fd) - int max; - int ret; - -- if (!xf86Info.useSIGIO) -- return 0; -- - max = 0; - ret = 0; - for (i = 0; i < MAX_FUNCS; i++) { --- -2.7.4 - diff --git a/package/x11r7/xserver_xorg-server/1.19.3/0004-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch b/package/x11r7/xserver_xorg-server/1.19.3/0004-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch deleted file mode 100644 index c15dc9f50c..0000000000 --- a/package/x11r7/xserver_xorg-server/1.19.3/0004-Xi-Zero-target-buffer-in-SProcXSendExtensionEvent.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 05442de962d3dc624f79fc1a00eca3ffc5489ced Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Wed, 24 May 2017 15:54:39 +0300 -Subject: [PATCH] Xi: Zero target buffer in SProcXSendExtensionEvent. - -Make sure that the xEvent eventT is initialized with zeros, the same way as -in SProcSendEvent. - -Some event swapping functions do not overwrite all 32 bytes of xEvent -structure, for example XSecurityAuthorizationRevoked. Two cooperating -clients, one swapped and the other not, can send -XSecurityAuthorizationRevoked event to each other to retrieve old stack data -from X server. This can be potentialy misused to go around ASLR or -stack-protector. - -Signed-off-by: Michal Srb -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Signed-off-by: Peter Korsgaard ---- - Xi/sendexev.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Xi/sendexev.c b/Xi/sendexev.c -index 11d82029f..1cf118ab6 100644 ---- a/Xi/sendexev.c -+++ b/Xi/sendexev.c -@@ -78,7 +78,7 @@ SProcXSendExtensionEvent(ClientPtr client) - { - CARD32 *p; - int i; -- xEvent eventT; -+ xEvent eventT = { .u.u.type = 0 }; - xEvent *eventP; - EventSwapPtr proc; - --- -2.11.0 - diff --git a/package/x11r7/xserver_xorg-server/1.19.3/0005-dix-Disallow-GenericEvent-in-SendEvent-request.patch b/package/x11r7/xserver_xorg-server/1.19.3/0005-dix-Disallow-GenericEvent-in-SendEvent-request.patch deleted file mode 100644 index 12da5f5cba..0000000000 --- a/package/x11r7/xserver_xorg-server/1.19.3/0005-dix-Disallow-GenericEvent-in-SendEvent-request.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 215f894965df5fb0bb45b107d84524e700d2073c Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Wed, 24 May 2017 15:54:40 +0300 -Subject: [PATCH] dix: Disallow GenericEvent in SendEvent request. - -The SendEvent request holds xEvent which is exactly 32 bytes long, no more, -no less. Both ProcSendEvent and SProcSendEvent verify that the received data -exactly match the request size. However nothing stops the client from passing -in event with xEvent::type = GenericEvent and any value of -xGenericEvent::length. - -In the case of ProcSendEvent, the event will be eventually passed to -WriteEventsToClient which will see that it is Generic event and copy the -arbitrary length from the receive buffer (and possibly past it) and send it to -the other client. This allows clients to copy unitialized heap memory out of X -server or to crash it. - -In case of SProcSendEvent, it will attempt to swap the incoming event by -calling a swapping function from the EventSwapVector array. The swapped event -is written to target buffer, which in this case is local xEvent variable. The -xEvent variable is 32 bytes long, but the swapping functions for GenericEvents -expect that the target buffer has size matching the size of the source -GenericEvent. This allows clients to cause stack buffer overflows. - -Signed-off-by: Michal Srb -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Signed-off-by: Peter Korsgaard ---- - dix/events.c | 6 ++++++ - dix/swapreq.c | 7 +++++++ - 2 files changed, 13 insertions(+) - -diff --git a/dix/events.c b/dix/events.c -index 3e3a01ef9..d3a33ea3f 100644 ---- a/dix/events.c -+++ b/dix/events.c -@@ -5366,6 +5366,12 @@ ProcSendEvent(ClientPtr client) - client->errorValue = stuff->event.u.u.type; - return BadValue; - } -+ /* Generic events can have variable size, but SendEvent request holds -+ exactly 32B of event data. */ -+ if (stuff->event.u.u.type == GenericEvent) { -+ client->errorValue = stuff->event.u.u.type; -+ return BadValue; -+ } - if (stuff->event.u.u.type == ClientMessage && - stuff->event.u.u.detail != 8 && - stuff->event.u.u.detail != 16 && stuff->event.u.u.detail != 32) { -diff --git a/dix/swapreq.c b/dix/swapreq.c -index 719e9b81c..67850593b 100644 ---- a/dix/swapreq.c -+++ b/dix/swapreq.c -@@ -292,6 +292,13 @@ SProcSendEvent(ClientPtr client) - swapl(&stuff->destination); - swapl(&stuff->eventMask); - -+ /* Generic events can have variable size, but SendEvent request holds -+ exactly 32B of event data. */ -+ if (stuff->event.u.u.type == GenericEvent) { -+ client->errorValue = stuff->event.u.u.type; -+ return BadValue; -+ } -+ - /* Swap event */ - proc = EventSwapVector[stuff->event.u.u.type & 0177]; - if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */ --- -2.11.0 - diff --git a/package/x11r7/xserver_xorg-server/1.19.3/0006-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch b/package/x11r7/xserver_xorg-server/1.19.3/0006-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch deleted file mode 100644 index 2e651006ba..0000000000 --- a/package/x11r7/xserver_xorg-server/1.19.3/0006-Xi-Verify-all-events-in-ProcXSendExtensionEvent.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 8caed4df36b1f802b4992edcfd282cbeeec35d9d Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Wed, 24 May 2017 15:54:41 +0300 -Subject: [PATCH] Xi: Verify all events in ProcXSendExtensionEvent. - -The requirement is that events have type in range -EXTENSION_EVENT_BASE..lastEvent, but it was tested -only for first event of all. - -Signed-off-by: Michal Srb -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Signed-off-by: Peter Korsgaard ---- - Xi/sendexev.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/Xi/sendexev.c b/Xi/sendexev.c -index 1cf118ab6..5e63bfcca 100644 ---- a/Xi/sendexev.c -+++ b/Xi/sendexev.c -@@ -117,7 +117,7 @@ SProcXSendExtensionEvent(ClientPtr client) - int - ProcXSendExtensionEvent(ClientPtr client) - { -- int ret; -+ int ret, i; - DeviceIntPtr dev; - xEvent *first; - XEventClass *list; -@@ -141,10 +141,12 @@ ProcXSendExtensionEvent(ClientPtr client) - /* The client's event type must be one defined by an extension. */ - - first = ((xEvent *) &stuff[1]); -- if (!((EXTENSION_EVENT_BASE <= first->u.u.type) && -- (first->u.u.type < lastEvent))) { -- client->errorValue = first->u.u.type; -- return BadValue; -+ for (i = 0; i < stuff->num_events; i++) { -+ if (!((EXTENSION_EVENT_BASE <= first[i].u.u.type) && -+ (first[i].u.u.type < lastEvent))) { -+ client->errorValue = first[i].u.u.type; -+ return BadValue; -+ } - } - - list = (XEventClass *) (first + stuff->num_events); --- -2.11.0 - diff --git a/package/x11r7/xserver_xorg-server/1.19.3/0007-Xi-Do-not-try-to-swap-GenericEvent.patch b/package/x11r7/xserver_xorg-server/1.19.3/0007-Xi-Do-not-try-to-swap-GenericEvent.patch deleted file mode 100644 index 871e7621ed..0000000000 --- a/package/x11r7/xserver_xorg-server/1.19.3/0007-Xi-Do-not-try-to-swap-GenericEvent.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ba336b24052122b136486961c82deac76bbde455 Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Wed, 24 May 2017 15:54:42 +0300 -Subject: [PATCH] Xi: Do not try to swap GenericEvent. - -The SProcXSendExtensionEvent must not attempt to swap GenericEvent because -it is assuming that the event has fixed size and gives the swapping function -xEvent-sized buffer. - -A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway. - -Signed-off-by: Michal Srb -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer -Signed-off-by: Peter Korsgaard ---- - Xi/sendexev.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/Xi/sendexev.c b/Xi/sendexev.c -index 5e63bfcca..5c2e0fc56 100644 ---- a/Xi/sendexev.c -+++ b/Xi/sendexev.c -@@ -95,9 +95,17 @@ SProcXSendExtensionEvent(ClientPtr client) - - eventP = (xEvent *) &stuff[1]; - for (i = 0; i < stuff->num_events; i++, eventP++) { -+ if (eventP->u.u.type == GenericEvent) { -+ client->errorValue = eventP->u.u.type; -+ return BadValue; -+ } -+ - proc = EventSwapVector[eventP->u.u.type & 0177]; -- if (proc == NotImplemented) /* no swapping proc; invalid event type? */ -+ /* no swapping proc; invalid event type? */ -+ if (proc == NotImplemented) { -+ client->errorValue = eventP->u.u.type; - return BadValue; -+ } - (*proc) (eventP, &eventT); - *eventP = eventT; - } --- -2.11.0 - diff --git a/package/x11r7/xserver_xorg-server/1.19.4/0001-modesettings-needs-dri2.patch b/package/x11r7/xserver_xorg-server/1.19.4/0001-modesettings-needs-dri2.patch new file mode 100644 index 0000000000..4ef95efc3e --- /dev/null +++ b/package/x11r7/xserver_xorg-server/1.19.4/0001-modesettings-needs-dri2.patch @@ -0,0 +1,19 @@ +Kernel modesettings support also depends on dri2, see +http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/Makefile.am#n46 + +Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=91584 + +Signed-off-by: Bernd Kuhls + +diff -uNr xorg-server-1.17.2.org/configure.ac xorg-server-1.17.2/configure.ac +--- xorg-server-1.17.2.org/configure.ac 2015-06-16 17:42:40.000000000 +0200 ++++ xorg-server-1.17.2/configure.ac 2015-08-08 10:44:59.702382624 +0200 +@@ -2036,7 +2036,7 @@ + XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" + fi + +- if test "x$DRM" = xyes; then ++ if test "x$DRM" = xyes -a "x$DRI2" = xyes; then + dnl 2.4.46 is required for cursor hotspot support. + PKG_CHECK_EXISTS(libdrm >= 2.4.46) + XORG_DRIVER_MODESETTING=yes diff --git a/package/x11r7/xserver_xorg-server/1.19.4/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch b/package/x11r7/xserver_xorg-server/1.19.4/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch new file mode 100644 index 0000000000..c5f04bf251 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/1.19.4/0002-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch @@ -0,0 +1,66 @@ +Discover monotonic clock using compile-time check + +monotonic clock check does not work when cross-compiling. + +Upstream-Status: Denied [Does not work on OpenBSD] +Signed-off-by: Jussi Kukkonen + + + +Original patch follows: + +When xorg-xserver is being cross-compiled, there is currently no way +for us to detect whether the monotonic clock is available on the +target system, because we aren't able to run a test program on the host +system. Currently, in this situation, we default to not use the +monotonic clock. One problem with this situation is that the user will +be treated as idle when the date is updated. + +To fix this situation, we now use a compile-time check to detect whether the +monotonic clock is available. This check can run just fine when we are +cross-compiling. + +Signed-off-by: David James + +Downloaded from +https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch + +Signed-off-by: Bernd Kuhls +--- + configure.ac | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f7ab48c..26e85cd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1048,19 +1048,16 @@ if ! test "x$have_clock_gettime" = xno; then + CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" + fi + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include +- +-int main(int argc, char *argv[[]]) { +- struct timespec tp; +- +- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) ++#include ++int main() { ++#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) ++ #error No monotonic clock ++#endif + return 0; +- else +- return 1; + } +- ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], +- [MONOTONIC_CLOCK="cross compiling"]) ++]])],[MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no]) + + LIBS="$LIBS_SAVE" + CPPFLAGS="$CPPFLAGS_SAVE" +-- +2.1.4 + diff --git a/package/x11r7/xserver_xorg-server/1.19.4/0003-Remove-check-for-useSIGIO-option.patch b/package/x11r7/xserver_xorg-server/1.19.4/0003-Remove-check-for-useSIGIO-option.patch new file mode 100644 index 0000000000..d4f0cca67e --- /dev/null +++ b/package/x11r7/xserver_xorg-server/1.19.4/0003-Remove-check-for-useSIGIO-option.patch @@ -0,0 +1,53 @@ +From cf407b16cd65ad6e26a9c8e5984e163409a5c0f7 Mon Sep 17 00:00:00 2001 +From: Prabhu Sundararaj +Date: Mon, 30 Jan 2017 16:32:06 -0600 +Subject: [PATCH] Remove check for useSIGIO option + +Original patch follows: +Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removes the configure of useSIGIO +option. + +As the xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO +and OsReleaseSIGIO. + +No longer the check for useSIGIO is needed + +Upstream-Status: Pending + +Signed-off-by: Prabhu Sundararaj + +Downloaded from +https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch + +Signed-off-by: Mylène Josserand +--- + hw/xfree86/os-support/shared/sigio.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c +index 884a71c..be76498 100644 +--- a/hw/xfree86/os-support/shared/sigio.c ++++ b/hw/xfree86/os-support/shared/sigio.c +@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) + int i; + int installed = FALSE; + +- if (!xf86Info.useSIGIO) +- return 0; +- + for (i = 0; i < MAX_FUNCS; i++) { + if (!xf86SigIOFuncs[i].f) { + if (xf86IsPipe(fd)) +@@ -256,9 +253,6 @@ xf86RemoveSIGIOHandler(int fd) + int max; + int ret; + +- if (!xf86Info.useSIGIO) +- return 0; +- + max = 0; + ret = 0; + for (i = 0; i < MAX_FUNCS; i++) { +-- +2.7.4 +