summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-20 07:21:59 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-20 07:21:59 +0000
commit00c2b3b91dc5f11924006ed4fb69d9d7442749b7 (patch)
treec367b0b7c66ba48cde11d2bd7bfe9c63e7b3ad49 /nptl
parentfc3480d3eea6380ea00d150d87830dc3cb86ede8 (diff)
downloadglibc-00c2b3b91dc5f11924006ed4fb69d9d7442749b7.tar.gz
glibc-00c2b3b91dc5f11924006ed4fb69d9d7442749b7.tar.xz
glibc-00c2b3b91dc5f11924006ed4fb69d9d7442749b7.zip
[BZ #1978]
2005-12-16  Thorsten Kukuk  <kukuk@suse.de>
	[BZ #1978]
	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
	Map more filesystem types to a string.
	* sysdeps/unix/sysv/linux/linux_fsinfo.h: Add SYSFS_MAGIC.

2005-12-19  Jakub Jelinek  <jakub@redhat.com>

	* locale/Makefile (programs/%-kw.h): Run $(GPERF) inside of the
	programs subdirectory.

	* sysdeps/powerpc/powerpc32/__longjmp-common.S (__longjmp): Use
	PTR_DEMANGLE for PC if defined.
	* sysdeps/powerpc/powerpc64/__longjmp-common.S (__longjmp):
	Likewise.
	* sysdeps/unix/sysv/linux/ia64/__longjmp.S (__longjmp): Likewise.
	* sysdeps/s390/s390-32/__longjmp.c (__longjmp): Xor %r14 with
	THREAD_GET_POINTER_GUARD () if PTR_DEMANGLE is defined.
	* sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise.
	* sysdeps/powerpc/powerpc32/setjmp-common.S (__sigsetjmp): Use
	PTR_MANGLE for PC if defined.
	* sysdeps/powerpc/powerpc64/setjmp-common.S (__sigsetjmp): Likewise.
	* sysdeps/s390/s390-32/setjmp.S (__sigsetjmp): Likewise.
	Avoid call to __sigjmp_save if IS_IN_rtld.
	* sysdeps/s390/s390-32/elf/setjmp.S (__sigsetjmp): Likewise.
	* sysdeps/s390/s390-64/setjmp.S (__sigsetjmp): Likewise.
	* sysdeps/s390/s390-64/elf/setjmp.S (__sigsetjmp): Likewise.
	* sysdeps/unix/sysv/linux/ia64/setjmp.S (__sigsetjmp): Likewise.
	* sysdeps/unix/sysv/linux/ia64/sysdep.h (PTR_MANGLE, PTR_DEMANGLE):
	Define.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Include tls.h.
	(PTR_MANGLE, PTR_DEMANGLE): Define.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Include tls.h
	(PTR_MANGLE, PTR_DEMANGLE): Define.
	* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Include tls.h.
	(PTR_MANGLE, PTR_DEMANGLE): Define.
	(SYSCALL_ERROR_HANDLER): Add missing semicolons.
	* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Include tls.h.
	(PTR_MANGLE, PTR_DEMANGLE): Define.
	* sysdeps/unix/sysv/linux/s390/s390-64/socket.S (__socket): Add
	SYSCALL_ERROR_HANDLER.

2005-12-19  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Handle NO_WEAK_ALIAS.
	* sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Likewise.
	Patch by Clint Adams.

2005-12-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>

	* sysdeps/unix/sysv/linux/s390/sys/user.h: Copy struct user and
	dependent definitions from the kernel header to sys/user.h and
	remove the #include of asm/user.h.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog16
-rw-r--r--nptl/sysdeps/ia64/tls.h22
-rw-r--r--nptl/sysdeps/powerpc/tcb-offsets.sym1
-rw-r--r--nptl/sysdeps/powerpc/tls.h15
-rw-r--r--nptl/sysdeps/s390/tcb-offsets.sym1
-rw-r--r--nptl/sysdeps/s390/tls.h7
-rw-r--r--nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S5
7 files changed, 59 insertions, 8 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 7a35696b38..77ce922963 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,19 @@
+2005-12-19  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
+	rather than one.
+	(THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
+	THREAD_COPY_POINTER_GUARD): Define.
+	* sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
+	* sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
+	(THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
+	THREAD_COPY_POINTER_GUARD): Define.
+	* sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
+	* sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
+	THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
+	* sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
+	Use PTR_DEMANGLE for B0 if defined.
+
 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
 
 	* pthread_create.c (__pthread_create_2_1): Use
diff --git a/nptl/sysdeps/ia64/tls.h b/nptl/sysdeps/ia64/tls.h
index e3ad0681d6..eb773aa97d 100644
--- a/nptl/sysdeps/ia64/tls.h
+++ b/nptl/sysdeps/ia64/tls.h
@@ -81,13 +81,14 @@ register struct pthread *__thread_self __asm__("r13");
 # define TLS_TCB_SIZE sizeof (tcbhead_t)
 
 /* This is the size we need before TCB.
-   If there is not any room for uintptr_t stack_guard in struct pthread's
-   final padding, we need to put struct pthread 16 byte slower.  */
+   If there is not any room for uintptr_t stack_guard and
+   uintptr_t pointer_guard in struct pthread's final padding,
+   we need to put struct pthread 16 byte slower.  */
 # define TLS_PRE_TCB_SIZE \
-  (sizeof (struct pthread)					\
-   + (PTHREAD_STRUCT_END_PADDING < sizeof (uintptr_t)		\
-      ? ((sizeof (uintptr_t) + __alignof__ (struct pthread) - 1)\
-	 & ~(__alignof__ (struct pthread) - 1))			\
+  (sizeof (struct pthread)						\
+   + (PTHREAD_STRUCT_END_PADDING < 2 * sizeof (uintptr_t)		\
+      ? ((2 * sizeof (uintptr_t) + __alignof__ (struct pthread) - 1)	\
+	 & ~(__alignof__ (struct pthread) - 1))				\
       : 0))
 
 /* Alignment requirements for the TCB.  */
@@ -156,6 +157,15 @@ register struct pthread *__thread_self __asm__("r13");
   (((uintptr_t *) ((char *) (descr) + TLS_PRE_TCB_SIZE))[-1] \
    = ((uintptr_t *) __thread_self)[-1])
 
+/* Set the pointer guard field in TCB head.  */
+#define THREAD_GET_POINTER_GUARD() \
+  (((uintptr_t *) __thread_self)[-2])
+#define THREAD_SET_POINTER_GUARD(value) \
+  (((uintptr_t *) __thread_self)[-2] = (value))
+#define THREAD_COPY_POINTER_GUARD(descr) \
+  (((uintptr_t *) ((char *) (descr) + TLS_PRE_TCB_SIZE))[-2] \
+   = THREAD_GET_POINTER_GUARD ())
+
 #endif /* __ASSEMBLER__ */
 
 #endif	/* tls.h */
diff --git a/nptl/sysdeps/powerpc/tcb-offsets.sym b/nptl/sysdeps/powerpc/tcb-offsets.sym
index 3962edbd54..4a8671e802 100644
--- a/nptl/sysdeps/powerpc/tcb-offsets.sym
+++ b/nptl/sysdeps/powerpc/tcb-offsets.sym
@@ -14,3 +14,4 @@ MULTIPLE_THREADS_OFFSET		thread_offsetof (header.multiple_threads)
 #endif
 PID				thread_offsetof (pid)
 TID				thread_offsetof (tid)
+POINTER_GUARD			(offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
diff --git a/nptl/sysdeps/powerpc/tls.h b/nptl/sysdeps/powerpc/tls.h
index b2322b09bd..976a271362 100644
--- a/nptl/sysdeps/powerpc/tls.h
+++ b/nptl/sysdeps/powerpc/tls.h
@@ -66,9 +66,11 @@ typedef union dtv
 # include <nptl/descr.h>
 
 /* The stack_guard is accessed directly by GCC -fstack-protector code,
-   so it is a part of public ABI.  The dtv field is private.  */
+   so it is a part of public ABI.  The dtv and pointer_guard fields
+   are private.  */
 typedef struct
 {
+  uintptr_t pointer_guard;
   uintptr_t stack_guard;
   dtv_t *dtv;
 } tcbhead_t;
@@ -166,6 +168,17 @@ register void *__thread_register __asm__ ("r13");
      = ((tcbhead_t *) ((char *) __thread_register			      \
 		       - TLS_TCB_OFFSET))[-1].stack_guard)
 
+/* Set the stack guard field in TCB head.  */
+# define THREAD_GET_POINTER_GUARD() \
+    (((tcbhead_t *) ((char *) __thread_register				      \
+		     - TLS_TCB_OFFSET))[-1].pointer_guard)
+# define THREAD_SET_POINTER_GUARD(value) \
+    (THREAD_GET_POINTER_GUARD () = (value))
+# define THREAD_COPY_POINTER_GUARD(descr) \
+    (((tcbhead_t *) ((char *) (descr)					      \
+		     + TLS_PRE_TCB_SIZE))[-1].pointer_guard		      \
+     = THREAD_GET_POINTER_GUARD())
+
 /* l_tls_offset == 0 is perfectly valid on PPC, so we have to use some
    different value to mean unset l_tls_offset.  */
 # define NO_TLS_OFFSET		-1
diff --git a/nptl/sysdeps/s390/tcb-offsets.sym b/nptl/sysdeps/s390/tcb-offsets.sym
index 237f975b25..9cfae211e0 100644
--- a/nptl/sysdeps/s390/tcb-offsets.sym
+++ b/nptl/sysdeps/s390/tcb-offsets.sym
@@ -2,5 +2,6 @@
 #include <tls.h>
 
 MULTIPLE_THREADS_OFFSET		offsetof (tcbhead_t, multiple_threads)
+STACK_GUARD			offsetof (tcbhead_t, stack_guard)
 PID				offsetof (struct pthread, pid)
 TID				offsetof (struct pthread, tid)
diff --git a/nptl/sysdeps/s390/tls.h b/nptl/sysdeps/s390/tls.h
index f90b35b1e5..89ff095d52 100644
--- a/nptl/sysdeps/s390/tls.h
+++ b/nptl/sysdeps/s390/tls.h
@@ -164,6 +164,13 @@ typedef struct
   ((descr)->header.stack_guard						      \
    = THREAD_GETMEM (THREAD_SELF, header.stack_guard))
 
+/* s390 doesn't have HP_TIMING_*, so for the time being
+   use stack_guard as pointer_guard.  */
+#define THREAD_GET_POINTER_GUARD() \
+  THREAD_GETMEM (THREAD_SELF, header.stack_guard)
+#define THREAD_SET_POINTER_GUARD(value)
+#define THREAD_COPY_POINTER_GUARD(descr)
+
 #endif /* __ASSEMBLER__ */
 
 #endif	/* tls.h */
diff --git a/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S b/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S
index 1ceb210c2f..a1120d4d72 100644
--- a/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S
+++ b/nptl/sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -102,6 +102,9 @@ LEAF(__ia64_longjmp)
 	;;
 	ld8.nta r20=[r2],16		// b4
 	ld8.nta r21=[r3],16		// b5
+#ifdef PTR_DEMANGLE
+	PTR_DEMANGLE (r16, r24)
+#endif
 	;;
 	ld8.nta r11=[r2],16		// ar.pfs
 	ld8.nta r22=[r3],56		// ar.lc