diff -u eglibc-2.11.1/debian/changelog eglibc-2.11.1/debian/changelog --- eglibc-2.11.1/debian/changelog +++ eglibc-2.11.1/debian/changelog @@ -1,3 +1,11 @@ +eglibc (2.11.1-0ubuntu7.11) lucid-proposed; urgency=low + + * debian/patches/amd64/cvs-avx-fix.diff: do not use AVX if hardware support + is present, but not enabled in the kernel. This patch is a backport of + cvs-avx-detection.diff. (LP: #979003) + + -- Chris J Arges Wed, 11 Apr 2012 10:35:21 -0500 + eglibc (2.11.1-0ubuntu7.10) lucid-security; urgency=low * SECURITY UPDATE: timezone header parsing integer overflow (LP: #906961) diff -u eglibc-2.11.1/debian/patches/series eglibc-2.11.1/debian/patches/series --- eglibc-2.11.1/debian/patches/series +++ eglibc-2.11.1/debian/patches/series @@ -45,6 +45,7 @@ amd64/local-biarch.diff amd64/local-clone.diff amd64/local-linuxthreads-gscope.diff +amd64/cvs-avx-fix.diff arm/local-atomic.diff arm/local-eabi-wchar.diff only in patch2: unchanged: --- eglibc-2.11.1.orig/debian/patches/amd64/cvs-avx-fix.diff +++ eglibc-2.11.1/debian/patches/amd64/cvs-avx-fix.diff @@ -0,0 +1,85 @@ +Backported Debian patch from Anton Tolchanov: +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646549 + +Upstream commit: +2011-07-20 Ulrich Drepper + + [BZ #13007] + * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): More complete + check for AVX enablement so that we don't crash with old kernels and + new hardware. +--- + +diff -ur eglibc-2.11.2//sysdeps/x86_64/dl-trampoline.S eglibc-2.11.2.changed//sysdeps/x86_64/dl-trampoline.S +--- eglibc-2.11.2//sysdeps/x86_64/dl-trampoline.S 2009-08-26 05:17:41.000000000 +0300 ++++ eglibc-2.11.2.changed//sysdeps/x86_64/dl-trampoline.S 2011-10-25 01:10:36.153062354 +0300 +@@ -139,16 +139,26 @@ + movl $1, %eax + cpuid + movq %r11,%rbx # Restore rbx +- movl $1, %eax +- testl $(1 << 28), %ecx ++ xorl %eax, %eax ++ // AVX and XSAVE supported? ++ andl $((1 << 28) | (1 << 27)), %ecx ++ cmpl $((1 << 28) | (1 << 27)), %ecx + jne 2f +- negl %eax +-2: movl %eax, L(have_avx)(%rip) ++ xorl %ecx, %ecx ++ // Get XFEATURE_ENABLED_MASK ++ xgetbv ++ andl $0x6, %eax ++ cmpl $0x6, %eax ++ // Nonzero if SSE and AVX state saving is enabled. ++ sete %al ++2: leal -1(%eax,%eax), %eax ++ movl %eax, L(have_avx)(%rip) + cmpl $0, %eax + + 1: js L(no_avx) + + # define RESTORE_AVX ++# define MORE_CODE + # include "dl-trampoline.h" + + .align 16 +@@ -176,11 +186,20 @@ + movl $1, %eax + cpuid + movq %r11,%rbx # Restore rbx +- movl $1, %eax +- testl $(1 << 28), %ecx ++ xorl %eax, %eax ++ // AVX and XSAVE supported? ++ andl $((1 << 28) | (1 << 27)), %ecx ++ cmpl $((1 << 28) | (1 << 27)), %ecx + jne 2f +- negl %eax +-2: movl %eax, L(have_avx)(%rip) ++ xorl %ecx, %ecx ++ // Get XFEATURE_ENABLED_MASK ++ xgetbv ++ andl $0x6, %eax ++ cmpl $0x6, %eax ++ // Nonzero if SSE and AVX state saving is enabled. ++ sete %al ++2: leal -1(%eax,%eax), %eax ++ movl %eax, L(have_avx)(%rip) + cmpl $0, %eax + + 1: js L(no_avx5) +diff -ur eglibc-2.11.2//sysdeps/x86_64/dl-trampoline.h eglibc-2.11.2.changed//sysdeps/x86_64/dl-trampoline.h +--- eglibc-2.11.2//sysdeps/x86_64/dl-trampoline.h 2009-08-09 17:33:15.000000000 +0300 ++++ eglibc-2.11.2.changed//sysdeps/x86_64/dl-trampoline.h 2011-10-25 01:15:09.501060129 +0300 +@@ -267,3 +267,10 @@ + # (eats the reloc index and link_map) + cfi_adjust_cfa_offset(-48) + retq ++ ++#ifdef MORE_CODE ++ cfi_adjust_cfa_offset(48) ++ cfi_rel_offset(%rbx, 0) ++ cfi_def_cfa_register(%rbx) ++# undef MORE_CODE ++#endif