diff options
| author | Andre McCurdy <armccurdy@gmail.com> | 2015-06-01 18:06:44 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-28 09:44:13 +0100 |
| commit | 34afb7cb38d1f6598133dfdb7236a89894486a8f (patch) | |
| tree | 178b2fb8abb0b08590a8d78a0798d9e5e5cef857 | |
| parent | 606a6d36deba7a850da8338e464dc2a9921b9e1a (diff) | |
| download | poky-34afb7cb38d1f6598133dfdb7236a89894486a8f.tar.gz | |
glibc: Fix __memcpy_chk on non-SSE2 CPUs
Backport from upstream glibc:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=132a1328eccd20621b77f7810eebbeec0a1af187
Note that the fix is only required when glibc is built for i686/multiarch,
so is not applicable in the default oe-core x86 configuration (which builds
glibc for i586 and therefore does not include SSE2 optimised memcpy etc).
(From OE-Core rev: e643b9bc4c459ea8b59573cf67f2494388e7a377)
(From OE-Core rev: 38b0095c3a3416725ef5f19ab940e84f45a8a01a)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/glibc/glibc/Fix-__memcpy_chk-on-non-SSE2-CPUs.patch | 36 | ||||
| -rw-r--r-- | meta/recipes-core/glibc/glibc_2.21.bb | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/Fix-__memcpy_chk-on-non-SSE2-CPUs.patch b/meta/recipes-core/glibc/glibc/Fix-__memcpy_chk-on-non-SSE2-CPUs.patch new file mode 100644 index 0000000000..2e768bb6e8 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/Fix-__memcpy_chk-on-non-SSE2-CPUs.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From 132a1328eccd20621b77f7810eebbeec0a1af187 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Evangelos Foutras <evangelos@foutrelis.com> | ||
| 3 | Date: Tue, 10 Feb 2015 03:22:58 +0000 | ||
| 4 | Subject: [PATCH] Fix __memcpy_chk on non-SSE2 CPUs | ||
| 5 | |||
| 6 | In commit 8b4416d, the 1: jump label in __mempcpy_chk was accidentally | ||
| 7 | moved. This resulted in failures of mempcpy on CPU without SSE2. | ||
| 8 | |||
| 9 | Upstream-Status: Backport | ||
| 10 | |||
| 11 | https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=132a1328eccd20621b77f7810eebbeec0a1af187 | ||
| 12 | |||
| 13 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
| 14 | |||
| 15 | --- | ||
| 16 | sysdeps/i386/i686/multiarch/mempcpy_chk.S | 4 ++-- | ||
| 17 | 3 files changed, 9 insertions(+), 3 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.S b/sysdeps/i386/i686/multiarch/mempcpy_chk.S | ||
| 20 | index 207b648..b6fa202 100644 | ||
| 21 | --- a/sysdeps/i386/i686/multiarch/mempcpy_chk.S | ||
| 22 | +++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.S | ||
| 23 | @@ -36,8 +36,8 @@ ENTRY(__mempcpy_chk) | ||
| 24 | cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx) | ||
| 25 | jne 1f | ||
| 26 | call __init_cpu_features | ||
| 27 | - leal __mempcpy_chk_ia32@GOTOFF(%ebx), %eax | ||
| 28 | -1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) | ||
| 29 | +1: leal __mempcpy_chk_ia32@GOTOFF(%ebx), %eax | ||
| 30 | + testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx) | ||
| 31 | jz 2f | ||
| 32 | leal __mempcpy_chk_sse2_unaligned@GOTOFF(%ebx), %eax | ||
| 33 | testl $bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx) | ||
| 34 | -- | ||
| 35 | 1.9.1 | ||
| 36 | |||
diff --git a/meta/recipes-core/glibc/glibc_2.21.bb b/meta/recipes-core/glibc/glibc_2.21.bb index d2be731045..a0b2f2dee8 100644 --- a/meta/recipes-core/glibc/glibc_2.21.bb +++ b/meta/recipes-core/glibc/glibc_2.21.bb | |||
| @@ -27,6 +27,7 @@ SRC_URI = "git://sourceware.org/git/glibc.git;branch=${BRANCH} \ | |||
| 27 | file://0001-yes-within-the-path-sets-wrong-config-variables.patch \ | 27 | file://0001-yes-within-the-path-sets-wrong-config-variables.patch \ |
| 28 | file://elf-Makefile-fix-a-typo.patch \ | 28 | file://elf-Makefile-fix-a-typo.patch \ |
| 29 | file://makesyscall.patch \ | 29 | file://makesyscall.patch \ |
| 30 | file://Fix-__memcpy_chk-on-non-SSE2-CPUs.patch \ | ||
| 30 | ${EGLIBCPATCHES} \ | 31 | ${EGLIBCPATCHES} \ |
| 31 | ${CVEPATCHES} \ | 32 | ${CVEPATCHES} \ |
| 32 | " | 33 | " |
