[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r19340 - in /fsf/glibc-2_15-branch/ports: ./ sysdeps/tile/ sysdeps/tile/tilegx/ sysdeps/unix/sysv/linux/generic/wordsize-32/...



Author: eglibc
Date: Fri Jun 29 00:02:51 2012
New Revision: 19340

Log:
Import glibc-ports-2.15 for 2012-06-29

Modified:
    fsf/glibc-2_15-branch/ports/ChangeLog.linux-generic
    fsf/glibc-2_15-branch/ports/ChangeLog.tile
    fsf/glibc-2_15-branch/ports/sysdeps/tile/dl-start.S
    fsf/glibc-2_15-branch/ports/sysdeps/tile/fegetenv.c
    fsf/glibc-2_15-branch/ports/sysdeps/tile/tilegx/memcpy.c
    fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list
    fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/getcontext.S
    fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S
    fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
    fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S
    fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/sys/dataplane.h
    fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/ucontext_i.h

Modified: fsf/glibc-2_15-branch/ports/ChangeLog.linux-generic
==============================================================================
--- fsf/glibc-2_15-branch/ports/ChangeLog.linux-generic (original)
+++ fsf/glibc-2_15-branch/ports/ChangeLog.linux-generic Fri Jun 29 00:02:51 2012
@@ -1,3 +1,8 @@
+2012-05-12  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list:
+	Add entries for prlimit64 and fanotify_mark.
+
 2012-01-30  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/generic/not-cancel.h: New file.

Modified: fsf/glibc-2_15-branch/ports/ChangeLog.tile
==============================================================================
--- fsf/glibc-2_15-branch/ports/ChangeLog.tile (original)
+++ fsf/glibc-2_15-branch/ports/ChangeLog.tile Fri Jun 29 00:02:51 2012
@@ -1,3 +1,34 @@
+2012-05-17  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
+
+	* sysdeps/tile/fegetenv.c: Version fegetenv() like fesetenv().
+
+2012-05-16  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/tile/ucontext_i: Fix tilegx32 offset bug.
+	* sysdeps/unix/sysv/linux/tile/getcontext.S: Fix tilegx32 bug
+	where we accessed "uc_flags" as an 8-byte field.
+	* sysdeps/unix/sysv/linux/tile/setcontext.S: Likewise,
+	and also fix frame code not to access stack below "sp".
+	* sysdeps/unix/sysv/linux/tile/swapcontext.S: Fix frame code not
+	to access stack below "sp", and add frame unwind to error path.
+
+2012-05-14  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
+
+	* sysdeps/tile/dl-start.S: Align stack for tilegx32.
+
+2012-05-12  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/tile/sys/dataplane.h: Add <features.h>.
+
+2012-05-12  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/tile/nptl/clone.S: Add missing CFI.
+
+2012-05-12  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
+
+	* sysdeps/tile/tilegx/memcpy.c: Allow memcpy(p, p, n)
+	without corrupting memory at "p".
+
 2012-01-31  Chris Metcalf  <cmetcalf@xxxxxxxxxx>
 
 	* sysdeps/tile/math_private.h: Ignore feraiseexcept() internally.

Modified: fsf/glibc-2_15-branch/ports/sysdeps/tile/dl-start.S
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/tile/dl-start.S (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/tile/dl-start.S Fri Jun 29 00:02:51 2012
@@ -78,6 +78,7 @@
 	 ST_PTR r52, r0
 	 SHL_PTR_ADD sp, r4, sp
 	}
+	andi sp, sp, -8
 
 .Lno_skip:
 	/* Call_dl_init (_dl_loaded, argc, argv, envp).  See elf/start.s

Modified: fsf/glibc-2_15-branch/ports/sysdeps/tile/fegetenv.c
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/tile/fegetenv.c (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/tile/fegetenv.c Fri Jun 29 00:02:51 2012
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include <fenv.h>
+#include <shlib-compat.h>
 
 int
 __fegetenv (fenv_t *envp)
@@ -26,3 +27,4 @@
   return 0;
 }
 libm_hidden_ver (__fegetenv, fegetenv)
+versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);

Modified: fsf/glibc-2_15-branch/ports/sysdeps/tile/tilegx/memcpy.c
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/tile/tilegx/memcpy.c (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/tile/tilegx/memcpy.c Fri Jun 29 00:02:51 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
 
@@ -107,6 +107,17 @@
           for (; (uintptr_t) dst8 & (CHIP_L2_LINE_SIZE () - 1);
                n -= sizeof (word_t))
             *dst8++ = *src8++;
+
+          /* If copying to self, return.  The test is cheap enough
+             that we do it despite the fact that the memcpy() contract
+             doesn't require us to support overlapping dst and src.
+             This is the most common case of overlap, and any close
+             overlap will cause corruption due to the wh64 below.
+             This case is particularly important since the compiler
+             will emit memcpy() calls for aggregate copies even if it
+             can't prove that src != dst.  */
+          if (__builtin_expect (dst8 == src8, 0))
+            return dstv;
 
           for (; n >= CHIP_L2_LINE_SIZE ();)
             {

Modified: fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/generic/wordsize-32/syscalls.list Fri Jun 29 00:02:51 2012
@@ -3,3 +3,5 @@
 # rlimit APIs
 getrlimit	-	getrlimit	i:ip	__getrlimit	getrlimit	
 setrlimit	-	setrlimit	i:ip	__setrlimit	setrlimit	
+prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark

Modified: fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/getcontext.S
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/getcontext.S (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/getcontext.S Fri Jun 29 00:02:51 2012
@@ -33,7 +33,7 @@
 	   swapcontext() will assume those registers are all dead.
 	   Save value "1" to uc_flags to later recognize getcontext().  */
 	{ movei r11, 1; ADDI_PTR r10, r0, UC_FLAGS_OFFSET }
-	{ ST r10, r11; addli r10, r0, UC_REG(30) }
+	{ ST_PTR r10, r11; addli r10, r0, UC_REG(30) }
 	{ ST r10, r30; ADDI_PTR r10, r10, REGSIZE }
 	{ ST r10, r31; ADDI_PTR r10, r10, REGSIZE }
 	{ ST r10, r32; ADDI_PTR r10, r10, REGSIZE }

Modified: fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/nptl/clone.S Fri Jun 29 00:02:51 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
 
@@ -168,6 +168,7 @@
 	   in getpid().  Otherwise (if CLONE_VM isn't set), it's a
 	   fork-like clone, and we go ahead and write the cached values
 	   from the true system pid (retrieved via __NR_getpid syscall).  */
+	cfi_def_cfa_offset (FRAME_SIZE)
 #ifdef __tilegx__
 	{
 	 moveli r0, hw1_last(CLONE_VM)

Modified: fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/setcontext.S
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/setcontext.S (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/setcontext.S Fri Jun 29 00:02:51 2012
@@ -38,7 +38,7 @@
 #if UC_FLAGS_OFFSET != 0
 # error "Add offset to r0 prior to load."
 #endif
-	LD r10, r0
+	LD_PTR r10, r0
 	{
 	 BEQZ r10, .Lsigreturn
 	 addi r10, r10, -1  /* Confirm that it has value "1".  */
@@ -52,13 +52,13 @@
 	 ADDI_PTR r11, sp, -(2 * REGSIZE)
 	 move r10, sp
 	}
+	ADDI_PTR sp, sp, -(3 * REGSIZE)
+	cfi_def_cfa_offset (3 * REGSIZE)
 	cfi_offset (lr, 0)
 	{
 	 ST r11, r10
-	 ADDI_PTR r10, sp, -REGSIZE
-	 ADDI_PTR sp, sp, -(3 * REGSIZE)
-	}
-	cfi_def_cfa_offset (3 * REGSIZE)
+	 ADDI_PTR r10, sp, (2 * REGSIZE)
+	}
 	{
 	 ST r10, r0
 	 ADDLI_PTR r1, r0, UC_SIGMASK_OFFSET
@@ -73,13 +73,13 @@
 	 moveli TREG_SYSCALL_NR_NAME, __NR_rt_sigprocmask
 	}
 	swint1
-	{
+	ADDI_PTR r11, sp, 2 * REGSIZE  /* Restore uc_context to r11. */
+	{
+	 LD r11, r11
 	 ADDI_PTR sp, sp, 3 * REGSIZE
-	 ADDI_PTR r11, sp, 2 * REGSIZE  /* Restore uc_context to r11. */
 	}
 	cfi_def_cfa_offset (0)
 	LD lr, sp
-	LD r11, r11
 	{
 	 ADDI_PTR r10, r11, UC_REG(0)
 	 BNEZ r1, .Lsyscall_error

Modified: fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/swapcontext.S Fri Jun 29 00:02:51 2012
@@ -32,17 +32,17 @@
 	 ADDI_PTR r11, sp, -(3 * REGSIZE)
 	 move r10, sp
 	}
+	ADDI_PTR sp, sp, -(4 * REGSIZE)
+	cfi_def_cfa_offset (4 * REGSIZE)
 	cfi_offset (lr, 0)
 	{
 	 ST r11, r10
-	 ADDI_PTR r10, sp, -(2 * REGSIZE)
+	 ADDI_PTR r10, sp, (2 * REGSIZE)
 	}
 	{
 	 ST r10, r0
-	 ADDI_PTR r10, sp, -REGSIZE
-	 ADDI_PTR sp, sp, -(4 * REGSIZE)
+	 ADDI_PTR r10, sp, (3 * REGSIZE)
 	}
-	cfi_def_cfa_offset (4 * REGSIZE)
 	ST r10, r1
 
 	/* Save the current context.  */
@@ -81,6 +81,9 @@
 	}
 
 .Lerror:
+	ADDI_PTR sp, sp, 4 * REGSIZE
+	cfi_def_cfa_offset (0)
+	LD lr, sp
 	jrp lr
 END (__swapcontext)
 

Modified: fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/sys/dataplane.h
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/sys/dataplane.h (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/sys/dataplane.h Fri Jun 29 00:02:51 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
 
@@ -20,6 +20,8 @@
 #ifndef _SYS_DATAPLANE_H
 #define _SYS_DATAPLANE_H 1
 
+#include <features.h>
+
 /* Get the kernel definition for the flag bits.  */
 #include <asm/dataplane.h>
 

Modified: fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/ucontext_i.h
==============================================================================
--- fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/ucontext_i.h (original)
+++ fsf/glibc-2_15-branch/ports/sysdeps/unix/sysv/linux/tile/ucontext_i.h Fri Jun 29 00:02:51 2012
@@ -26,7 +26,8 @@
 #define UC_STACK_SP_OFFSET (UC_LINK_OFFSET + __SIZEOF_POINTER__)
 #define UC_STACK_FLAGS_OFFSET (UC_STACK_SP_OFFSET + __SIZEOF_POINTER__)
 #define UC_STACK_SIZE_OFFSET (UC_STACK_FLAGS_OFFSET + __SIZEOF_POINTER__)
-#define UC_STACK_MCONTEXT_OFFSET (UC_STACK_SIZE_OFFSET + __SIZEOF_POINTER__)
+#define UC_STACK_MCONTEXT_OFFSET \
+  ((UC_STACK_SIZE_OFFSET + __SIZEOF_POINTER__ + REGSIZE - 1) & -REGSIZE)
 #define UC_REG(i) (UC_STACK_MCONTEXT_OFFSET + ((i) * REGSIZE))
 #define UC_NREGS 64
 #define UC_SIGMASK_OFFSET UC_REG(UC_NREGS)

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits