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
Herman Semenov
4689dfb21f
mi: fix missing braces for expected logical condition 'if-else if'
...
Without missing braces, logical behavior 'if-else if' block works as two 'if' independent blocks.
2025-11-26 16:45:55 +01:00
stefan11111
5460be02c9
modesetting: read DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP when parsing async flip capabilities
...
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-26 10:53:36 +01:00
stefan11111
7b301ee278
modesetting: small formating changes and extra NULL checks
...
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-26 10:51:48 +01:00
Enrico Weigelt, metux IT consult
8039c2cbf1
dix: unexport SwapLongs()
...
Not used by any external drivers, so no need to keep it in public SDK.
Since it's used by internal modules, still needs to be _X_EXPORT'ed.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-25 18:26:02 +01:00
Tautvis
e00b4b55c8
os: utils.c ignore '-reset' and '-noreset' command line arguments
...
Certain display managers (for example SDDM) starts X server with
-noreset flag and it is not user configurable. This patch add code to
ignore -noreset and -reset command line arguments to prevent X server
crash due to unknown arguments.
Signed-off-by: Tautvis <gtautvis@gmail.com >
2025-11-22 13:25:52 +01:00
Oleh Nykyforchyn
77830f2284
modesetting: make DevPrivateKeyRec struct static
...
dixRegisterPrivateKey() assumes that DevPrivateKeyRec struct passed
to it is zero-filled before the first use, otherwise assert() fails.
Therefore these structs are usually static, which assures that they
are initialized to 0. A newly introduced key in the modesetting driver
was not static, and the driver crashed. This should be corrected.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com >
2025-11-22 13:24:44 +01:00
Enrico Weigelt, metux IT consult
4aa6d3e4fd
xfree86: loader: fix NULL warning on LogMessage() call
...
> ../hw/xfree86/loader/loadmod.c: In function ‘LoaderSetPath’:
> ../hw/xfree86/loader/loadmod.c:230:67: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
> 230 | LogMessage(X_ERROR, "Failed to store module search path \"%s\" for module %s\n", path, driver);
> | ^~
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-11-21 15:20:27 +01:00
Mike Gelfand
0aea4cf3a7
xkb: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
fcf7fb1f42
xfixes: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
64e4ded9fb
test: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
4b0c603f3d
miext: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
770c21c947
mi: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
e47ef3c2bf
include: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
84a2fc014d
hw: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
683573df26
glamor: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
f40bfb5ca9
dix: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
c662acf4cc
composite: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
Mike Gelfand
d7e0b9e5c2
xext: move include guards up to wrap the whole file
...
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com >
2025-11-21 15:20:11 +01:00
alex14fr
d655cc145d
Add module ABI tag to fix "Xorg -configure" ("No output driver" message).
...
The driver directory name now includes a version tag, and the configure code has to search in the right directory.
Signed-off-by: alex14fr <alex14fr@gmail.com >
2025-11-21 14:49:11 +01:00
stefan11111
7293fc12fe
modesetting: map gbm bo's if possible
...
Signed-off-by: stefan11111 <stefan11111@shitposting.expert >
2025-11-21 10:17:51 +01:00
Oleh Nykyforchyn
9db422c1ca
xfree86: add MatchLayout entry to OutputClass
...
It is patch 2/2 of a series that provides a convenient way to specify
module search paths on a per-driver basis.
This entry proved to be useful in InputClass, so added it to OutputClass
as well. This allows to configure graphic drivers separately depending
on server layout names.
Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com >
2025-11-20 19:29:51 +01:00