summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0004-i686-Add-missing-IS_IN-libc-guards-to-vectorized-str.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0004-i686-Add-missing-IS_IN-libc-guards-to-vectorized-str.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0004-i686-Add-missing-IS_IN-libc-guards-to-vectorized-str.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0004-i686-Add-missing-IS_IN-libc-guards-to-vectorized-str.patch b/meta/recipes-core/glibc/glibc/0004-i686-Add-missing-IS_IN-libc-guards-to-vectorized-str.patch
new file mode 100644
index 0000000000..43c4398fec
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0004-i686-Add-missing-IS_IN-libc-guards-to-vectorized-str.patch
@@ -0,0 +1,62 @@
1From 203835b3bf6f1edfe1ebe4a7fa15dc085e6dc8f7 Mon Sep 17 00:00:00 2001
2From: Florian Weimer <fweimer@redhat.com>
3Date: Wed, 14 Jun 2017 08:11:22 +0200
4Subject: [PATCH] i686: Add missing IS_IN (libc) guards to vectorized strcspn
5
6Since commit d957c4d3fa48d685ff2726c605c988127ef99395 (i386: Compile
7rtld-*.os with -mno-sse -mno-mmx -mfpmath=387), vector intrinsics can
8no longer be used in ld.so, even if the compiled code never makes it
9into the final ld.so link. This commit adds the missing IS_IN (libc)
10guard to the SSE 4.2 strcspn implementation, so that it can be used from
11ld.so in the future.
12
13(cherry picked from commit 69052a3a95da37169a08f9e59b2cc1808312753c)
14
15Upstream-Status: Backport
16https://sourceware.org/git/?p=glibc.git;a=commit;h=86ac4a78a9218d1e1dcfbacc6f7d09957c1fe3a4
17
18Required to build fixes for CVE-2017-1000366.
19
20Signed-off-by: George McCollister <george.mccollister@gmail.com>
21---
22 ChangeLog | 5 +++++
23 sysdeps/i386/i686/multiarch/strcspn-c.c | 6 ++++--
24 sysdeps/i386/i686/multiarch/varshift.c | 4 +++-
25 3 files changed, 12 insertions(+), 3 deletions(-)
26
27diff --git a/ChangeLog b/ChangeLog
28index 638cb632b1..3f89a2cdb2 100644
29--- a/ChangeLog
30+++ b/ChangeLog
31@@ -1,3 +1,8 @@
32+2017-06-14 Florian Weimer <fweimer@redhat.com>
33+
34+ * sysdeps/i386/i686/multiarch/strcspn-c.c: Add IS_IN (libc) guard.
35+ * sysdeps/i386/i686/multiarch/varshift.c: Likewise.
36+
37 2017-06-19 Florian Weimer <fweimer@redhat.com>
38
39 * elf/rtld.c (audit_list_string): New variable.
40diff --git a/sysdeps/i386/i686/multiarch/strcspn-c.c b/sysdeps/i386/i686/multiarch/strcspn-c.c
41index 6d61e190a8..ec230fb383 100644
42--- a/sysdeps/i386/i686/multiarch/strcspn-c.c
43+++ b/sysdeps/i386/i686/multiarch/strcspn-c.c
44@@ -1,2 +1,4 @@
45-#define __strcspn_sse2 __strcspn_ia32
46-#include <sysdeps/x86_64/multiarch/strcspn-c.c>
47+#if IS_IN (libc)
48+# define __strcspn_sse2 __strcspn_ia32
49+# include <sysdeps/x86_64/multiarch/strcspn-c.c>
50+#endif
51diff --git a/sysdeps/i386/i686/multiarch/varshift.c b/sysdeps/i386/i686/multiarch/varshift.c
52index 7760b966e2..6742a35d41 100644
53--- a/sysdeps/i386/i686/multiarch/varshift.c
54+++ b/sysdeps/i386/i686/multiarch/varshift.c
55@@ -1 +1,3 @@
56-#include <sysdeps/x86_64/multiarch/varshift.c>
57+#if IS_IN (libc)
58+# include <sysdeps/x86_64/multiarch/varshift.c>
59+#endif
60--
612.15.0
62