[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8482 - in /fsf/trunk/libc: ./ sysdeps/i386/ sysdeps/ia64/ sysdeps/unix/sysv/linux/ sysdeps/unix/sysv/linux/ia64/ sysdeps/x8...
- To: commits@xxxxxxxxxx
- Subject: [commits] r8482 - in /fsf/trunk/libc: ./ sysdeps/i386/ sysdeps/ia64/ sysdeps/unix/sysv/linux/ sysdeps/unix/sysv/linux/ia64/ sysdeps/x8...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 22 May 2009 07:09:06 -0000
Author: eglibc
Date: Fri May 22 00:09:06 2009
New Revision: 8482
Log:
Import glibc-mainline for 2009-05-22
Added:
fsf/trunk/libc/sysdeps/ia64/configure
fsf/trunk/libc/sysdeps/ia64/configure.in
fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/sysdeps/i386/__longjmp.S
fsf/trunk/libc/sysdeps/ia64/memchr.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/accept4.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/__longjmp.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/socketcall.h
fsf/trunk/libc/sysdeps/x86_64/__longjmp.S
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri May 22 00:09:06 2009
@@ -1,3 +1,31 @@
+2009-05-20 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ * sysdeps/ia64/configure.in: New file.
+
+2009-05-21 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+
+ [BZ #10162]
+ * sysdeps/ia64/memchr.S: Use speculative load.
+
+ * sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S: New file.
+ * sysdeps/unix/sysv/linux/ia64/__longjmp.S: If CHECK_RSP is defined,
+ use it.
+
+ * sysdeps/i386/__longjmp.S: Add .text.
+ * sysdeps/x86_64/__longjmp.S: Likewise.
+
+2009-05-21 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h: Don't define
+ __ASSUME_ACCEPT4 for IA-64.
+
+2009-05-21 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/accept4.c (__NR_accept4): Don't define.
+
+ * sysdeps/unix/sysv/linux/socketcall.h (SOCKOP_paccept): Remove.
+ (SOCKOP_accept4): Define.
+
2009-05-20 Ulrich Drepper <drepper@xxxxxxxxxx>
Sun approved the change of the license.
@@ -100,7 +128,7 @@
* sysdeps/sh/____longjmp_chk.S: New file.
* sysdeps/sh/sh3/__longjmp.S: If CHECK_SP is defined, use it.
* sysdeps/sh/sh4/__longjmp.S: Likewise.
-
+
2009-05-18 Jakub Jelinek <jakub@xxxxxxxxxx>
Ulrich Drepper <drepper@xxxxxxxxxx>
Modified: fsf/trunk/libc/sysdeps/i386/__longjmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/__longjmp.S (original)
+++ fsf/trunk/libc/sysdeps/i386/__longjmp.S Fri May 22 00:09:06 2009
@@ -28,6 +28,7 @@
#define JBUF PARMS
#define VAL JBUF+PTR_SIZE
+ .text
ENTRY (BP_SYM (__longjmp))
ENTER
Added: fsf/trunk/libc/sysdeps/ia64/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/ia64/configure (added)
+++ fsf/trunk/libc/sysdeps/ia64/configure Fri May 22 00:09:06 2009
@@ -1,0 +1,54 @@
+# This file is generated from configure.in by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/ia64.
+
+echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
+echo $ECHO_N "checking if -g produces usable source locations for assembler-with-cpp... $ECHO_C" >&6
+if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.S <<EOF
+#include "confdefs.h"
+
+/* comment on
+ two lines */
+ ${libc_cv_dot_text}
+ ${libc_cv_asm_global_directive} foo
+foo:
+ /* Unfortunately this test only works for a real instruction,
+ not for any of the machine-independent pseudo-ops.
+ So we just have to assume everybody has a "nop". */
+ nop.b 0;;
+ /* comment */
+ nop.b 0;;
+ /* comment */
+ nop.b 0;;
+EOF
+if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } && {
+ ac_pattern='conftest\.S'
+ { ac_try='readelf --debug-dump=line conftest.o |
+ grep $ac_pattern 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+ }; then
+ libc_cv_cpp_asm_debuginfo=yes
+else
+ libc_cv_cpp_asm_debuginfo=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
+echo "${ECHO_T}$libc_cv_cpp_asm_debuginfo" >&6
+if test $libc_cv_cpp_asm_debuginfo = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CPP_ASM_DEBUGINFO 1
+_ACEOF
+
+fi
Added: fsf/trunk/libc/sysdeps/ia64/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/ia64/configure.in (added)
+++ fsf/trunk/libc/sysdeps/ia64/configure.in Fri May 22 00:09:06 2009
@@ -1,0 +1,35 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/ia64.
+
+AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
+ libc_cv_cpp_asm_debuginfo, [dnl
+cat > conftest.S <<EOF
+#include "confdefs.h"
+
+/* comment on
+ two lines */
+ ${libc_cv_dot_text}
+ ${libc_cv_asm_global_directive} foo
+foo:
+ /* Unfortunately this test only works for a real instruction,
+ not for any of the machine-independent pseudo-ops.
+ So we just have to assume everybody has a "nop". */
+ nop.b 0;;
+ /* comment */
+ nop.b 0;;
+ /* comment */
+ nop.b 0;;
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
+ ac_pattern='conftest\.S'
+ AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
+ grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
+ }; then
+ libc_cv_cpp_asm_debuginfo=yes
+else
+ libc_cv_cpp_asm_debuginfo=no
+fi
+rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
+if test $libc_cv_cpp_asm_debuginfo = yes; then
+ AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
+fi
Modified: fsf/trunk/libc/sysdeps/ia64/memchr.S
==============================================================================
--- fsf/trunk/libc/sysdeps/ia64/memchr.S (original)
+++ fsf/trunk/libc/sysdeps/ia64/memchr.S Fri May 22 00:09:06 2009
@@ -96,7 +96,8 @@
mov pr.rot = 1 << 16 ;;
.l2:
(p[0]) mov addr[0] = ret0
-(p[0]) ld8 value[0] = [ret0], 8
+(p[0]) ld8.s value[0] = [ret0], 8 // speculative load
+(p[MEMLAT]) chk.s value[MEMLAT], .recovery // check and recovery
(p[MEMLAT]) xor aux[0] = value[MEMLAT], chrx8
(p[MEMLAT+1]) czx1.r poschr[0] = aux[1]
(p[MEMLAT+2]) cmp.ne p7, p0 = 8, poschr[1]
@@ -124,6 +125,20 @@
mov ar.lc = saved_lc
br.ret.sptk.many b0
+.recovery:
+ adds ret0 = -((MEMLAT + 1) * 8), ret0;;
+(p[MEMLAT+1]) add ret0 = -8, ret0;;
+(p[MEMLAT+2]) add ret0 = -8, ret0;;
+.l4:
+ mov addr[MEMLAT+2] = ret0
+ ld8 tmp = [ret0];; // load the first unchecked 8byte
+ xor aux[1] = tmp, chrx8;;
+ czx1.r poschr[1] = aux[1];;
+ cmp.ne p7, p0 = 8, poschr[1]
+(p7) br.cond.spnt .foundit;;
+ adds ret0 = 8, ret0 // load the next unchecked 8byte
+ br.sptk .l4;;
+
END(__memchr)
weak_alias (__memchr, memchr)
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/accept4.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/accept4.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/accept4.c Fri May 22 00:09:06 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 2008.
@@ -23,8 +23,6 @@
#include <sysdep-cancel.h>
#include <sys/syscall.h>
-
-#define __NR_accept4 288
#ifdef __NR_accept4
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/____longjmp_chk.S Fri May 22 00:09:06 2009
@@ -1,0 +1,48 @@
+/* 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. */
+
+ .section .rodata.str1.8,"aMS",@progbits,1
+ .align 8
+.LC0:
+ .string "longjmp causes uninitialized stack frame"
+
+ .section .sdata,"aws",@progbits
+ .align 8
+ .type longjmp_msg,@object
+longjmp_msg:
+ data8 .LC0
+ .size longjmp_msg, .-longjmp_msg
+
+#define __longjmp ____longjmp_chk
+
+#ifdef PIC
+# define CALL_FAIL __GI___fortify_fail
+#else
+# define CALL_FAIL __fortify_fail
+#endif
+
+#define CHECK_RSP(reg) \
+ cmp.ltu p0, p8 = reg, r12; \
+(p8) br.cond.dpnt .Lok;; \
+ addl r28 = @ltoffx(longjmp_msg#), r1;; \
+ ld8.mov r28 = [r28], longjmp_msg#;; \
+ ld8 out0 = [r28]; \
+ br.call.sptk.many b0 = CALL_FAIL#;; \
+.Lok:
+
+#include "__longjmp.S"
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/__longjmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/__longjmp.S (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/__longjmp.S Fri May 22 00:09:06 2009
@@ -42,7 +42,11 @@
/* __longjmp(__jmp_buf buf, int val) */
LEAF(__longjmp)
+#ifdef CHECK_RSP
+ alloc r8=ar.pfs,2,1,1,0
+#else
alloc r8=ar.pfs,2,1,0,0
+#endif
mov r27=ar.rsc
add r2=0x98,in0 // r2 <- &jmpbuf.orig_jmp_buf_addr
;;
@@ -70,14 +74,18 @@
add r3=8,in0 // r3 <- &jmpbuf.r1
shl r9=r25,r17
;;
+ ld8.fill.nta r28=[r2],16 // r28 <- jmpbuf.sp
or r25=r8,r9
;;
mov r26=ar.rnat
mov ar.unat=r25 // setup ar.unat (NaT bits for r1, r4-r7, and r12)
;;
- ld8.fill.nta sp=[r2],16 // r12 (sp)
+#ifdef CHECK_RSP
+ CHECK_RSP (r28)
+#endif
ld8.fill.nta gp=[r3],16 // r1 (gp)
dep r11=-1,r23,3,6 // r11 <- ia64_rse_rnat_addr(jmpbuf.ar_bsp)
+ mov sp=r28 // r12 (sp)
;;
ld8.nta r16=[r2],16 // caller's unat
ld8.nta r17=[r3],16 // fpsr
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/kernel-features.h Fri May 22 00:09:06 2009
@@ -521,7 +521,7 @@
/* Support for the accept4 syscall was added in 2.6.28. */
#if __LINUX_KERNEL_VERSION >= 0x02061c \
&& (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
- || defined __ia64__ || defined __sparc__ || defined __s390__)
+ || defined __sparc__ || defined __s390__)
# define __ASSUME_ACCEPT4 1
#endif
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/socketcall.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/socketcall.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/socketcall.h Fri May 22 00:09:06 2009
@@ -1,5 +1,5 @@
/* ID for functions called via socketcall system call.
- Copyright (C) 1995, 1996, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2008, 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
@@ -43,6 +43,6 @@
#define SOCKOP_getsockopt 15
#define SOCKOP_sendmsg 16
#define SOCKOP_recvmsg 17
-#define SOCKOP_paccept 18
+#define SOCKOP_accept4 18
#endif /* sys/socketcall.h */
Modified: fsf/trunk/libc/sysdeps/x86_64/__longjmp.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/__longjmp.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/__longjmp.S Fri May 22 00:09:06 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,2004,2005,2006 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2004,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
@@ -23,6 +23,7 @@
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0.
void __longjmp (__jmp_buf env, int val). */
+ .text
ENTRY(__longjmp)
/* Restore registers. */
movq (JB_RSP*8)(%rdi),%r8