Only disable the PCI-specific driver probe, since we do still want fallback
to fbdev to work. Resolves: #2029769
This commit is contained in:
parent
7f4f9d8e78
commit
631c5917b6
83
0001-mustard-xfree86-Disable-the-PCI-probe-path.patch
Normal file
83
0001-mustard-xfree86-Disable-the-PCI-probe-path.patch
Normal file
@ -0,0 +1,83 @@
|
||||
From b3afd9ccefe156ab2dee993118fcdba40341f66e Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Fri, 1 Oct 2021 11:47:21 -0400
|
||||
Subject: [PATCH xserver] mustard: xfree86: Disable the PCI probe path
|
||||
|
||||
RHEL 9 does not support userspace modesetting drivers for Xorg. Ideally
|
||||
it would only support DRM drivers, but there are some fallback paths
|
||||
(efifb mainly) that still require fbdev support. Since the primary use
|
||||
of the PCI probe path is devices _without_ kernel support, we can safely
|
||||
disable it. And indeed we want to, because there are some devices
|
||||
(hyperv v1 e.g.) with both a platform and a PCI presentation, which the
|
||||
PCI probe code fails to handle such that the server fails to start.
|
||||
|
||||
Thus: we #if 0 out the PCI probe in xf86CallDriverProbe.
|
||||
|
||||
It might be nice if the platform code knew about fbdev devices, but it
|
||||
does not, and teaching it would be a large change for little benefit
|
||||
given we do intend to sunset the fbdev path as well. Since the fbdev
|
||||
path exists solely for cases where we have only the rudimentary firmare
|
||||
framebuffer, we should only use it if _no_ platform driver is available.
|
||||
|
||||
Thus: we only call the legacy probe method if xf86ProbeIgnorePrimary.
|
||||
|
||||
Having done this, we need to go back into fbdevhw and undo fc78bcca:
|
||||
|
||||
commit fc78bcca21e767697de6ad4d8e03b6728856f613 (merge-requests/38)
|
||||
Author: Adam Jackson <ajax@redhat.com>
|
||||
Date: Wed Oct 10 14:09:11 2018 -0400
|
||||
|
||||
fbdevhw: Refuse to touch PCI devices on the fallback probe path
|
||||
|
||||
Which was well intentioned, but given the above changes we know by the
|
||||
time we're trying to probe fbdev we really do want it, either because of
|
||||
the above fallback path or because xorg.conf asked for it. In either
|
||||
case we shouldn't spuriously fail just because it happens to be PCI.
|
||||
|
||||
Thus: We if (0) out the code added in fc78bcca.
|
||||
|
||||
Any one of the above might be questionable upstream, hence the mustard
|
||||
nature of this patch.
|
||||
---
|
||||
hw/xfree86/common/xf86Bus.c | 4 ++--
|
||||
hw/xfree86/fbdevhw/fbdevhw.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
|
||||
index fd144dbe7a..844ce5a890 100644
|
||||
--- a/hw/xfree86/common/xf86Bus.c
|
||||
+++ b/hw/xfree86/common/xf86Bus.c
|
||||
@@ -84,7 +84,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XSERVER_LIBPCIACCESS
|
||||
+#if 0
|
||||
if (!foundScreen && (drv->PciProbe != NULL)) {
|
||||
if (xf86DoConfigure && xf86DoConfigurePass1) {
|
||||
assert(detect_only);
|
||||
@@ -96,7 +96,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
- if (!foundScreen && (drv->Probe != NULL)) {
|
||||
+ if (!foundScreen && xf86ProbeIgnorePrimary && (drv->Probe != NULL)) {
|
||||
xf86Msg(X_WARNING, "Falling back to old probe method for %s\n",
|
||||
drv->driverName);
|
||||
foundScreen = (*drv->Probe) (drv, (detect_only) ? PROBE_DETECT
|
||||
diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
|
||||
index 3d8b92e669..171038f46d 100644
|
||||
--- a/hw/xfree86/fbdevhw/fbdevhw.c
|
||||
+++ b/hw/xfree86/fbdevhw/fbdevhw.c
|
||||
@@ -330,7 +330,7 @@ fbdev_open(int scrnIndex, const char *dev, char **namep)
|
||||
}
|
||||
|
||||
/* only touch non-PCI devices on this path */
|
||||
- {
|
||||
+ if (0) {
|
||||
char buf[PATH_MAX];
|
||||
char *sysfs_path = NULL;
|
||||
char *node = strrchr(dev, '/') + 1;
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,43 +0,0 @@
|
||||
From ab756b13392448201c106b7629c55f68af4d8ec5 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Jackson <ajax@redhat.com>
|
||||
Date: Fri, 1 Oct 2021 11:47:21 -0400
|
||||
Subject: [PATCH xserver] mustard: xfree86: Only call the driver's
|
||||
platformProbe
|
||||
|
||||
The code to detangle what's a PCI device and what's platform is... bad.
|
||||
The PCI-specific initialization path should never be necessary these
|
||||
days, and the ancient "just probe something" path should especially
|
||||
never be necessary, so we can avoid a bunch of fragile code by simply
|
||||
never calling into the non-platform probe paths and letting platform
|
||||
handle everything.
|
||||
|
||||
Among other things this fixes hypervdrm on v1 devices, which have both a
|
||||
PCI and a platform presentation, in a way that would cause X to fail to
|
||||
start.
|
||||
---
|
||||
hw/xfree86/common/xf86Bus.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
|
||||
index fd144dbe7a..88e07dec40 100644
|
||||
--- a/hw/xfree86/common/xf86Bus.c
|
||||
+++ b/hw/xfree86/common/xf86Bus.c
|
||||
@@ -84,6 +84,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if 0
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
if (!foundScreen && (drv->PciProbe != NULL)) {
|
||||
if (xf86DoConfigure && xf86DoConfigurePass1) {
|
||||
@@ -102,6 +103,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
|
||||
foundScreen = (*drv->Probe) (drv, (detect_only) ? PROBE_DETECT
|
||||
: PROBE_DEFAULT);
|
||||
}
|
||||
+#endif
|
||||
|
||||
return foundScreen;
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
@ -42,7 +42,7 @@
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.20.11
|
||||
Release: 7%{?gitdate:.%{gitdate}}%{?dist}
|
||||
Release: 8%{?gitdate:.%{gitdate}}%{?dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
|
||||
@ -92,8 +92,8 @@ Patch6: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch
|
||||
Patch7: 0001-xkb-Drop-check-for-XkbSetMapResizeTypes.patch
|
||||
|
||||
# 1988922 - [Hyper-V]Installation failed with: 'x or window manager startup failed' when the VM was created with GEN1
|
||||
|
||||
Patch8: 0001-mustard-xfree86-Only-call-the-driver-s-platformProbe.patch
|
||||
# 2029769 - fbdev Xorg driver no longer works as a fallback with unsupported hardware
|
||||
Patch8: 0001-mustard-xfree86-Disable-the-PCI-probe-path.patch
|
||||
|
||||
# Backports from current stable "server-1.20-branch":
|
||||
# <empty>
|
||||
@ -529,6 +529,11 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 26 2022 Adam Jackson <ajax@redhat.com> - 1.20.11-8
|
||||
- Only disable the PCI-specific driver probe, since we do still want fallback
|
||||
to fbdev to work.
|
||||
Resolves: #2029769
|
||||
|
||||
* Thu Jan 6 2022 Olivier Fourdan <ofourdan@redhat.com> - 1.20.11-7
|
||||
- CVE fix for: CVE-2021-4008 (#2030160), CVE-2021-4009 (#2030170),
|
||||
CVE-2021-4010 (#2030174), CVE-2021-4011 (#2030179)
|
||||
|
Loading…
Reference in New Issue
Block a user