Enrico Weigelt, metux IT consult
d0b6510b64
composite: declare and initialize reply struct when needed
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-12-01 16:15:46 +01:00
Enrico Weigelt, metux IT consult
7d8f084fbf
dri: use static struct init on declaration & drop useless assignments
...
Make the code a bit easier to read by using initialization of the reply
structs, at the point of declaration. Most of them aren't written to later,
just passed into WriteReplyToClient(). Also dropping some useless zero
assignments (struct initializers automatically zero-out unmentioned fields).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-12-01 14:09:02 +01:00
Branimir Ri\v{c}ko
3b99373a17
Fixed a out of bounds read.
...
Signed-off-by: Branimir Ri\v{c}ko <rickobranimir@gmail.com >
2025-12-01 11:02:06 +01:00
stefan11111
c01c4e7c72
modesetting: Only close the dmabuf fd if it isn't -1
...
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-28 18:44:22 +01:00
Icenowy Zheng
03fa63778b
modesetting: fix shared pixmap dmabuf fd leakage
...
After the dmabuf fd exported by another screen is imported to a pixmap,
the pixmap holds a reference for the buffer, thus the FD itself finished
its job and needs to be closed to prevent a stale reference to the
buffer.
Signed-off-by: Icenowy Zheng's avatarIcenowy Zheng <uwu@icenowy.me >
2025-11-28 18:44:22 +01:00
stefan11111
6be7fe9d12
modesetting: print message when reverse prime mode is enabled
...
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-28 18:44:22 +01:00
Marc-Alexandre Espiaut
e1b3bbafa8
dix: remove dixLookupBuiltinColor() unused screen argument
...
Signed-off-by: Marc-Alexandre Espiaut <76531574+malespiaut@users.noreply.github.com >
2025-11-28 18:43:40 +01:00
Herman Semenoff
fc8f9f4331
xfree86: fix infinite boot when parsing incorrect BusID section Device
...
This change checks if there is a colon after the bus name. If there is none, *retID will point to the final null character of the original string.
2025-11-28 10:07:46 +01:00
Enrico Weigelt, metux IT consult
e14d352661
dix: move GCAllBits define into private header
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 20:05:59 +01:00
Enrico Weigelt, metux IT consult
e0ddc62bd0
os: add header for math related functions (possibly OS optimized)
...
Adding a new header for math related functions, beginning with new
MIN/MAX macros, which will be used by subsequent commits.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 19:58:33 +01:00
Enrico Weigelt, metux IT consult
33729b1361
include: windowstr.h: unexport w*() macros
...
These aren't used by any drivers, so no need to keep them public.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 19:54:42 +01:00
Enrico Weigelt, metux IT consult
ff8d26df21
include: windowstr.h: unexport SameBackground() and SamBorder() macros
...
Not used by any drivers, so no need to keep them public.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 19:49:14 +01:00
Enrico Weigelt, metux IT consult
2fe5e2519a
os: move OsCommRec/Ptr and related functions into own header
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 19:36:00 +01:00
Enrico Weigelt, metux IT consult
4af16f4ede
composite: dont include <dix-config.h> from headers
...
This file is supposed to be included from each source file at the
very top.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 19:35:46 +01:00
Enrico Weigelt, metux IT consult
9b8d7d1eb9
treewide: don't include <region.h> anymore
...
Nothing in there that we need, include <regionstr.h> instead.
But keeping the file in place, until all external consumer have
been migrated.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 19:27:27 +01:00
JSOwens
d4e67aa773
.github: add a check for pull request commits to be signed off
...
Added a workflow to check the commit messages of a PR to make sure each is
signed off by the author. A repo token is required, here named SECRET_TOKEN,
which has access to read and write PR comments.
Signed-off-by: JSOwens <josephs.owens@gmail.com >
2025-11-27 19:27:15 +01:00
Chase
644d151173
.github: install-prereq.sh: move xproto to meson
...
Signed-off-by: Chase <chinkle3@illinois.edu >
2025-11-27 19:04:19 +01:00
Enrico Weigelt, metux IT consult
a72972274e
mi: drop intToCoord() macro
...
Not used anywhere, no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 18:25:12 +01:00
Oleh Nykyforchyn
0230c6e074
dix: reexport ConnectionInfo for NVidia 390
...
This patch exports ConnectionInfo in server_priv.h and references
it in globals.c to force exporting.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com >
2025-11-27 17:06:36 +01:00
Chase
341b7f19f8
dbe.c: remove DISABLE_MI_BY_DEFAULT macro
2025-11-27 17:05:31 +01:00
Enrico Weigelt, metux IT consult
bddf4ae8e8
xfree86: move over xf86vidmode extension to hw/xfree86
...
This extension is private to the xfree86 DDX, no other one supports it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 14:03:37 +01:00
Enrico Weigelt, metux IT consult
b7e9544318
Xext: xvmc: drop dead SHM code path
...
Xvmc isn't using SHM for over 20 years now. There's still a code path for it
that could be enabled explicitly by manually setting HAS_XVMCSHM, but no
indication whatsoever that this ever has been done.
Considering that Xvmc in general already is obsolete for very long time now,
we can safely assume this code path is really dead and can be removed.
Fixes: 9a26d6f39e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 13:50:11 +01:00
Enrico Weigelt, metux IT consult
0b3fb18754
xfree86: drop xf86CursorScreenKey macro
...
Use the actual field directly.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 13:48:22 +01:00
Enrico Weigelt, metux IT consult
c503343a6b
Xext: Xvmc: drop XvMCScreenKey macro
...
Directly use the actual field instead.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 13:47:59 +01:00
Enrico Weigelt, metux IT consult
d7b773c174
xfree86: vgaarbiter: drop VGAarbiterScreenKey and VGAarbiterGCKey macros
...
Use the actual fields directly instead.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 13:47:05 +01:00
Enrico Weigelt, metux IT consult
85fae9bffb
dix: inline SProcAllocColor()
...
Now that we have untwisted Xinerama side, it's trivial to inline
the few lines for byte-swapping into the actual handlers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 13:46:37 +01:00
Alan Coopersmith
e352fdecfe
dix: handle allocation failure in DeviceFocusEvent()
...
Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817 :
xwayland-24.1.6/redhat-linux-build/../dix/enterleave.c:786:5:
warning[-Wanalyzer-possible-null-dereference]:
dereference of possibly-NULL ‘xi2event’
Fixes: 3f37923a72 ("Xi: send XI2 focus events." in Xorg 1.10.0)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2078 >
2025-11-27 13:36:49 +01:00
Enrico Weigelt, metux IT consult
a1f3edddf4
meson.build: enable -fno-common on all platforms
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 12:07:29 +01:00
Enrico Weigelt, metux IT consult
fe7e99f58c
include: globals.h: drop unnecessary includes
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 12:06:53 +01:00
Enrico Weigelt, metux IT consult
92a015504e
dix: make BITMAP_SCANLINE_UNIT private
...
Not used by any external drivers, so no need to keep it public.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 12:05:55 +01:00
Enrico Weigelt, metux IT consult
c696329b93
include: misc: drop unused sign() macro
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 12:05:29 +01:00
Enrico Weigelt, metux IT consult
f2a0a94a1f
include: misc.h: drop unused xReqPtr typedef
...
not used anywhere, so no need to keep it around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 12:04:01 +01:00
stefan11111
7279a68cc7
dri3: prevent out-of-bounds read in dri3_fd_from_pixmap
...
Inspired by f05f269f1d
Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817 :
xwayland-24.1.6/redhat-linux-build/../dri3/dri3_screen.c:143:13:
warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
xwayland-24.1.6/redhat-linux-build/../dri3/dri3_screen.c:143:13:
danger: out-of-bounds read from byte 16 till byte 19
but ‘fds’ ends at byte 16
141| int i;
142| for (i = 0; i < num_fds; i++)
143|-> close(fds[i]);
144| return -1;
145| }
Only possible if fds_from_pixmap returns a value > 4, but the analyzer
doesn't know the interface is defined not to do that.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2085 >
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-27 12:03:27 +01:00
stefan11111
d64fc9b668
glamor/glamor_egl.c: Set *formats to NULL after free()
...
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-27 12:03:27 +01:00
Alan Coopersmith
4b65fdd356
glamor: avoid double free in glamor_make_pixmap_exportable()
...
Reported by gcc 15.1:
../glamor/glamor_egl.c:320:9:
warning: double-‘free’ of ‘modifiers’ [CWE-415] [-Wanalyzer-double-free]
[...]
│ 732 |│ free(*modifiers);
│ |│ ~~~~~~~~~~~~~~~~
│ |│ |
│ |└───────>(25) ...to here
│ | (26) first ‘free’ here
[...]
│ 320 | free(modifiers);
│ | ~~~~~~~~~~~~~~~
│ | |
│ | (28) ⚠️
second ‘free’ here; first ‘free’ was at (26)
Fixes: cef12efc15 ("glamor: Implement GetSupportedModifiers")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2094 >
2025-11-27 12:03:27 +01:00
Alan Coopersmith
4db6ede54d
glamor: avoid null dereference in glamor_composite_clipped_region()
...
Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817 :
xwayland-24.1.6/redhat-linux-build/../glamor/glamor_render.c:1577:21:
warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2094 >
2025-11-27 12:03:27 +01:00
Alan Coopersmith
5d7ec3493c
glamor: avoid null dereference in glamor_dash_setup()
...
Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817 :
xwayland-24.1.6/redhat-linux-build/../glamor/glamor_dash.c:152:10:
warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2094 >
2025-11-27 12:03:27 +01:00
stefan11111
b0050ee830
glamor: fix memory leak in error path
...
Found in 84cf20e6dd by Alanc
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-27 12:03:27 +01:00
Alan Coopersmith
bf24ecb95b
glamor: silence false positive in glamor_validate_gc()
...
We know that if gc->tileIsPixel is false, then gc->tile.pixmap must be
a valid pixmap, but gcc's static analyzer doesn't and needs to be told.
Silences false positive reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817 :
xwayland-24.1.6/redhat-linux-build/../glamor/glamor_core.c:205:19:
warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2094 >
2025-11-27 12:03:27 +01:00
Alan Coopersmith
d228cfd194
glamor: handle allocation failure in glamor_create_pixmap()
...
Reported by gcc 15.1:
../glamor/glamor.c: In function ‘glamor_create_pixmap’:
../glamor/glamor.c:233:23: warning: potential null pointer dereference
[-Wnull-dereference]
233 | pixmap_priv->type = GLAMOR_TEXTURE_ONLY;
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
../glamor/glamor.c:228:26: warning: potential null pointer dereference
[-Wnull-dereference]
228 | pixmap_priv->is_cbcr = (GLAMOR_CREATE_FORMAT_CBCR & usage) == GLAMOR_CREATE_FORMAT_CBCR;
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2094 >
2025-11-27 12:03:27 +01:00
Alan Coopersmith
794c8e04a1
glamor: handle potential NULL return from GetPictureScreenIfSet()
...
Unlike GetPictureScreen(), GetPictureScreenIfSet() checks if the
private key is registered, and returns NULL if it is not.
Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817 :
xwayland-24.1.6/redhat-linux-build/../glamor/glamor.c:926:5:
warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ps’
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2094 >
2025-11-27 12:03:27 +01:00
Enrico Weigelt, metux IT consult
fda3695872
os: move MILLI_PER_MIN and MILLI_PER_SECOND to osdep.h
...
Not needed in public SDK, so move them into a private header.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 11:58:45 +01:00
Enrico Weigelt, metux IT consult
080a4d5afd
render: drop obsolete pict_t_* defines
...
There just had been for backwards compat with older driver sources
that hadn't been kept up to date yet. Not needed anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 11:58:33 +01:00
Enrico Weigelt, metux IT consult
39cf14d0e9
render: drop PictureScreenPrivateKey and PictureWindowPrivateKey defines
...
Not used by any external drivers, so we can drop them and directly use
the corresponding fields.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 11:58:09 +01:00
stefan11111
3550e1e873
xfree86/{loader,common}: Search all module directory prefixes in LoaderListDir
...
Fixes: 01c0b7fd38
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-27 11:57:25 +01:00
Enrico Weigelt, metux IT consult
07d6ca4254
os: move ComputeLocalClient() prototype to auth.h
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 10:45:36 +01:00
Enrico Weigelt, metux IT consult
ce75ddb0bb
os: move OsVendorFatalError() and OsVendorInit() to ddx_priv.h
...
These are implemented by DDX, thus should be declared in ddx_priv.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 10:44:58 +01:00
Enrico Weigelt, metux IT consult
5532917d76
os: move AllowByteSwappedClients setting into DIX
...
Adding new source and header that's going to host all DIX
settings (set via cmdline or xf86 config file) in the future.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 10:44:23 +01:00
Enrico Weigelt, metux IT consult
5501c60f1b
include: drop unused dix-config-apple-verbatim.h
...
Not included anywhere, so no need to keep it around anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-27 10:43:24 +01:00
Herman Semenov
50037a450d
Xext: remove excess dobule-check pointer (IsSystemCounter already have)
2025-11-26 16:47:14 +01:00