MFH: r489754

Fix illegal instruction when running in kvm/qemu

Fix illegal instruction when running xserver in kvm or qemu (and possibly
others) virtualisation.  This is solved by disabling sse instructions while
compiling the xf86SlowBcopy (don't ask) function.

This fix was originally committed by dim as r396167 in 2015, and then most
likely accidentally removed in r433863 in 2017.

Bump portrevision

Original commit message:

> Disable use of SSE instructions in Xorg's xf86SlowBcopy() function.
>
> When such instructions are used to copy data from/to mapped video
> memory, some hypervisors (e.g. KVM, Microsoft Hyper-V) can generate
> SIGILL or SIGBUS exceptions, causing Xorg to crash.

PR:		202643
Reported by:	nogcjx@fastmail.fm
Requested by:	dim
Diagnose and fix by:	dim

Approved by:	ports-secteam (miwi)
This commit is contained in:
Niclas Zeising 2019-01-09 17:52:03 +00:00
parent 1ad157ebc8
commit 505980dc1d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2019Q1/; revision=489817
2 changed files with 13 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME?= xorg-server
PORTVERSION?= 1.18.4
PORTREVISION?= 10
PORTREVISION?= 11
PORTEPOCH?= 1
CATEGORIES= x11-servers
MASTER_SITES= XORG/individual/xserver

View File

@ -0,0 +1,12 @@
--- hw/xfree86/os-support/misc/Makefile.in.orig 2015-09-23 10:21:18.470900000 +0200
+++ hw/xfree86/os-support/misc/Makefile.in 2015-09-23 10:22:34.979974000 +0200
@@ -530,7 +530,8 @@
#AM_LDFLAGS = -r
AM_CPPFLAGS = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
+@I386_VIDEO_TRUE@I386_VIDEO_CFLAGS = -mno-sse
+AM_CFLAGS = $(I386_VIDEO_CFLAGS) $(XORG_CFLAGS) $(DIX_CFLAGS)
EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS)
all: all-am