[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1004483: bullseye-pu: package xserver-xorg-video-intel/2:2.99.917+git20200714-1+deb11u1



Package: release.debian.org
Severity: normal
Tags: bullseye
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: jcristau@debian.org

[ Reason ]
Due to an issue with the way it sets compiler flags for sse2 routines,
the intel Xorg driver was compiled with sse2 enabled for more than just
the code that's guarded by cpu checks, and as a result X crashed with
SIGILL on old CPUs.

[ Impact ]
No Xorg for users with those CPUs.  This driver is dead upstream but is
still what we use for some old intel chips that may not work as well
with the generic modesetting driver.

[ Tests ]
3 users have confirmed the patched package fixes the issue for them.

[ Risks ]
Patch is fairly trivial, instead of
#pragma GCC push_options target("sse2,inline-all-stringops,fpmath=sse")
[sse2 code]
#pragma GCC push_options
[other code]

we replace the second push_options with a pop_options so the [other
code] isn't compiled to the wrong target.

(Now that I look at the code again I notice another bug where the sse2
use is guarded by "#if defined(sse2) && __x86_64__" where I think the &&
should be a ||, so even on CPUs with SSE2 the optimized code won't
get used anymore on i386.  But I suspect the impact of that bug is a small
perf hit, so we're probably OK with that?)

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

Cheers,
Julien

 debian/patches/sna-sse2.diff                                        |   22 ++++++++++
 xserver-xorg-video-intel-2.99.917+git20200714/debian/changelog      |    7 +++
 xserver-xorg-video-intel-2.99.917+git20200714/debian/patches/series |    2 
 3 files changed, 30 insertions(+), 1 deletion(-)

diff -u xserver-xorg-video-intel-2.99.917+git20200714/debian/changelog xserver-xorg-video-intel-2.99.917+git20200714/debian/changelog
--- xserver-xorg-video-intel-2.99.917+git20200714/debian/changelog
+++ xserver-xorg-video-intel-2.99.917+git20200714/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-intel (2:2.99.917+git20200714-1+deb11u1) bullseye; urgency=medium
+
+  [ Julien Cristau ]
+  * Fix SIGILL crash on non-SSE2 CPUs (closes: #979276)
+
+ -- Julien Cristau <jcristau@debian.org>  Wed, 26 Jan 2022 17:56:02 +0100
+
 xserver-xorg-video-intel (2:2.99.917+git20200714-1) unstable; urgency=medium
 
   * New upstream snapshot. (Closes: #959400)
diff -u xserver-xorg-video-intel-2.99.917+git20200714/debian/patches/series xserver-xorg-video-intel-2.99.917+git20200714/debian/patches/series
--- xserver-xorg-video-intel-2.99.917+git20200714/debian/patches/series
+++ xserver-xorg-video-intel-2.99.917+git20200714/debian/patches/series
@@ -1 +1 @@
-#placeholder
+sna-sse2.diff 
only in patch2:
unchanged:
--- xserver-xorg-video-intel-2.99.917+git20200714.orig/debian/patches/sna-sse2.diff
+++ xserver-xorg-video-intel-2.99.917+git20200714/debian/patches/sna-sse2.diff
@@ -0,0 +1,22 @@
+From 3d9f93d8bc5dfe2b79d4e16b8b5a6ce13b0792af Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@debian.org>
+Date: Fri, 21 Jan 2022 13:50:12 +0100
+Subject: [PATCH xf86-video-intel] Fix SIGILL crash on non-SSE2 CPUs (closes:
+ #979276)
+
+diff --git a/src/sna/blt.c b/src/sna/blt.c
+index afc719f6..803c5142 100644
+--- a/src/sna/blt.c
++++ b/src/sna/blt.c
+@@ -631,7 +631,7 @@ memcpy_between_tiled_x__swizzle_0__sse2(const void *src, void *dst, int bpp,
+ 	}
+ }
+ 
+-#pragma GCC push_options
++#pragma GCC pop_options
+ #endif
+ 
+ fast void
+-- 
+2.30.2
+


Reply to: