Commit Graph

19220 Commits

Author SHA1 Message Date
Alan Coopersmith 11450b0946 dix-config.h: add HAVE_SOCKLEN_T definition
Needed to build with IPv6 disabled using gcc 14 on some platforms to avoid:

In file included from /usr/X11/include/X11/Xtrans/transport.c:67,
                 from xstrans.c:17:
/usr/X11/include/X11/Xtrans/Xtranssock.c: In function ‘_XSERVTransSocketOpen’:
/usr/X11/include/X11/Xtrans/Xtranssock.c:467:28: error: passing argument 5
 of ‘getsockopt’ from incompatible pointer type [-Wincompatible-pointer-types]
  467 |             (char *) &val, &len) == 0 && val < 64 * 1024)
      |                            ^~~~
      |                            |
      |                            size_t * {aka long unsigned int *}

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1736>
2024-10-31 16:22:48 +01:00
Matthieu Herrb 87ba472453 xkb: Fix buffer overflow in _XkbSetCompatMap()
The _XkbSetCompatMap() function attempts to resize the `sym_interpret`
buffer.

However, It didn't update its size properly. It updated `num_si` only,
without updating `size_si`.

This may lead to local privilege escalation if the server is run as root
or remote code execution (e.g. x11 over ssh).

CVE-2024-9632, ZDI-CAN-24756

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1733>
2024-10-31 16:22:48 +01:00
Alan Coopersmith 92d73b23a4 modesetting: avoid memory leak when ms_present_check_unflip() returns FALSE
Found by Oracle Parfait 13.3 static analyzer:
   Memory leak [memory-leak]:
      Memory leak of pointer event allocated with calloc(1, 16)
        at line 470 of hw/xfree86/drivers/modesetting/present.c in
	function 'ms_present_unflip'.
          event allocated at line 431 with calloc(1, 16)
          event leaks when ms_present_check_unflip(...) == 0 at line 438
              and i >= config->num_crtc at line 445

Fixes: 13c7d53df ("modesetting: Implement page flipping support for Present.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1730>
2024-10-31 16:22:48 +01:00
Alan Coopersmith 98ee8e1203 dix: limit checks to MAX_VALUATORS when generating Xi events
Previously, it was looping through sizeof(ev->valuators.mask) * 8
valuators, where valuators.mask is defined as an array of
(MAX_VALUATORS + 7) / 8 entries.  Since MAX_VALUATORS is defined as 36,
this made it actually loop through 40 entries.  The last 4 bits in this
array should never be set, so we should never access memory outside the
bounds of the arrays defined to be exactly MAX_VALUATORS in length, but
we can make the static analyzer happier and not waste time checking bits
that should never be set.

Found by Oracle Parfait 13.3 static analyzer:

   Read outside array bounds [read-outside-array-bounds]:
      In array dereference of ev->valuators.data[i] with index i
      Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39
        at line 741 of dix/eventconvert.c in function 'eventToDeviceEvent'.

   Read outside array bounds [read-outside-array-bounds]:
      In array dereference of ev->valuators.data[i] with index i
      Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39
        at line 808 of dix/eventconvert.c in function 'eventToRawEvent'.

   Read outside array bounds [read-outside-array-bounds]:
      In array dereference of ev->valuators.data_raw[i] with index i
      Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39
        at line 809 of dix/eventconvert.c in function 'eventToRawEvent'.

Fixes: b2ba77bac ("dix: add EventToXI2 and GetXI2Type.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1730>
2024-10-31 16:22:47 +01:00
Alan Coopersmith 192ecabba8 dix: fix button offset when generating DeviceButtonStateNotify events
Found by Oracle Parfait 13.3 static analyzer:
   Buffer Overflow in STD C function [buffer-overflow-call-stdc]:
      Buffer overflow in call to memcpy. Buffer &bev->buttons[4] of
       size 24 is written at an offset of 28
      Array size is 28 bytes, index is 32
        at line 743 of dix/enterleave.c in function
	 'DeliverStateNotifyEvent'.

Fixes: a85f0d6b9 ("Xi: fix use of button->down - bitflags instead of int arrays.")
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1730>
2024-10-31 16:22:47 +01:00
Alan Coopersmith cb9977ee5c render: avoid NULL pointer dereference if PictureFindVisual returns NULL
Found by Oracle Parfait 13.3:
   Null pointer dereference [null-pointer-deref]:
      Read from null pointer pVisual
        at line 257 of dix/colormap.c in function 'CreateColormap'.
          Null pointer introduced at line 412 of render/picture.c in
	   function 'PictureFindVisual'.
          Constant 'NULL' passed into function CreateColormap, argument
	   pVisual, from call at line 431 in function
	   'PictureInitIndexedFormat'.
          Function PictureFindVisual may return constant 'NULL' at
	   line 412, called at line 429.

Fixes: d4a101d4e ("Integration of DAMAGE-XFIXES branch to trunk")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1730>
2024-10-31 16:22:47 +01:00
Alan Coopersmith 62497075cc Xi: avoid NULL pointer dereference if GetXTestDevice returns NULL
The comments in that function say "This only happens if master is a
slave device. don't do that" but static analysis doesn't respect that.

Found by Oracle Parfait 13.3:
   Null pointer dereference [null-pointer-deref]:
      Read from null pointer XTestptr
        at line 274 of Xi/xichangehierarchy.c in function 'remove_master'.
          Null pointer introduced at line 691 of Xext/xtest.c in function
	   'GetXTestDevice'.
          Function GetXTestDevice may return constant 'NULL' at line 691,
	   called at line 273 of Xi/xichangehierarchy.c in function
	   'remove_master'.
   Null pointer dereference [null-pointer-deref]:
      Read from null pointer XTestkeybd
        at line 279 of Xi/xichangehierarchy.c in function 'remove_master'.
          Null pointer introduced at line 691 of Xext/xtest.c in function
	   'GetXTestDevice'.
          Function GetXTestDevice may return constant 'NULL' at line 691,
	   called at line 278 of Xi/xichangehierarchy.c in function
	   'remove_master'.

Fixes: 0814f511d ("input: store the master device's ID in the devPrivate for XTest devices.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1730>
2024-10-31 16:22:47 +01:00
Alan Coopersmith 84b57b8d32 xfree86: avoid memory leak on realloc failure
Found by Oracle Parfait 13.3 static analyzer:
   Memory leak [memory-leak]:
      Memory leak of pointer optname allocated with asprintf(&optname,
      "\"%s\"", p->name)
        at line 326 of hw/xfree86/common/xf86Configure.c in function
	'configureDeviceSection'.
          optname allocated at line 309 with asprintf(&optname, "\"%s\"",
	  p->name)

Fixes: code inherited from XFree86
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1730>
2024-10-31 16:22:47 +01:00
Tj 0aaee8e7bc xfree86: fbdevhw: fix pci detection on recent Linux
Linux kernel v6.9 has changed the symlink to point to the parent device. This
breaks fbdev_open() detection logic. Change it to use the subsystem symlink
instead which will remain stable.

Kernel v6.8:

[    14.067] (II) fbdev_open() sysfs_path=/sys/class/graphics/fb0
[    14.067] (II) fbdev_open() buf=../../devices/platform/vesa-framebuffer.0/graphics/fb0

Kernel v6.9:

[    15.609] (II) fbdev_open() sysfs_path=/sys/class/graphics/fb0
[    15.609] (II) fbdev_open() buf=../../devices/pci0000:00/0000:00:01.0/vesa-framebuffer.0/graphics/fb0

Originally found in automated Debian ISO QA testing [0] and confirmed in Linux [1].

Tested on kernels v6.9.7 and v6.8.12

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075713
[1] https://lore.kernel.org/lkml/lLyvPFC_APGHNfyGNHRpQy5izBikkaTPOpHooZIT3fFAoJPquSI31ZMueA99XTdr8ysir3X7O7IMdc6za-0m79vr_claeparHhoRouVgHOI=@proton.me/

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1714
Signed-off-by: Tj <tj.iam.tj@proton.me>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1612>
2024-10-31 16:22:47 +01:00
Enrico Weigelt, metux IT consult 7dc0dff26e xwin: fix memleak on freeing pixmaps
Xwin's DestroyPixmap proc just free()s the PixmapRec directly, w/o catering
for devPrivate's, so leaving a memleak. The correct DIX function for this
is FreePixmap().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1710>
2024-10-31 15:39:06 +01:00
Enrico Weigelt, metux IT consult b96fc1934e dix: make FreeGrab() NULL tolerant
Allow NULL parameters to be passed to FreeGrab(), so callers don't all
need to check on their own anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-10-31 15:39:06 +01:00
Olivier Fourdan 33958af5b5 os: Fix NULL pointer dereference
RemoveHost() can be called from DisableLocalHost() with a NULL client,
but doesn't actually check whether the given client pointer is valid on
error and assigns the error value unconditionally, leading to a possible
NULL pointer dereference and a crash of the Xserver.

To avoid the issue, simply check whether the client pointer is not NULL
prior to assign the errorValue.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1752
See-also: https://bugzilla.redhat.com/2313799
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1701>
2024-10-31 15:39:06 +01:00
Enrico Weigelt, metux IT consult 40317361f4 xfree86: os-support: bsd: fix missing include of xf86_OSproc.h
Missing include of xf86_OSproc.h leads to missing prototype warnings.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1697>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 1c6726a407 CI: update meson from 0.56.2 (bullseye) to 1.0.0 (bullseye-backports)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1668>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 3efc812a06 CI: update libdecor from 0.1.0 to 0.1.1
The install_demo meson_option was added in
libdecor/libdecor@7106f5e329
which is in the 0.1.1 tag, but not 0.1.0.

If we upgrade the version of meson used in the CI to 1.0.0, then it fails
to build libdecor 0.1.0 with: ERROR: Unknown options: "install_demo"

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1668>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 66eba48b3f CI: clone libdecor from fd.o instead of gnome.org
https://gitlab.gnome.org/jadahl/libdecor is archived and the README
says to use  https://gitlab.freedesktop.org/libdecor/libdecor instead.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1668>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 220a3e74a9 CI: Update xcb util libraries to versions with working submodule URLs
The tags previously listed used anongit.fd.o URLs for their submodules
which no longer work.  Update to tags using gitlab.fd.o URL's instead.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1672>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 8731200722 dix: GetPairedDevice: check if GetMaster returned NULL
Clears warning from gcc 14.1:

../dix/devices.c: In function ‘GetPairedDevice’:
../dix/devices.c:2734:15: warning: dereference of NULL ‘dev’
 [CWE-476] [-Wanalyzer-null-dereference]
 2734 |     return dev->spriteInfo? dev->spriteInfo->paired: NULL;
      |            ~~~^~~~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 2e35e40f69 dix: HashResourceID: use unsigned integers for bit shifting
Clears warning from gcc 14.1:

../dix/resource.c: In function ‘HashResourceID’:
../dix/resource.c:691:44: warning: left shift of negative value
 [-Wshift-negative-value]
  691 |     return (id ^ (id >> numBits)) & ~((~0) << numBits);
      |                                            ^~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 6a1fa5cf13 dix: ProcListProperties: skip unneeded work if numProps is 0
No real harm, but clears warning from gcc 14.1:

../dix/property.c: In function ‘ProcListProperties’:
..//dix/property.c:605:27: warning: dereference of NULL ‘temppAtoms’
 [CWE-476] [-Wanalyzer-null-dereference]
  605 |             *temppAtoms++ = pProp->propertyName;
      |             ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Alan Coopersmith e99a8f18ef dix: dixChangeWindowProperty: don't call memcpy if malloc failed
It shouldn't matter, since it would have a length of 0, but it
clears warnings from gcc 14.1:

../dix/property.c: In function ‘dixChangeWindowProperty’:
../dix/property.c:287:9: warning: use of possibly-NULL ‘data’ where
 non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
  287 |         memcpy(data, value, totalSize);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../dix/property.c:324:13: warning: use of possibly-NULL ‘data’ where
 non-null expected [CWE-690] [-Wanalyzer-possible-null-argument]
  324 |             memcpy(data, value, totalSize);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 951c6ac12c dix: InitPredictableAccelerationScheme: avoid memory leak on failure
Clears warning from gcc 14.1:

../dix/ptrveloc.c: In function ‘InitPredictableAccelerationScheme’:
../dix/ptrveloc.c:149:9: warning: leak of ‘<unknown>’
 [CWE-401] [-Wanalyzer-malloc-leak]
  149 |         free(vel);
      |         ^~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Alan Coopersmith c85765ea53 dix: CreateScratchGC: avoid dereference of pointer we just set to NULL
Clears warning from gcc 14.1:

../dix/gc.c: In function ‘CreateScratchGC’:
../dix/gc.c:818:28: warning: dereference of NULL ‘pGC’
 [CWE-476] [-Wanalyzer-null-dereference]
  818 |     pGC->graphicsExposures = FALSE;

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 80284fae7e dix: SetFontPath: don't set errorValue on Success
Clears warning from gcc 14.1:

../dix/dixfonts.c: In function ‘SetFontPath’:
../dix/dixfonts.c:1697:28: warning: use of uninitialized value ‘bad’
 [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
 1697 |         client->errorValue = bad;
      |         ~~~~~~~~~~~~~~~~~~~^~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 09302541a5 dix: PolyText: fully initialize local_closure
Clears warning from gcc 14.1:

../dix/dixfonts.c:1352:15: warning: use of uninitialized value ‘*c.data’
 [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
 1352 |         free(c->data);
      |              ~^~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Alan Coopersmith 6939e4f7ea dix: check for calloc() failure in Xi event conversion routines
Clears up 12 -Wanalyzer-possible-null-dereference warnings from gcc 14.1

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673>
2024-10-31 15:39:06 +01:00
Olivier Fourdan ebc593d92c build: Fix DRI3 on DragonFly and OpenBSD
Commit 96bdc156 added a check for <sys/eventfd.h> to enable DRI3.

DragonFly and OpenBSD however rely on epoll-shim for <sys/eventfd.h>,
so that must be added as a dependency for the <sys/eventfd.h> check.

Fixes: commit 96bdc156 - xwayland: Do not enable DRI3 without eventfd
Suggested-by: Jan Beich <jbeich@freebsd.org>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1642>
2024-10-31 15:39:06 +01:00
Olivier Fourdan 279cb5d17c build: Move epoll dependency check
DragonFly and OpenBSD rely on epoll-shim to provide eventfd.

Move the check for epoll dependency to the root meson.build script so
that we can use that for the <sys/evenfd.h> check as well.

This is preparation work for the following commits, no functional change
intended at this point.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1642>
2024-10-31 15:39:06 +01:00
Matthieu Herrb bb36aa5ae1 Fix a double-free on syntax error without a new line.
$ echo "#foo\nfoo" > custom_config $ X -config custom_config

will trigger the double free because the contents of xf86_lex_val.str
have been realloc()ed aready  when free is called in read.c:209.

This copies the lex token and adds all the necessary free() calls to
avoid leaking it

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1176>
2024-10-31 15:39:06 +01:00
Peter Hutterer fd7da4bddd Xi: when removing a master search for a disabled paired device
If either the master pointer or keyboard was disabled, the respective
GetMaster() call returns NULL, causing a segfault later accessing the
deviceid.

Fix this by looking in the off_devices list for any master
device of the type we're looking for. Master devices lose the pairing
when disabled (on enabling a keyboard we simply pair with the first
available unpaired pointer).

And for readability, split the device we get from the protocol request
into a new "dev" variable instead of re-using ptr.

Fixes #1611

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1256>
2024-10-31 15:39:06 +01:00
Peter Hutterer f38faab295 dix: don't push the XKB state to a non-existing master keyboard
If our master keyboard is disabled, GetMaster() returns NULL and
we segfault in XkbPushLockedStateToSlaves().

Fixes 45fb3a934d
Fixes #1611

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1256>
2024-10-31 15:39:06 +01:00
Matthieu Herrb 383fa6b4f7 Return NULL in *cmdname if the client argv or argv[0] is NULL
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/995>
2024-10-31 15:39:06 +01:00
Matthieu Herrb 9f7845ae22 Don't crash if the client argv or argv[0] is NULL.
Report from  bauerm at pestilenz dot org.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/995>
2024-10-31 15:39:06 +01:00
Enrico Weigelt, metux IT consult 0676cee63a include: dixfontstr.h: drop silent dependency on libxfont2
This header includes libxfont2.h, but the dependency isn't stated anywhere,
causing some drivers to FTBS (when libxont2.h is in non-standard location).

Since this header doesn't seem to need including libxfont2.h at all, just
stop including it, instead of adding yet another dependency to server SDK.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1610>
2024-10-31 15:28:48 +01:00
Enrico Weigelt, metux IT consult e90b43b94f Xnest XCB version 24.1.0.0
First release since three years:

* Xnest has been fully transitioned to XCB (no Xlib deps anymore)
* By default only builds Xnest DDX (others still can be enabled via options)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-30 12:28:49 +02:00
Enrico Weigelt, metux IT consult 2a72c3f936 meson.build: change project name to xnest
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-30 12:28:49 +02:00
Enrico Weigelt, metux IT consult 13bee96873 meson_options: disable all DDX'es but Xnest
This branch is specifically for just Xnest only, so disable anything else
per default. The others still can be enabled via meson options.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-30 12:28:30 +02:00
Enrico Weigelt, metux IT consult a8c4d88937 ci: use master branch of xf86-video-qxl driver
Need some fixes not in a tagged release yet.
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult f2b5a09fa6 ci: always build with drivers 2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 415520e0e6 ci: freebsd: fix missing xcb-aux and xcb-util-wm
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 1c473a5248 bsd: drop PCCONS support
The old PCCONS driver only seems to be used on minimal install disks and
cannot coexist with newer ones, so there's probably no practical use case for
supporting it in Xorg anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 427a2eec18 os: replace GenerateRandomData() by custom arc4random_buf() on platforms that missing it
arc4random_buf() is a pretty standard libc function on Unix'oid platforms,
but not all our targets have it, thus we need a fallback there. Currently we
have GenerateRandomData(), which either just wraps arc4random_buf() or provides
some fallback implementation.

For those cases it's easier to just implement missing functions directly
instead of having custom wrapper functions. So, drop GenerateRandomData()
in favor of arc4random_buf() and provide fallback implementation for where
it is missing.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 103334c3f5 os: don't include client.h anymore
There's no need to include client.h anymore. But still leaving it, in case
some external consumer relying on it's presence.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 0bef44c198 (submit/os-screensaver) os: unexport screen saver timer functions
These functions aren't supposed to be used by drivers, so move them
out of the public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 59463b7a99 (submit/rename-panoramix-sym) rename old symbol PANORAMIX to XINERAMA
PANORAMIX was the original working title of the extension, before it became
official standard. Just nobody cared about fixing the symbols to the official
naming.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult f327de8a4b (submit/dix_typedef_fixes) dix: fix duplicate typedef of CallbackListPtr
fix warning on duplicated typedef:

> In file included from ../dix/main.c:86:
> ../dix/callback_priv.h:10:31: warning: redefinition of typedef 'CallbackListPtr' is a C11 feature [-Wtypedef-redefinition]
> typedef struct _CallbackList *CallbackListPtr;
>                               ^
> ../include/callback.h:60:31: note: previous definition is here
> typedef struct _CallbackList *CallbackListPtr;  /* also in misc.h */
>                               ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 514081d23a (submit/dix_typedef_fixes) dix: fix duplicate typedef of MotionTracker and *MotionTrackerPtr
fix warning on duplicate typedef:

> In file included from ../hw/xfree86/common/xf86Xinput.c:59:
> ../dix/ptrveloc_priv.h:33:3: warning: redefinition of typedef 'MotionTracker' is a C11 feature [-Wtypedef-redefinition]
> } MotionTracker, *MotionTrackerPtr;
>   ^
> ../include/ptrveloc.h:54:31: note: previous definition is here
> typedef struct _MotionTracker MotionTracker, *MotionTrackerPtr;
>                               ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult cc8a5164c6 (submit/dix_typedef_fixes) dix: fix duplicate typedef of PointerAccelerationProfileFunc
fix warning:

> ../dix/ptrveloc_priv.h:20:18: warning: redefinition of typedef 'PointerAccelerationProfileFunc' is a C11 feature [-Wtypedef-redefinition]
> typedef double (*PointerAccelerationProfileFunc)
>                  ^
> ../include/ptrveloc.h:50:18: note: previous definition is here
> typedef double (*PointerAccelerationProfileFunc)
>                  ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 8cac273856 (submit/dix_typedef_fixes) dix: fix duplicate typedef of *ScreenPtr
fix warning:

> In file included from ../hw/xfree86/common/xf86Init.c:53:
> In file included from ../include/input.h:51:
> ../include/screenint.h:55:25: warning: redefinition of typedef 'ScreenPtr' is a C11 feature [-Wtypedef-redefinition]
> typedef struct _Screen *ScreenPtr;
>                         ^
> ../dix/screenint_priv.h:11:25: note: previous definition is here
> typedef struct _Screen *ScreenPtr;
>                         ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00
Enrico Weigelt, metux IT consult 1d6b86bdef (submit/extDevReason) xkb: drop unused variable extDevReason
fix warning on unused variable:

> ../xkb/xkb.c:3576:18: warning: variable 'extDevReason' set but not used [-Wunused-but-set-variable]
>     unsigned int extDevReason;
                 ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:22 +02:00