diff mbox

Fix __memcpy_chk on non-SSE2 CPUs

Message ID 1423540140-24973-1-git-send-email-allan@archlinux.org
State New
Headers show

Commit Message

Allan McRae Feb. 10, 2015, 3:49 a.m. UTC
From: Evangelos Foutras <evangelos@foutrelis.com>

In commit 8b4416d, the 1: jump label in __mempcpy_chk was accidentally
moved.  This resulted in failures of mempcpy on CPU without SSE2.

---

2015-02-10  Evangelos Foutras  <evangelos@foutrelis.com>

	[BZ #17949]
	* sysdeps/i386/i686/multiarch/mempcpy_chk.S: Fix position of
	jump label.

 sysdeps/i386/i686/multiarch/mempcpy_chk.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

H.J. Lu Feb. 10, 2015, 11:31 a.m. UTC | #1
On Mon, Feb 9, 2015 at 7:49 PM, Allan McRae <allan@archlinux.org> wrote:
> From: Evangelos Foutras <evangelos@foutrelis.com>
>
> In commit 8b4416d, the 1: jump label in __mempcpy_chk was accidentally
> moved.  This resulted in failures of mempcpy on CPU without SSE2.
>
> ---
>
> 2015-02-10  Evangelos Foutras  <evangelos@foutrelis.com>
>
>         [BZ #17949]
>         * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Fix position of
>         jump label.
>

This is an obvious fix.  Please check it in.

Thanks.
Florian Weimer Feb. 11, 2015, 11:17 a.m. UTC | #2
On 02/10/2015 04:49 AM, Allan McRae wrote:
> From: Evangelos Foutras <evangelos@foutrelis.com>
> 
> In commit 8b4416d, the 1: jump label in __mempcpy_chk was accidentally
> moved.  This resulted in failures of mempcpy on CPU without SSE2.

Please state the nature of these failures.

Does the system still boot?

Thanks,
Florian
Allan McRae Feb. 11, 2015, 12:32 p.m. UTC | #3
On 11/02/15 21:17, Florian Weimer wrote:
> On 02/10/2015 04:49 AM, Allan McRae wrote:
>> From: Evangelos Foutras <evangelos@foutrelis.com>
>>
>> In commit 8b4416d, the 1: jump label in __mempcpy_chk was accidentally
>> moved.  This resulted in failures of mempcpy on CPU without SSE2.
> 
> Please state the nature of these failures.
> 
> Does the system still boot?
> 


It still booted.  Not much uses mempcpy it seems.

The two reports I saw, both were from "ls -l" segfaulting:
https://bugs.archlinux.org/task/43753
https://bugzilla.redhat.com/show_bug.cgi?id=1190454

Allan
diff mbox

Patch

diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.S b/sysdeps/i386/i686/multiarch/mempcpy_chk.S
index 207b648..b6fa202 100644
--- a/sysdeps/i386/i686/multiarch/mempcpy_chk.S
+++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.S
@@ -36,8 +36,8 @@  ENTRY(__mempcpy_chk)
 	cmpl	$0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
 	jne	1f
 	call	__init_cpu_features
-	leal	__mempcpy_chk_ia32@GOTOFF(%ebx), %eax
-1:	testl	$bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+1:	leal	__mempcpy_chk_ia32@GOTOFF(%ebx), %eax
+	testl	$bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
 	jz	2f
 	leal	__mempcpy_chk_sse2_unaligned@GOTOFF(%ebx), %eax
 	testl	$bit_Fast_Unaligned_Load, FEATURE_OFFSET+index_Fast_Unaligned_Load+__cpu_features@GOTOFF(%ebx)