[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8463 - in /fsf/trunk/ports: ./ sysdeps/arm/ sysdeps/arm/eabi/ sysdeps/mips/ sysdeps/mips/mips64/ sysdeps/unix/sysv/linux/ar...
- To: commits@xxxxxxxxxx
- Subject: [commits] r8463 - in /fsf/trunk/ports: ./ sysdeps/arm/ sysdeps/arm/eabi/ sysdeps/mips/ sysdeps/mips/mips64/ sysdeps/unix/sysv/linux/ar...
- From: eglibc@xxxxxxxxxx
- Date: Sat, 16 May 2009 22:35:22 -0000
Author: eglibc
Date: Sat May 16 15:35:21 2009
New Revision: 8463
Log:
Import glibc-ports-mainline for 2009-05-16
Added:
fsf/trunk/ports/sysdeps/arm/____longjmp_chk.S
fsf/trunk/ports/sysdeps/mips/____longjmp_chk.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
Modified:
fsf/trunk/ports/ChangeLog.arm
fsf/trunk/ports/ChangeLog.m68k
fsf/trunk/ports/ChangeLog.mips
fsf/trunk/ports/sysdeps/arm/__longjmp.S
fsf/trunk/ports/sysdeps/arm/eabi/__longjmp.S
fsf/trunk/ports/sysdeps/mips/__longjmp.c
fsf/trunk/ports/sysdeps/mips/mips64/__longjmp.c
fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/Versions
Modified: fsf/trunk/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/ports/ChangeLog.arm (original)
+++ fsf/trunk/ports/ChangeLog.arm Sat May 16 15:35:21 2009
@@ -1,3 +1,14 @@
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/arm/____longjmp_chk.S: New file.
+ * sysdeps/arm/__longjmp.S: If CHECK_SP is defined, use it.
+ * sysdeps/arm/eabi/__longjmp.S: Likewise.
+
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_PREADV,
+ __ASSUME_PWRITEV): Don't undefine.
+
2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/arm/Versions (libc): Add
Modified: fsf/trunk/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/ports/ChangeLog.m68k (original)
+++ fsf/trunk/ports/ChangeLog.m68k Sat May 16 15:35:21 2009
@@ -1,3 +1,8 @@
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/m68k/Versions (libc): Add
+ fallocate64@@GLIBC_2.11.
+
2009-04-25 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/m68k/kernel-features.h: Revert last
Modified: fsf/trunk/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/ports/ChangeLog.mips (original)
+++ fsf/trunk/ports/ChangeLog.mips Sat May 16 15:35:21 2009
@@ -1,3 +1,17 @@
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/____longjmp_chk.c: New file.
+ * sysdeps/mips/__longjmp.c: If CHECK_SP is defined, use it. Don't
+ undefine __longjmp.
+ * sysdeps/mips64/__longjmp.c: Likewise.
+
+2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: New.
+
2009-05-16 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/Versions (libc): Add
Added: fsf/trunk/ports/sysdeps/arm/____longjmp_chk.S
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/____longjmp_chk.S (added)
+++ fsf/trunk/ports/sysdeps/arm/____longjmp_chk.S Sat May 16 15:35:21 2009
@@ -1,0 +1,55 @@
+/* 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 General Public License
+ along with GCC; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+
+ .section .rodata.str1.1,"aMS",%progbits,1
+ .type longjmp_msg,%object
+longjmp_msg:
+ .string "longjmp causes uninitialized stack frame"
+ .size longjmp_msg, .-longjmp_msg
+ .text
+
+#define __longjmp ____longjmp_chk
+
+#ifdef PIC
+# define CALL_FAIL \
+ ldr sl, .L_GOT; \
+.L_GOT_OFF: \
+ add sl, pc, sl; \
+ ldr r0, .Lstr; \
+ add r0, sl, r0; \
+ B PLTJMP(HIDDEN_JUMPTARGET(__fortify_fail)); \
+.L_GOT: \
+ .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8); \
+.Lstr: \
+ .word longjmp_msg(GOTOFF);
+#else
+# define CALL_FAIL \
+ ldr r0, .Lstr; \
+ B HIDDEN_JUMPTARGET(__fortify_fail); \
+.Lstr: \
+ .word longjmp_msg;
+#endif
+
+#define CHECK_SP(reg) \
+ cmp sp, reg; \
+ ble .Lok; \
+ CALL_FAIL \
+.Lok:
+
+#include <__longjmp.S>
Modified: fsf/trunk/ports/sysdeps/arm/__longjmp.S
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/__longjmp.S (original)
+++ fsf/trunk/ports/sysdeps/arm/__longjmp.S Sat May 16 15:35:21 2009
@@ -1,5 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 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
@@ -29,5 +29,9 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+#ifdef CHECK_SP
+ ldr r1, [ip, #32]
+ CHECK_SP (r1)
+#endif
LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc})
END (__longjmp)
Modified: fsf/trunk/ports/sysdeps/arm/eabi/__longjmp.S
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/eabi/__longjmp.S (original)
+++ fsf/trunk/ports/sysdeps/arm/eabi/__longjmp.S Sat May 16 15:35:21 2009
@@ -1,5 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2006, 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
@@ -30,6 +30,10 @@
movs r0, r1 /* get the return value in place */
moveq r0, #1 /* can't let setjmp() return zero! */
+#ifdef CHECK_SP
+ ldr r1, [ip, #32]
+ CHECK_SP (r1)
+#endif
LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
#ifdef IS_IN_rtld
Added: fsf/trunk/ports/sysdeps/mips/____longjmp_chk.c
==============================================================================
--- fsf/trunk/ports/sysdeps/mips/____longjmp_chk.c (added)
+++ fsf/trunk/ports/sysdeps/mips/____longjmp_chk.c Sat May 16 15:35:21 2009
@@ -1,0 +1,22 @@
+/* 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>
+#define __longjmp ____longjmp_chk
+#define CHECK_SP
+#include <__longjmp.c>
Modified: fsf/trunk/ports/sysdeps/mips/__longjmp.c
==============================================================================
--- fsf/trunk/ports/sysdeps/mips/__longjmp.c (original)
+++ fsf/trunk/ports/sysdeps/mips/__longjmp.c Sat May 16 15:35:21 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2000, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@xxxxxxx).
@@ -20,8 +20,6 @@
#include <setjmp.h>
#include <stdlib.h>
-#undef __longjmp
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -36,6 +34,11 @@
Without this it saves $a1 in a register which gets clobbered
along the way. */
register int val asm ("a1");
+#ifdef CHECK_SP
+ register long sp asm ("$29");
+ if ((long) (env[0].__sp) < sp)
+ __fortify_fail ("longjmp causes uninitialized stack frame");
+#endif
#ifdef __mips_hard_float
/* Pull back the floating point callee-saved registers. */
Modified: fsf/trunk/ports/sysdeps/mips/mips64/__longjmp.c
==============================================================================
--- fsf/trunk/ports/sysdeps/mips/mips64/__longjmp.c (original)
+++ fsf/trunk/ports/sysdeps/mips/mips64/__longjmp.c Sat May 16 15:35:21 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004
+/* Copyright (C) 1992, 1995, 1997, 2000, 2003, 2004, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Brendan Kehoe (brendan@xxxxxxx).
@@ -22,8 +22,6 @@
#include <sgidefs.h>
#include <stdlib.h>
-#undef __longjmp
-
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -38,6 +36,11 @@
Without this it saves $a1 in a register which gets clobbered
along the way. */
register int val asm ("a1");
+#ifdef CHECK_SP
+ register long long sp asm ("$29");
+ if ((long long) (env[0].__sp) < sp)
+ __fortify_fail ("longjmp causes uninitialized stack frame");
+#endif
#ifdef __mips_hard_float
/* Pull back the floating point callee-saved registers. */
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h Sat May 16 15:35:21 2009
@@ -56,5 +56,3 @@
/* These syscalls are not implemented yet for ARM. */
#undef __ASSUME_PSELECT
#undef __ASSUME_PPOLL
-#undef __ASSUME_PREADV
-#undef __ASSUME_PWRITEV
Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/Versions
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/Versions (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/m68k/Versions Sat May 16 15:35:21 2009
@@ -29,4 +29,7 @@
# v*
versionsort64;
}
+ GLIBC_2.11 {
+ fallocate64;
+ }
}
Added: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c (added)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate.c Sat May 16 15:35:21 2009
@@ -1,0 +1,34 @@
+/* Copyright (C) 2007, 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 <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+
+/* Reserve storage for the data of the file associated with FD. */
+int
+fallocate (int fd, int mode, __off_t offset, __off_t len)
+{
+#ifdef __NR_fallocate
+ return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
+}
Added: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c (added)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fallocate64.c Sat May 16 15:35:21 2009
@@ -1,0 +1,34 @@
+/* Copyright (C) 2007, 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 <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+
+/* Reserve storage for the data of the file associated with FD. */
+int
+fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
+{
+#ifdef __NR_fallocate
+ return INLINE_SYSCALL (fallocate, 4, fd, mode, offset, len);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
+}
Added: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c (added)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c Sat May 16 15:35:21 2009
@@ -1,0 +1,1 @@
+#include <sysdeps/unix/sysv/linux/wordsize-64/fallocate.c>
Added: fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c (added)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c Sat May 16 15:35:21 2009
@@ -1,0 +1,1 @@
+/* fallocate64 is in fallocate.c */