This is the mail archive of the libc-alpha@sources.redhat.com 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]

Re: ld.so setuid bug?


On Sun, Sep 05, 2004 at 04:25:52AM -0700, Richard Henderson wrote:
> 	* sysdeps/generic/check_fds.c (check_one_fd): Use fcntl_not_cancel.

Bah.  Except this doesn't compile on x86.  Which suggests I
missed indention level in an Alpha header...


r~


2005-09-05  Richard Henderson  <rth@redhat.com>

	* sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
	Move definition inside libpthread, libc, librt check.  Provide
	definition for rtld.

Index: nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
===================================================================
RCS file: /cvs/glibc/libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h,v
retrieving revision 1.3
diff -c -p -d -r1.3 sysdep-cancel.h
*** nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	13 Mar 2004 05:29:24 -0000	1.3
--- nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	5 Sep 2004 11:42:36 -0000
*************** __LABEL($syscall_error)						\
*** 137,164 ****
  #  define CDISABLE	jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp)
  # endif
  
! #endif
! 
! #if defined IS_IN_libpthread || !defined NOT_IN_libc
! # ifndef __ASSEMBLER__
  extern int __local_multiple_threads attribute_hidden;
! #  define SINGLE_THREAD_P \
  	__builtin_expect (__local_multiple_threads == 0, 1)
! # elif defined(PIC)
! #  define SINGLE_THREAD_P(reg)  ldl reg, __local_multiple_threads(gp) !gprel
! # else
! #  define SINGLE_THREAD_P(reg)					\
  	ldah	reg, __local_multiple_threads(gp) !gprelhigh;	\
  	ldl	reg, __local_multiple_threads(reg) !gprellow
! # endif
! #else
! # ifndef __ASSEMBLER__
! #  define SINGLE_THREAD_P \
  	__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
  				   header.multiple_threads) == 0, 1)
! # else
! #  define SINGLE_THREAD_P(reg)					\
  	call_pal PAL_rduniq;					\
  	ldl reg, MULTIPLE_THREADS_OFFSET($0)
  # endif
  #endif
--- 137,169 ----
  #  define CDISABLE	jsr ra, __local_disable_asynccancel; ldgp ra, 0(gp)
  # endif
  
! # if defined IS_IN_libpthread || !defined NOT_IN_libc
! #  ifndef __ASSEMBLER__
  extern int __local_multiple_threads attribute_hidden;
! #   define SINGLE_THREAD_P \
  	__builtin_expect (__local_multiple_threads == 0, 1)
! #  elif defined(PIC)
! #   define SINGLE_THREAD_P(reg)  ldl reg, __local_multiple_threads(gp) !gprel
! #  else
! #   define SINGLE_THREAD_P(reg)					\
  	ldah	reg, __local_multiple_threads(gp) !gprelhigh;	\
  	ldl	reg, __local_multiple_threads(reg) !gprellow
! #  endif
! # else
! #  ifndef __ASSEMBLER__
! #   define SINGLE_THREAD_P \
  	__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
  				   header.multiple_threads) == 0, 1)
! #  else
! #   define SINGLE_THREAD_P(reg)					\
  	call_pal PAL_rduniq;					\
  	ldl reg, MULTIPLE_THREADS_OFFSET($0)
+ #  endif
  # endif
+ 
+ #else
+ 
+ # define SINGLE_THREAD_P (1)
+ # define NO_CANCELLATION 1
+ 
  #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]