From d1fc817ea459ca28979948fbb23ff58a6f3f4a8c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 13 Jan 2004 15:47:32 +0000 Subject: Update. 2004-01-13 Ulrich Drepper * sysdeps/unix/sysv/linux/dl-execstack.c: Change interface. Add challenge for caller. * sysdeps/generic/ldsodefs.h: Change declaration and type of hook member in rtld_global appropriately. * elf/dl-support.c: Likewise. * elf/dl-load.c (_dl_map_object_from_fd): Take additional paramter. Pass it on to the changed function. (_dl_map_object): Pass new parameter to _dl_map_object_from_fd. --- nptl/ChangeLog | 18 ++++++++++++------ nptl/allocatestack.c | 12 +++++++++--- nptl/pthreadP.h | 5 +++-- 3 files changed, 24 insertions(+), 11 deletions(-) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index d80d531..28588b8 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,12 +1,18 @@ +2004-01-13 Ulrich Drepper + + * allocatestack.c (__make_stacks_executable): Change interface. + Check parameters. Pass parameter on to libc counterpart. + * pthreadP.h: Change declaration. + 2004-01-13 Richard Henderson - * sysdeps/alpha/Makefile: New file. - * sysdeps/alpha/tcb-offsets.sym: New file. - * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): - Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version. + * sysdeps/alpha/Makefile: New file. + * sysdeps/alpha/tcb-offsets.sym: New file. + * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P): + Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version. - * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based - on powerpc version. + * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based + on powerpc version. 2004-01-08 Jakub Jelinek diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 343dd68..02de7f0 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -661,10 +661,16 @@ __deallocate_stack (struct pthread *pd) } +extern void *__libc_stack_end; + int internal_function -__make_stacks_executable (void) +__make_stacks_executable (void **stack_endp) { + /* Challenge the caller. */ + if (*stack_endp != __libc_stack_end) + return EPERM; + #ifdef NEED_SEPARATE_REGISTER_STACK const size_t pagemask = ~(__getpagesize () - 1); #endif @@ -702,7 +708,7 @@ __make_stacks_executable (void) lll_unlock (stack_cache_lock); if (err == 0) - err = _dl_make_stack_executable (); + err = _dl_make_stack_executable (stack_endp); return err; } diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 1bfcf35..b051e3b 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -216,7 +216,8 @@ extern void __deallocate_stack (struct pthread *pd) extern void __reclaim_stacks (void) attribute_hidden; /* Make all threads's stacks executable. */ -int __make_stacks_executable (void) internal_function attribute_hidden; +extern int __make_stacks_executable (void **stack_endp) + internal_function attribute_hidden; /* longjmp handling. */ extern void __pthread_cleanup_upto (__jmp_buf target, char *targetframe); -- cgit v1.1