diff --git a/SOURCES/0001-Disable-logfile-and-modulepath-when-running-with-ele.patch b/SOURCES/0001-Disable-logfile-and-modulepath-when-running-with-ele.patch new file mode 100644 index 0000000..85717f8 --- /dev/null +++ b/SOURCES/0001-Disable-logfile-and-modulepath-when-running-with-ele.patch @@ -0,0 +1,53 @@ +From 2fda7c57e7ebe210cf5e2bb051a0a9271f85e80a Mon Sep 17 00:00:00 2001 +From: Matthieu Herrb +Date: Mon, 22 Oct 2018 14:33:25 -0400 +Subject: [PATCH xserver] Disable -logfile and -modulepath when running with + elevated privileges + +An unprivileged user was able to overwrite arbitrary files +in directories in which it is able to chdir, potentially +leading to privilege elevation. + +CVE-2018-14665 + +An unprivileded user was able to load arbitrary modules +from user controlled directories, leading to privilege +elevation. + +CVE-2018-XXXXX + +Issues reported by Narendra Shinde + +Signed-off-by: Matthieu Herrb +Reviewed-by: Alan Coopersmith +--- + hw/xfree86/common/xf86Init.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c +index 6c25eda739..0f57efa863 100644 +--- a/hw/xfree86/common/xf86Init.c ++++ b/hw/xfree86/common/xf86Init.c +@@ -935,14 +935,18 @@ ddxProcessArgument(int argc, char **argv, int i) + /* First the options that are not allowed with elevated privileges */ + if (!strcmp(argv[i], "-modulepath")) { + CHECK_FOR_REQUIRED_ARGUMENT(); +- xf86CheckPrivs(argv[i], argv[i + 1]); ++ if (xf86PrivsElevated()) ++ FatalError("\nInvalid argument -modulepath " ++ "with elevated privileges\n"); + xf86ModulePath = argv[i + 1]; + xf86ModPathFrom = X_CMDLINE; + return 2; + } + if (!strcmp(argv[i], "-logfile")) { + CHECK_FOR_REQUIRED_ARGUMENT(); +- xf86CheckPrivs(argv[i], argv[i + 1]); ++ if (xf86PrivsElevated()) ++ FatalError("\nInvalid argument -logfile " ++ "with elevated privileges\n"); + xf86LogFile = argv[i + 1]; + xf86LogFileFrom = X_CMDLINE; + return 2; +-- +2.19.0 diff --git a/SOURCES/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch b/SOURCES/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch new file mode 100644 index 0000000..8a23d5d --- /dev/null +++ b/SOURCES/0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch @@ -0,0 +1,30 @@ +From e50c85f4ebf559a3bac4817b41074c43d4691779 Mon Sep 17 00:00:00 2001 +From: Eric Anholt +Date: Fri, 26 Oct 2018 17:47:30 -0700 +Subject: [PATCH xserver] Fix segfault on probing a non-PCI platform device on + a system with PCI. + +Some Broadcom set-top-box boards have PCI busses, but the GPU is still +probed through DT. We would dereference a null busid here in that +case. + +Signed-off-by: Eric Anholt +--- + hw/xfree86/common/xf86platformBus.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c +index cef47da03d..dadbac6c8f 100644 +--- a/hw/xfree86/common/xf86platformBus.c ++++ b/hw/xfree86/common/xf86platformBus.c +@@ -289,7 +289,7 @@ xf86platformProbe(void) + for (i = 0; i < xf86_num_platform_devices; i++) { + char *busid = xf86_platform_odev_attributes(i)->busid; + +- if (pci && (strncmp(busid, "pci:", 4) == 0)) { ++ if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) { + platform_find_pci_info(&xf86_platform_devices[i], busid); + } + +-- +2.21.0 diff --git a/SOURCES/0001-linux-Fix-platform-device-PCI-detection-for-complex-.patch b/SOURCES/0001-linux-Fix-platform-device-PCI-detection-for-complex-.patch new file mode 100644 index 0000000..64c9cd7 --- /dev/null +++ b/SOURCES/0001-linux-Fix-platform-device-PCI-detection-for-complex-.patch @@ -0,0 +1,44 @@ +From b6e18eb57f3dd104704d0a5ec3d2f051645b9068 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Wed, 19 Jun 2019 14:23:56 -0400 +Subject: [PATCH xserver] linux: Fix platform device PCI detection for complex + bus topologies + +Suppose you're in a Hyper-V guest and are trying to use PCI passthrough. +The ID_PATH that udev will construct for that looks something like +"acpi-VMBUS:00-pci-b8c8:00:00.0", and obviously looking for "pci-" in +the first four characters of that is going to not work. + +Instead, strstr. I suppose it's possible you could have _multiple_ PCI +buses in the path, in which case you'd want strrstr, if that were a +thing. +--- + config/udev.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/udev.c b/config/udev.c +index 314acba6ce..6e11aa3b88 100644 +--- a/config/udev.c ++++ b/config/udev.c +@@ -474,7 +474,7 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path + config_odev_probe_proc_ptr probe_callback) + { + struct OdevAttributes *attribs = config_odev_allocate_attributes(); +- const char *value; ++ const char *value, *str; + + attribs->path = XNFstrdup(path); + attribs->syspath = XNFstrdup(syspath); +@@ -482,8 +482,8 @@ config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path + attribs->minor = minor; + + value = udev_device_get_property_value(udev_device, "ID_PATH"); +- if (value && !strncmp(value, "pci-", 4)) { +- attribs->busid = XNFstrdup(value); ++ if (value && (str = strstr(value, "pci-"))) { ++ attribs->busid = XNFstrdup(str); + attribs->busid[3] = ':'; + } + +-- +2.21.0 diff --git a/SOURCES/0001-linux-Make-platform-device-probe-less-fragile.patch b/SOURCES/0001-linux-Make-platform-device-probe-less-fragile.patch index 7eaf5c3..79d8c21 100644 --- a/SOURCES/0001-linux-Make-platform-device-probe-less-fragile.patch +++ b/SOURCES/0001-linux-Make-platform-device-probe-less-fragile.patch @@ -1,47 +1,121 @@ -From b96e7972e90144a697401f393ae8e1e12b3e767c Mon Sep 17 00:00:00 2001 +From 0816e8fca6194dfb4cc94c3a7fcb2c7f2a921386 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 18 Sep 2018 14:37:51 -0400 -Subject: [PATCH] linux: Make platform device probe less fragile +Subject: [PATCH xserver] linux: Make platform device probe less fragile -If we have platform devices - and we usually do - we would really want -them to bind through the platform bus code not PCI. At the point where -get_drm_info runs, however, we haven't yet taken our own VT, which means -we can't perform drm "master" operations on the device. This is tragic, -because the operation we need to perform here is fishing the bus id out -of the kernel, which we can only do after drmSetInterfaceVersion, which -for some reason stores that knowledge on the device not the file handle -and thus needs master access. Since we fail, the probe logic gets very -confused. +At the point where xf86BusProbe runs we haven't yet taken our own VT, +which means we can't perform drm "master" operations on the device. This +is tragic, because we need master to fish the bus id string out of the +kernel, which we can only do after drmSetInterfaceVersion, which for +some reason stores that string on the device not the file handle and +thus needs master access. -Fortunately we know the format of the busid string (it's our own, drm -copied it from xfree86), so we can scrape that out of the sysfs path. We -do still potentially do the whole SetInterfaceVersion dance later on, -but it's harmless at that point because we've taken the VT by then. +Fortunately we know the format of the busid string, and it happens to +almost be the same as the ID_PATH variable from udev. Use that instead +and stop calling drmSetInterfaceVersion. -This should all be vastly simplified, but that is not the cat we're -skinning today. +Reviewed-by: Peter Hutterer +Signed-off-by: Adam Jackson --- - hw/xfree86/os-support/linux/lnx_platform.c | 22 ++++++++++++---------- - 1 file changed, 12 insertions(+), 10 deletions(-) + config/udev.c | 17 ++++++++++++----- + hw/xfree86/os-support/linux/lnx_platform.c | 20 ++------------------ + 2 files changed, 14 insertions(+), 23 deletions(-) +diff --git a/config/udev.c b/config/udev.c +index 3a73189e25..8c6c4b6665 100644 +--- a/config/udev.c ++++ b/config/udev.c +@@ -56,7 +56,7 @@ static struct udev_monitor *udev_monitor; + + #ifdef CONFIG_UDEV_KMS + static void +-config_udev_odev_setup_attribs(const char *path, const char *syspath, ++config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath, + int major, int minor, + config_odev_probe_proc_ptr probe_callback); + #endif +@@ -128,7 +128,7 @@ device_added(struct udev_device *udev_device) + + LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n", path); + +- config_udev_odev_setup_attribs(path, syspath, major(devnum), ++ config_udev_odev_setup_attribs(udev_device, path, syspath, major(devnum), + minor(devnum), NewGPUDeviceRequest); + return; + } +@@ -322,7 +322,7 @@ device_removed(struct udev_device *device) + + LogMessage(X_INFO, "config/udev: removing GPU device %s %s\n", + syspath, path); +- config_udev_odev_setup_attribs(path, syspath, major(devnum), ++ config_udev_odev_setup_attribs(device, path, syspath, major(devnum), + minor(devnum), DeleteGPUDeviceRequest); + /* Retry vtenter after a drm node removal */ + systemd_logind_vtenter(); +@@ -465,17 +465,24 @@ config_udev_fini(void) + #ifdef CONFIG_UDEV_KMS + + static void +-config_udev_odev_setup_attribs(const char *path, const char *syspath, ++config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath, + int major, int minor, + config_odev_probe_proc_ptr probe_callback) + { + struct OdevAttributes *attribs = config_odev_allocate_attributes(); ++ const char *value; + + attribs->path = XNFstrdup(path); + attribs->syspath = XNFstrdup(syspath); + attribs->major = major; + attribs->minor = minor; + ++ value = udev_device_get_property_value(udev_device, "ID_PATH"); ++ if (value && !strncmp(value, "pci-", 4)) { ++ attribs->busid = XNFstrdup(value); ++ attribs->busid[3] = ':'; ++ } ++ + /* ownership of attribs is passed to probe layer */ + probe_callback(attribs); + } +@@ -516,7 +523,7 @@ config_udev_odev_probe(config_odev_probe_proc_ptr probe_callback) + else if (!check_seat(udev_device)) + goto no_probe; + +- config_udev_odev_setup_attribs(path, syspath, major(devnum), ++ config_udev_odev_setup_attribs(udev_device, path, syspath, major(devnum), + minor(devnum), probe_callback); + no_probe: + udev_device_unref(udev_device); diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c -index 70374ac..cbf7dd2 100644 +index 70374ace88..e623062192 100644 --- a/hw/xfree86/os-support/linux/lnx_platform.c +++ b/hw/xfree86/os-support/linux/lnx_platform.c -@@ -29,6 +29,9 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) +@@ -23,13 +23,13 @@ + static Bool + get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) + { +- drmSetVersion sv; + drmVersionPtr v; +- char *buf; int fd; int err = 0; Bool paused, server_fd = FALSE; -+ const char pci_prefix[] = "/sys/devices/pci"; -+ -+ LogMessage(X_INFO, "Platform probe for %s\n", attribs->syspath); ++ LogMessage(X_INFO, "Platform probe for %s\n", attribs->syspath); ++ fd = systemd_logind_take_fd(attribs->major, attribs->minor, path, &paused); if (fd != -1) { -@@ -53,13 +56,6 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) - sv.drm_dd_major = -1; /* Don't care */ - sv.drm_dd_minor = -1; /* Don't care */ + if (paused) { +@@ -48,18 +48,6 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) + if (fd == -1) + return FALSE; +- sv.drm_di_major = 1; +- sv.drm_di_minor = 4; +- sv.drm_dd_major = -1; /* Don't care */ +- sv.drm_dd_minor = -1; /* Don't care */ +- - err = drmSetInterfaceVersion(fd, &sv); - if (err) { - xf86Msg(X_ERROR, "%s: failed to set DRM interface version 1.4: %s\n", @@ -52,25 +126,17 @@ index 70374ac..cbf7dd2 100644 /* for a delayed probe we've already added the device */ if (delayed_index == -1) { xf86_add_platform_device(attribs, FALSE); -@@ -69,9 +65,15 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) +@@ -69,10 +57,6 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) if (server_fd) xf86_platform_devices[delayed_index].flags |= XF86_PDEV_SERVER_FD; - buf = drmGetBusid(fd); - xf86_platform_odev_attributes(delayed_index)->busid = XNFstrdup(buf); - drmFreeBusid(buf); -+ /* parse out a bus id */ -+ if (!strncmp(attribs->syspath, pci_prefix, strlen(pci_prefix))) { -+ char *dbdf = attribs->syspath + strlen(pci_prefix) + strlen("XXXX:XX") + 1; -+ asprintf(&xf86_platform_odev_attributes(delayed_index)->busid, -+ "pci:%.12s", dbdf); -+ LogMessage(X_INFO, "Platform PCI device at %s\n", -+ xf86_platform_odev_attributes(delayed_index)->busid); -+ } -+ - +- v = drmGetVersion(fd); if (!v) { + xf86Msg(X_ERROR, "%s: failed to query DRM version\n", path); -- -2.17.1 +2.19.1 diff --git a/SOURCES/0001-modesetting-Hide-atomic-behind-Option-Atomic-boolean.patch b/SOURCES/0001-modesetting-Hide-atomic-behind-Option-Atomic-boolean.patch new file mode 100644 index 0000000..6579290 --- /dev/null +++ b/SOURCES/0001-modesetting-Hide-atomic-behind-Option-Atomic-boolean.patch @@ -0,0 +1,51 @@ +From a22a81a0de76b96b01f32f59fd2a4b4af675d9b1 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Fri, 5 Oct 2018 15:12:18 -0400 +Subject: [PATCH] modesetting: Hide atomic behind Option "Atomic" "[boolean]" + +You can turn it on if the kernel driver supports it and you ask for it +explicitly, but right now it's too fragile. + +Signed-off-by: Adam Jackson +--- + hw/xfree86/drivers/modesetting/driver.c | 5 ++++- + hw/xfree86/drivers/modesetting/driver.h | 1 + + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c +index 24311c1..4fc62e4 100644 +--- a/hw/xfree86/drivers/modesetting/driver.c ++++ b/hw/xfree86/drivers/modesetting/driver.c +@@ -131,6 +131,7 @@ static const OptionInfoRec Options[] = { + {OPTION_PAGEFLIP, "PageFlip", OPTV_BOOLEAN, {0}, FALSE}, + {OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE}, + {OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE}, ++ {OPTION_ATOMIC, "Atomic", OPTV_BOOLEAN, {0}, FALSE}, + {-1, NULL, OPTV_NONE, {0}, FALSE} + }; + +@@ -1061,7 +1062,9 @@ PreInit(ScrnInfoPtr pScrn, int flags) + } + + ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1); +- ms->atomic_modeset = (ret == 0); ++ if ((ms->atomic_modeset = (ret == 0))) ++ ms->atomic_modeset = xf86ReturnOptValBool(ms->drmmode.Options, ++ OPTION_ATOMIC, FALSE); + + ms->kms_has_modifiers = FALSE; + ret = drmGetCap(ms->fd, DRM_CAP_ADDFB2_MODIFIERS, &value); +diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h +index c8db4b8..46ba78a 100644 +--- a/hw/xfree86/drivers/modesetting/driver.h ++++ b/hw/xfree86/drivers/modesetting/driver.h +@@ -51,6 +51,7 @@ typedef enum { + OPTION_PAGEFLIP, + OPTION_ZAPHOD_HEADS, + OPTION_DOUBLE_SHADOW, ++ OPTION_ATOMIC, + } modesettingOpts; + + typedef struct +-- +2.19.0 diff --git a/SOURCES/0001-xfree86-LeaveVT-from-xf86CrtcCloseScreen.patch b/SOURCES/0001-xfree86-LeaveVT-from-xf86CrtcCloseScreen.patch new file mode 100644 index 0000000..f521c78 --- /dev/null +++ b/SOURCES/0001-xfree86-LeaveVT-from-xf86CrtcCloseScreen.patch @@ -0,0 +1,26 @@ +From 13118f3052e870c3cef6260235b489a288df5a59 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 9 Oct 2018 12:28:48 -0400 +Subject: [PATCH xserver] xfree86: LeaveVT from xf86CrtcCloseScreen + +Signed-off-by: Adam Jackson +Signed-off-by: Olivier Fourdan +--- + hw/xfree86/modes/xf86Crtc.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c +index 686cb51..710a41d 100644 +--- a/hw/xfree86/modes/xf86Crtc.c ++++ b/hw/xfree86/modes/xf86Crtc.c +@@ -776,6 +776,8 @@ xf86CrtcCloseScreen(ScreenPtr screen) + crtc->randr_crtc = NULL; + } + ++ scrn->LeaveVT(scrn); ++ + screen->CloseScreen = config->CloseScreen; + + xf86RotateCloseScreen(screen); +-- +2.19.1 diff --git a/SOURCES/0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch b/SOURCES/0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch new file mode 100644 index 0000000..4d36450 --- /dev/null +++ b/SOURCES/0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch @@ -0,0 +1,135 @@ +From ff91c696ff8f5f56da40e107cb5c321539758a81 Mon Sep 17 00:00:00 2001 +From: Michal Srb +Date: Tue, 16 Oct 2018 09:32:13 +0200 +Subject: [PATCH xserver] xfree86: Only switch to original VT if it is active. + +If the X server is terminated while its VT is not active, it should +not change the current VT. + +v2: Query current state in xf86CloseConsole using VT_GETSTATE instead of + keeping track in xf86VTEnter/xf86VTLeave/etc. +--- + hw/xfree86/os-support/linux/lnx_init.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c +index 039dc4a4d..358d89f0f 100644 +--- a/hw/xfree86/os-support/linux/lnx_init.c ++++ b/hw/xfree86/os-support/linux/lnx_init.c +@@ -272,101 +272,111 @@ xf86OpenConsole(void) + xf86SetConsoleHandler(drain_console, NULL); + } + + nTty = tty_attr; + nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); + nTty.c_oflag = 0; + nTty.c_cflag = CREAD | CS8; + nTty.c_lflag = 0; + nTty.c_cc[VTIME] = 0; + nTty.c_cc[VMIN] = 1; + cfsetispeed(&nTty, 9600); + cfsetospeed(&nTty, 9600); + tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); + } + } + else { /* serverGeneration != 1 */ + if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch) { + /* now get the VT */ + if (!switch_to(xf86Info.vtno, "xf86OpenConsole")) + FatalError("xf86OpenConsole: Switching VT failed\n"); + } + } + } + + #pragma GCC diagnostic pop + + void + xf86CloseConsole(void) + { + struct vt_mode VT; ++ struct vt_stat vts; + int ret; + + if (xf86Info.ShareVTs) { + close(xf86Info.consoleFd); + return; + } + + /* + * unregister the drain_console handler + * - what to do if someone else changed it in the meantime? + */ + xf86SetConsoleHandler(NULL, NULL); + + /* Back to text mode ... */ + SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT)); + if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n", + strerror(errno)); + + SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode)); + tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); + + SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT)); + if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n", + strerror(errno)); + else { + /* set dflt vt handling */ + VT.mode = VT_AUTO; + SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT)); + if (ret < 0) + xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s\n", + strerror(errno)); + } + + if (xf86Info.autoVTSwitch) { + /* +- * Perform a switch back to the active VT when we were started +- */ ++ * Perform a switch back to the active VT when we were started if our ++ * vt is active now. ++ */ + if (activeVT >= 0) { +- switch_to(activeVT, "xf86CloseConsole"); ++ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts)); ++ if (ret < 0) { ++ xf86Msg(X_WARNING, "xf86OpenConsole: VT_GETSTATE failed: %s\n", ++ strerror(errno)); ++ } else { ++ if (vts.v_active == xf86Info.vtno) { ++ switch_to(activeVT, "xf86CloseConsole"); ++ } ++ } + activeVT = -1; + } + } + close(xf86Info.consoleFd); /* make the vt-manager happy */ + } + + #define CHECK_FOR_REQUIRED_ARGUMENT() \ + if (((i + 1) >= argc) || (!argv[i + 1])) { \ + ErrorF("Required argument to %s not specified\n", argv[i]); \ + UseMsg(); \ + FatalError("Required argument to %s not specified\n", argv[i]); \ + } + + int + xf86ProcessArgument(int argc, char *argv[], int i) + { + /* + * Keep server from detaching from controlling tty. This is useful + * when debugging (so the server can receive keyboard signals. + */ + if (!strcmp(argv[i], "-keeptty")) { + KeepTty = TRUE; + return 1; + } + + if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { + if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0) { + UseMsg(); + xf86Info.vtno = -1; + return 0; +-- +2.21.0 diff --git a/SPECS/xorg-x11-server.spec b/SPECS/xorg-x11-server.spec index 95df6b0..d062984 100644 --- a/SPECS/xorg-x11-server.spec +++ b/SPECS/xorg-x11-server.spec @@ -42,7 +42,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.20.1 -Release: 3%{?gitdate:.%{gitdate}}%{?dist} +Release: 6%{?gitdate:.%{gitdate}}%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -105,6 +105,16 @@ Patch9751: 0001-glamor_egl-Don-t-initialize-on-llvmpipe.patch Patch9752: 0001-xwayland-Don-t-initialize-glamor-on-llvmpipe.patch Patch9753: 0001-linux-Make-platform-device-probe-less-fragile.patch Patch9754: 0001-xfree86-try-harder-to-span-on-multihead.patch +Patch9755: 0001-modesetting-Hide-atomic-behind-Option-Atomic-boolean.patch +Patch9756: 0001-xfree86-LeaveVT-from-xf86CrtcCloseScreen.patch +Patch9757: 0001-Disable-logfile-and-modulepath-when-running-with-ele.patch + +# Bug 1680120 - upstream backport to fix user switching +Patch9900: 0001-xfree86-Only-switch-to-original-VT-if-it-is-active.patch +# Bug 1717309 - Startx will have segment fault with hyper-V environment +Patch9901: 0001-Fix-segfault-on-probing-a-non-PCI-platform-device-on.patch +# ... which also needs https://gitlab.freedesktop.org/xorg/xserver/merge_requests/217 +Patch9902: 0001-linux-Fix-platform-device-PCI-detection-for-complex-.patch %global moduledir %{_libdir}/xorg/modules %global drimoduledir %{_libdir}/dri @@ -359,13 +369,6 @@ test `getminor extension` == %{extension_minor} %endif -### -sed -i 's/MAXSCREENS\t16/MAXSCREENS\t32/g' include/misc.h -sed -i 's/MAXGPUSCREENS\t16/MAXGPUSCREENS\t32/g' include/misc.h -sed -i 's/MAXCLIENTS\t2048/MAXCLIENTS\t4096/g' include/misc.h -sed -i 's/LIMITCLIENTS\t256/LIMITCLIENTS\t1024/g' include/misc.h -### - %build %global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins" @@ -594,6 +597,32 @@ rm -rf $RPM_BUILD_ROOT %{xserver_source_dir} %changelog +* Wed Jun 19 2019 Adam Jackson - 1.20.1-5.6 +- Fix platform device PCI detection for complex bus topologies + +* Mon Jun 17 2019 Adam Jackson - 1.20.1-5.5 +- Fix segfault in non-PCI platform detection + +* Wed Jun 12 2019 Ray Strode - 1.20.1-5.4 +- Stop VT switching when inactive server dies + Related: #1719361 + +* Tue Feb 12 2019 Adam Jackson - 1.20.1-5.3 +- Sync platform probe patch with upstream + +* Fri Nov 23 2018 Olivier Fourdan - 1.20.1-5.2 +- Move LeaveVT after resetting randr pointers in xf86CrtcCloseScreen + +* Mon Oct 22 2018 Adam Jackson - 1.20.1-5.1 +- CVE-2018-14665: Disable -logfile and -modulepath when running with elevated + privileges + +* Tue Oct 09 2018 Adam Jackson - 1.20.1-5 +- Call LeaveVT from xf86CrtcCloseScreen + +* Fri Oct 05 2018 Adam Jackson - 1.20.1-4 +- Hide the modesetting driver's atomic ioctl support behind Option "Atomic" + * Mon Sep 24 2018 Adam Jackson - 1.20.1-3 - Try harder to come up with an initial spanning configuration