This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Community source repository for glibc add-on ports branch, master, updated. glibc-2.13-14-g39262cc


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Community source repository for glibc add-on ports".

The branch, master has been updated
       via  39262cc898cdb3f6e26195aceb4e07c2b5c81df8 (commit)
      from  8825867bdd4b0acb81f91729f54e202529581108 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=39262cc898cdb3f6e26195aceb4e07c2b5c81df8

commit 39262cc898cdb3f6e26195aceb4e07c2b5c81df8
Author: Richard Henderson <rth@twiddle.net>
Date:   Mon Mar 28 14:44:49 2011 -0700

    [alpha] Fix wrong register use in ____longjmp_chk.

diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index 82384ac..55f8768 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,3 +1,8 @@
+2011-03-28  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S(____longjmp_chk):
+	Fix wrong register in stack pointer comparison.
+
 2011-03-01  Aurelien Jarno  <aurelien@aurel32.net>
 
 	* sysdeps/alpha/fpu/feupdateenv.c (feupdateenv): Add libm_hidden_def.
diff --git a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
index 5194ed8..53eb0f2 100644
--- a/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992, 1994, 1997, 2006, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1994, 1997, 2006, 2010, 2011
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -58,11 +59,17 @@ ____longjmp_chk:
 	PTR_DEMANGLE2(s3, t1)
 	PTR_DEMANGLE2(fp, t1)
 #endif
-	cmpule	t0, sp, t1
-	bne	t1, .Lfail
+	/* ??? While this is a proper test for detecting a longjmp to an
+	   invalid frame within any given stack, the main thread stack is
+	   located *below* almost everything in the address space.  Which
+	   means that the test at Lfail vs the signal stack will almost
+	   certainly never pass.  We ought bounds check top and bottom of
+	   the current thread's stack.  */
+	cmpule	s3, sp, t1
+	bne	t1, $Lfail
 
 	.align	4
-.Lok:
+$Lok:
 	mov	s0, a0
 	mov	s1, v0
 	mov	s3, t0
@@ -103,7 +110,7 @@ ____longjmp_chk:
 	ret
 
 	.align	4
-.Lfail:
+$Lfail:
 	cfi_restore_state
 	lda	v0, __NR_sigaltstack
 	lda	a0, 0
@@ -118,13 +125,13 @@ ____longjmp_chk:
 	cfi_adjust_cfa_offset(-32)
 
 	/* Without working sigaltstack we cannot perform the test.  */
-	bne	a3, .Lok
+	bne	a3, $Lok
 
 	addq	t0, t2, t0	/* t0 = ss_sp + ss_size */
 	subq	t0, s3, t0	/* t0 = (ss_sp + ss_size) - new_sp */
 	cmpule	t2, t0, t0	/* t0 = (t0 >= ss_size) */
 	and	t0, t1, t0	/* t0 = (t0 >= ss_size) & (ss_flags & SS_ONSTACK) */
-	bne	t0, .Lok
+	bne	t0, $Lok
 
 	ldah	a0, longjmp_msg(gp)	!gprelhigh
 	lda	a0, longjmp_msg(a0)	!gprellow

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog.alpha                                 |    5 +++++
 sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S |   21 ++++++++++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Community source repository for glibc add-on ports


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]