Commit Graph

19284 Commits

Author SHA1 Message Date
Alan Coopersmith 9a6aec9bf6 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:24:41 +01:00
Matthieu Herrb 07a0acd246 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:24:41 +01:00
Alan Coopersmith 7cc0695cf7 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:24:41 +01:00
Alan Coopersmith 8fa1ac2b50 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:24:41 +01:00
Alan Coopersmith 49a8d866ed 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:24:41 +01:00
Alan Coopersmith 49bdf60143 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:24:41 +01:00
Alan Coopersmith 284ad8e473 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:24:41 +01:00
Alan Coopersmith 1d7b5e2957 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:24:41 +01:00
Tj a1c43931d4 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:24:41 +01:00
Enrico Weigelt, metux IT consult eb9aa7a5d2 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:44:46 +01:00
Olivier Fourdan dfd1da4bbc 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:44:45 +01:00
Matthieu Herrb ef6b615aa8 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:43:35 +01:00
Matthieu Herrb 609f506d3d 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:43:34 +01:00
Enrico Weigelt, metux IT consult 702b1687fd Xnest XCB version 24.2.0.0
2nd release this year:

* added syslog support
* xfree86: fixed DRI crash bug (#1053, #1534)
* bunch of little cleanups and fixes
* 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-09-19 15:23:56 +02:00
Enrico Weigelt, metux IT consult 23040f3814 meson.build: change project name to xnest
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:17:54 +02:00
Enrico Weigelt, metux IT consult 8eb6c1f173 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-09-19 15:17:48 +02:00
Enrico Weigelt, metux IT consult d84bca91ec mi: miInitVisuals: clean up variable declarations
The code is easier to understand when variables are declared where they're
used for the first time, scoped to where they're needed and not reused
for separate things.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:04:37 +02:00
Doug Brown 4898415c6b dri2: Protect against dri2ClientPrivate assertion failures
If DRI2ScreenInit hasn't been called yet, DRI2Authenticate and
DRI2CreateDrawable2 cause the X server to crash. This has been observed
to happen on multiple modern Linux distros in various conditions,
including QEMU and VMware VMs. Make these functions more robust in order
to prevent the crash.

This patch was originally provided by Bernhard Übelacker and expanded
upon by Mark Wagner.

Signed-off-by: Doug Brown <doug@schmorgal.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1053
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1534
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 9747ade9b1 xnest: add pixmap depths to global depth list
Right now, we're only registering the depths of our visuals, which are
mirroring upstream's visuals. But forgotten to register the pixmap depths
that don't have an assiocated visual.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 13fcc8f4c5 (!1700) meson: drop defining BIGREQS
This symbol isn't used for decades, so no need to define it at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 31bc28a36e dix: lookup function for WindowPtr by XID
This new lookup function retrieves a pointer to WindowRec structure by
associated XID. Unlike dixLookupWindow(), this one works globally, instead
of just on one specific client, and it doesn't do any XACE calls.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 1c31902425 ci: always build with drivers 2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult c0de503adb ci: freebsd: fix missing xcb-aux and xcb-util-wm
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 00e23cb0d6 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-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 70a25209ac 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-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 9d1937cd79 WIP: reorder includes
(submit/cursor-api) dix: drop superfluous XineramaGetCursorScreen()

It's only used for record extension, no external callers, thus doesn't
need to be exported. Since it's just for retrieving one struct value,
it's not needed at all - we can do this directly (just like we do in
many other places)

Note: the check on noPanoramixExtensions is superfluous, since the only
call site already does it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 5c96b80a8d (!1695) dix: unexport Ones()
It's not used by any module/driver, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult bbdef9336f (!1694) xvmc: unexport XvMCFindXvImage()
It's not needed by any driver, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 7bbdd50103 (!1693) xvmc: move over protocol version defines into xvmc.c
These are exclusively used in one source file, so no need to keep them
in a global header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult c88abea2fe (!1692) Xext: xvmc: drop unused XvMCScreenInitProc
This pointer field isn't used anywhere, neither in Xorg nor in drivers.
No need to keep it around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 57d6c2477a (!1691) os: log: replace VErrorF() by LogVMessageVerb()
Since LogVMessageVerb() is now signal safe, we can use this one instead.
Leaving VErrorF() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 76ad971c52 (!1691) xwin: drop duplicate OsVendorVErrorF()
It really doesn't seem to be necessary to protect a LogVMessageVerb()
call by extra mutex on windows only, while obviously not needed on
any other platform.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult d49410d599 (!1691) os: log: replace VErrorFSigSafe() by VErrorF()
Since VErrorF() is now signal safe, we can use this one instead.
Leaving VErrorFSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 8dbd909d7b (!1691) os: log: replace ErrorFSigSafe() by ErrorF()
Since ErrorF() is now signal safe, we can use this one instead.
Leaving ErrorFSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 91b6453087 (!1691) os: log: replace LogMessageVerbSigSafe() by LogMessageVerb()
Since LogMessageVerb() is now signal safe, we can use this one instead.
Leaving LogMessageVerbSigSafe() macro for backwards compat with drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 52de3c7fd2 (!1691) os: log: make LogVMessageVerb() signal safe
We already have our own signal safe vnsprintf() implementation, which is used
for formatting log messages while being in a signal handler, there's no need
to have two separate implementations of all the logging functions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 8ca763453a (!1691) os: log: consolidate log formatting functions
Simplify log formatting functions and remove redundancies, e.g.:

* common function for line termination
* copy prefix directly instead of *printf'ing it
* now just exactly one LogSWrite() call per message
  (good for other log targets like syslog)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 488a97463f (!1691) os: log: drop unused variables
Drop some unneeded variabes, whose values can be computed at compile-time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 0c306f780f (!1690) pseudoramiX: fix warning from unused REQUEST() macro calls
In the SProc*()s, lots of REQUEST() macro calls aren't needed and causing
warnings on unused variables:

    ../pseudoramiX/pseudoramiX.c: In function ‘SProcPseudoramiXQueryVersion’:
    ../include/dix.h:66:12: warning: unused variable ‘stuff’ [-Wunused-variable]
       66 |     type * stuff = (type *)client->requestBuffer;
          |            ^~~~~
    ../pseudoramiX/pseudoramiX.c:408:5: note: in expansion of macro ‘REQUEST’
      408 |     REQUEST(xPanoramiXQueryVersionReq);
          |     ^~~~~~~
    ../pseudoramiX/pseudoramiX.c: In function ‘SProcPseudoramiXGetState’:
    ../include/dix.h:66:12: warning: unused variable ‘stuff’ [-Wunused-variable]
       66 |     type * stuff = (type *)client->requestBuffer;
          |            ^~~~~
    ../pseudoramiX/pseudoramiX.c:419:5: note: in expansion of macro ‘REQUEST’
      419 |     REQUEST(xPanoramiXGetStateReq);
          |     ^~~~~~~
    ../pseudoramiX/pseudoramiX.c: In function ‘SProcPseudoramiXGetScreenCount’:
    ../include/dix.h:66:12: warning: unused variable ‘stuff’ [-Wunused-variable]
       66 |     type * stuff = (type *)client->requestBuffer;
          |            ^~~~~
    ../pseudoramiX/pseudoramiX.c:430:5: note: in expansion of macro ‘REQUEST’
      430 |     REQUEST(xPanoramiXGetScreenCountReq);
          |     ^~~~~~~
    ../pseudoramiX/pseudoramiX.c: In function ‘SProcPseudoramiXGetScreenSize’:
    ../include/dix.h:66:12: warning: unused variable ‘stuff’ [-Wunused-variable]
       66 |     type * stuff = (type *)client->requestBuffer;
          |            ^~~~~
    ../pseudoramiX/pseudoramiX.c:441:5: note: in expansion of macro ‘REQUEST’
      441 |     REQUEST(xPanoramiXGetScreenSizeReq);
          |     ^~~~~~~
    ../pseudoramiX/pseudoramiX.c: In function ‘SProcPseudoramiXIsActive’:
    ../include/dix.h:66:12: warning: unused variable ‘stuff’ [-Wunused-variable]
       66 |     type * stuff = (type *)client->requestBuffer;
          |            ^~~~~
    ../pseudoramiX/pseudoramiX.c:452:5: note: in expansion of macro ‘REQUEST’
      452 |     REQUEST(xXineramaIsActiveReq);
          |     ^~~~~~~
    ../pseudoramiX/pseudoramiX.c: In function ‘SProcPseudoramiXQueryScreens’:
    ../include/dix.h:66:12: warning: unused variable ‘stuff’ [-Wunused-variable]
       66 |     type * stuff = (type *)client->requestBuffer;
          |            ^~~~~
    ../pseudoramiX/pseudoramiX.c:463:5: note: in expansion of macro ‘REQUEST’
      463 |     REQUEST(xXineramaQueryScreensReq);
          |     ^~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult d2575b30dd (!1689) pseudoramix: replace PseudoramiXTrace() and PseudoramiXDebug() by LogMessageVerb()
Since we're only going through macros (that are calling these), this extra wrapper
function isn't needed at all - using LogMessageVerb() directly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:03:01 +02:00
Enrico Weigelt, metux IT consult 2e74b2fde6 (!1688) xfree86: man: add -syslogverbse flag
Document the newly added -syslogverbose command line flag.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-19 15:02:54 +02:00
Enrico Weigelt, metux IT consult 69bdc2c247 (!1688) os: log: add syslog support
Add support for logging to syslog.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00
Enrico Weigelt, metux IT consult 2d5c8090a8 (!1688) os: helper for parsing an counting-flag or value-flag option
Parses an option that may either be used for setting an integer value or
given one or multiple times (without argument) to increase an value

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00
Enrico Weigelt, metux IT consult 7bd3006818 (!1688) meson.build: move writing conf_data into tail of main meson file
This allows us to do further probing in the included meson files:
Individual subdirectories (eg. DDXes, extensions, OS layer, ...)
can now probe things that are only relevant to them - no need to fill
the already too fat includes/meson.build with even more things.

Preparation for upcoming commits that'll make us of that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00
Enrico Weigelt, metux IT consult e063db8204 (!1688) os: log: drop obsolete LogSetParameter()
The variables that can be set via this function are all now being
accessed directly. Not callers left, so drop it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00
Enrico Weigelt, metux IT consult 86ba735482 (!1688) os: directly set log file sync flag, instead of using LogSetParameter()
No need for extra call to some demuxer function for nothing but setting a
simple bool variable. Setting the sync flag really is nothing more than just
writing some value into a variable, so it's trivial to just to do that, instead
of having an unncessarily complex "universal setter" for that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00
Enrico Weigelt, metux IT consult 497e981348 (!1688) os: directly set log file verbosity level, instead of using LogSetParameter()
No need for extra call to some demuxer function for nothing but setting a
simple int variable. Setting verbosity level really is nothing more than just
writing some value into a variable, so it's trivial to just to do that, instead
of having an unncessarily complex "universal setter" for that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00
Enrico Weigelt, metux IT consult 421eeec9c5 (!1688) os: directly set console verbosity level, instead of using LogSetParameter()
No need for extra call to some demuxer function for nothing but setting a
simple int variable. Setting verbosity level really is nothing more than just
writing some value into a variable, so it's trivial to just to do that, instead
of having an unncessarily complex "universal setter" for that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00
Enrico Weigelt, metux IT consult 4cd73b26c0 (!1688) os: unexport internal logging functions
Lots of logging functions, especially init and teardown aren't called
by any drivers/modules, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00
Enrico Weigelt, metux IT consult 54632e9049 (!1680) os: log: drop unnecessary ifdef's
The #ifdef's for log prefix defines aren't needed, so drop them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-18 17:23:12 +02:00