diff --git a/SOURCES/0001-Refuse-to-run-on-UEFI-machines-running-older-kernels.patch b/SOURCES/0001-Refuse-to-run-on-UEFI-machines-running-older-kernels.patch new file mode 100644 index 0000000..9048df3 --- /dev/null +++ b/SOURCES/0001-Refuse-to-run-on-UEFI-machines-running-older-kernels.patch @@ -0,0 +1,37 @@ +From 53c7796e8ddc6aaaef79df8c852c0d9d151a8559 Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Fri, 10 May 2019 08:40:05 +0200 +Subject: [PATCH] Refuse to run on UEFI machines running older kernels + +Prior to kernel v3.12, the efi framebuffer driver was named "efifb". +This cause problem on RHEL 7 as the base kernel is 3.10. + +"efi-framebuffer.0" was added by commit 2645e0aa for that reason +(don't run on UEFI machine). +The change from "efifb" to "efi-framebuffer" was done with commit +e6816a8 in the kernel + +Signed-off-by: Benjamin Tissoires +[ofourdan: updated commit message with commit references] +Reviewed-by: Olivier Fourdan +--- + src/vesa.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/vesa.c b/src/vesa.c +index 7f11175..0c1d003 100644 +--- a/src/vesa.c ++++ b/src/vesa.c +@@ -452,7 +452,8 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev, + ScrnInfoPtr pScrn; + + #ifdef __linux__ +- if (access("/sys/devices/platform/efi-framebuffer.0", F_OK) == 0) { ++ if (access("/sys/devices/platform/efi-framebuffer.0", F_OK) == 0 || ++ access("/sys/devices/platform/efifb.0", F_OK) == 0) { + ErrorF("vesa: Refusing to run on UEFI\n"); + return FALSE; + } +-- +2.21.0 + diff --git a/SOURCES/0001-Refuse-to-run-on-UEFI-machines.patch b/SOURCES/0001-Refuse-to-run-on-UEFI-machines.patch new file mode 100644 index 0000000..7b62a2c --- /dev/null +++ b/SOURCES/0001-Refuse-to-run-on-UEFI-machines.patch @@ -0,0 +1,46 @@ +From 2645e0aa9c17c2c966a0533e52ad00510311483e Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Wed, 29 Aug 2018 11:04:23 -0400 +Subject: [PATCH xf86-video-vesa] Refuse to run on UEFI machines + +No possible good can come of this. + +v2: Check for .../efi-framebuffer.0 ("is there an EFI framebuffer") +instead of /sys/firmware/efi ("is this an EFI machine"). Suggested by +Peter Jones. + +Reviewed-by: Peter Jones +Signed-off-by: Adam Jackson + +diff --git a/src/vesa.c b/src/vesa.c +index 9b65b9b..af750e2 100644 +--- a/src/vesa.c ++++ b/src/vesa.c +@@ -43,7 +43,7 @@ + #endif + + #include +- ++#include + #include "vesa.h" + + /* All drivers initialising the SW cursor need this */ +@@ -450,7 +450,14 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev, + intptr_t match_data) + { + ScrnInfoPtr pScrn; +- ++ ++#ifdef __linux__ ++ if (access("/sys/devices/platform/efi-framebuffer.0", F_OK) == 0) { ++ ErrorF("vesa: Refusing to run on UEFI\n"); ++ return FALSE; ++ } ++#endif ++ + pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL, + NULL, NULL, NULL, NULL, NULL); + if (pScrn != NULL) { +-- +2.17.1 + diff --git a/SPECS/xorg-x11-drv-vesa.spec b/SPECS/xorg-x11-drv-vesa.spec index 7ae6988..bdf3c30 100644 --- a/SPECS/xorg-x11-drv-vesa.spec +++ b/SPECS/xorg-x11-drv-vesa.spec @@ -7,13 +7,15 @@ Summary: Xorg X11 vesa video driver Name: xorg-x11-drv-vesa Version: 2.4.0 -Release: 1%{?dist} +Release: 3%{?dist} URL: https://www.x.org Source0: https://xorg.freedesktop.org/releases/individual/driver/%{tarball}-%{version}.tar.bz2 License: MIT Group: User Interface/X Hardware Support Patch0: 0001-Disable-shadow-by-default-on-known-virtual-GPUs.patch +Patch1: 0001-Refuse-to-run-on-UEFI-machines.patch +Patch2: 0001-Refuse-to-run-on-UEFI-machines-running-older-kernels.patch ExclusiveArch: %{ix86} x86_64 BuildRequires: xorg-x11-server-devel >= 1.10.99.902 @@ -50,6 +52,12 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/vesa.4* %changelog +* Fri May 10 2019 Benjamin Tissoires 2.4.0-3 +- Refuse to run on UEFI framebuffers for v3.10 kernels too + +* Fri Mar 01 2019 Adam Jackson - 2.4.0-2 +- Refuse to run on UEFI framebuffers + * Wed May 30 2018 Adam Jackson - 2.4.0-1 - vesa 2.4.0