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.10.1-23-gf0e6944


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  f0e694490652893bd0957f8ded779133d883ebcd (commit)
      from  53df8bcec0cc4a07dcb0d13f9105a9002d9183d8 (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=f0e694490652893bd0957f8ded779133d883ebcd

commit f0e694490652893bd0957f8ded779133d883ebcd
Author: Andreas Schwab <schwab@linux-m68k.org>
Date:   Sun Sep 6 21:20:26 2009 +0200

    Add ____longjmp_chk for m68k-linux

diff --git a/ChangeLog.m68k b/ChangeLog.m68k
index 3afc3da..41ede01 100644
--- a/ChangeLog.m68k
+++ b/ChangeLog.m68k
@@ -1,3 +1,9 @@
+2009-09-06  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c: New file.
+
+	* sysdeps/m68k/__longjmp.c (__longjmp): Call CHECK_SP if defined.
+
 2009-05-16  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/m68k/Versions (libc): Add
diff --git a/sysdeps/m68k/__longjmp.c b/sysdeps/m68k/__longjmp.c
index 7d876a7..5ba2478 100644
--- a/sysdeps/m68k/__longjmp.c
+++ b/sysdeps/m68k/__longjmp.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1997, 2009
+   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
@@ -27,6 +28,10 @@ __longjmp (__jmp_buf env, int val)
   /* This restores the FP and SP that setjmp's caller had,
      and puts the return address into A0 and VAL into D0. */
 
+#ifdef CHECK_SP
+  CHECK_SP (env[0].__sp);
+#endif
+
 #if	defined(__HAVE_68881__) || defined(__HAVE_FPU__)
   /* Restore the floating-point registers.  */
   asm volatile("fmovem%.x %0, %/fp0-%/fp7" :
diff --git a/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c b/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c
new file mode 100644
index 0000000..8eaf591
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 2009 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <stdio.h>
+#include <signal.h>
+#include <sysdep.h>
+#define __longjmp ____longjmp_chk
+#define CHECK_SP(sp)							      \
+  do {									      \
+    register unsigned long this_sp asm ("sp");				      \
+    if ((unsigned long) (sp) < this_sp)					      \
+      {									      \
+	struct sigaltstack oss;						      \
+	INTERNAL_SYSCALL_DECL (err);					      \
+	int result = INTERNAL_SYSCALL (sigaltstack, err, 2, NULL, &oss);      \
+	if (!INTERNAL_SYSCALL_ERROR_P (result, err)			      \
+	    && ((oss.ss_flags & SS_ONSTACK) == 0			      \
+		|| ((unsigned long) oss.ss_sp + oss.ss_size		      \
+		    - (unsigned long) (sp)) < oss.ss_size))		      \
+	  __fortify_fail ("longjmp causes uninitialized stack frame");	      \
+      }									      \
+  } while (0)
+
+#include <__longjmp.c>

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

Summary of changes:
 ChangeLog.m68k                                     |    6 +++
 sysdeps/m68k/__longjmp.c                           |    7 +++-
 .../sysv/linux/{mips => m68k}/____longjmp_chk.c    |   37 +++++++++-----------
 3 files changed, 29 insertions(+), 21 deletions(-)
 copy sysdeps/unix/sysv/linux/{mips => m68k}/____longjmp_chk.c (60%)


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]