Ulrich Drepper [Sun, 26 Jun 2005 18:14:26 +0000 (18:14 +0000)]
* Versions.def (ld): Add GLIBC_2.4.
* configure.in: Add --enable-stackguard-randomization option.
(ENABLE_STACKGUARD_RANDOMIZE): New define.
* config.h.in (ENABLE_STACKGUARD_RANDOMIZE): Add.
* sysdeps/unix/sysv/linux/dl-osinfo.h: Include stdint.h.
(_dl_setup_stack_chk_guard): New inline function.
* sysdeps/generic/dl-osinfo.h: Include stdint.h.
(_dl_setup_stack_chk_guard): New inline function.
* elf/rtld.c (__stack_chk_guard): New variable.
(dl_main): Remove all traces of TLS_INIT_TP_EXPENSIVE.
Set __stack_chk_guard to _dl_setup_stack_chk_guard (),
use THREAD_SET_STACK_GUARD if defined.
* elf/Versions (ld): Export __stack_chk_guard@@GLIBC_2.4.
* sysdeps/generic/libc-start.c (__stack_chk_guard): New variable.
(__libc_start_main): Set __stack_chk_guard to
_dl_setup_stack_chk_guard (), use THREAD_SET_STACK_GUARD if defined.
* sysdeps/generic/libc-tls.c (__libc_setup_tls): Remove all
traces of TLS_INIT_TP_EXPENSIVE.
* debug/Versions (libc): Export __stack_chk_fail@@GLIBC_2.4.
* debug/Makefile (routines): Add stack_chk_fail.
(static-only-routines): Add stack_chk_fail_local.
* debug/stack_chk_fail_local.c: New file.
* debug/stack_chk_fail.c: New file.
* elf/Makefile: Add rules to build and run tst-stackguard1{,-static}
tests.
* elf/tst-stackguard1.c: New file.
* elf/tst-stackguard1-static.c: New file.
* elf/stackguard-macros.h: New file.
Ulrich Drepper [Sat, 18 Jun 2005 02:31:11 +0000 (02:31 +0000)]
* time/mktime.c: Always include <string.h> for prototype of
implicitly used memcpy.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c
(truncate64): Use __truncate, not truncate.
(__have_no_truncate64): Renamed from have_no_truncate64.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c
(__have_no_truncate64): Renamed from have_no_truncate64.
* hesiod/hesiod.c (hesiod_init): Initialize classes. Fail if no
valid classes were given or if both are equal.
(hesiod_resolve): Use ctx->classes instead of hardcoded C_IN
and C_HS order.
(parse_config_file): Handle classes keyword.
* hesiod/README.hesiod: Mention addition of the classes keyword.
Ulrich Drepper [Tue, 14 Jun 2005 22:52:30 +0000 (22:52 +0000)]
* configure.in: Add test for availability of libaudit.
* config.h.in: Define HAVE_LIBAUDIT.
* config.make.in: Define have-libaudit.
* nscd/Makefile: If libaudit is available, link nscd with it.
* nscd/selinux.c: If HAVE_LIBAUDIT is defined, log using libaudit.
Patch by Steve Grubb <sgrubb@redhat.com>.
Ulrich Drepper [Tue, 14 Jun 2005 00:56:49 +0000 (00:56 +0000)]
[BZ #966]
2005-06-13 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/clock_gettime.c (clock_gettime): Implement case
where HANDLED_REALTIME is not defined. [BZ #966]
2005-06-13 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/netlinkaccess.h (__netlink_sendreq,
__netlink_receive): Remove prototypes.
(__netlink_request): New prototype.
* sysdeps/unix/sysv/linux/ifaddrs.c: Include <alloca.h> and
<stdint.h>.
(__netlink_sendreq): Make static.
(__netlink_receive): Rename to...
(__netlink_request): ... this. Add type argument, call
__netlink_sendreq. If MSG_TRUNC is set after recvmsg, retry
with a bigger buffer. Don't record buffers that contain no
messages we are expecting.
(getifaddrs): Use __netlink_request instead of __netlink_sendreq
and __netlink_receive pairs. Formatting.
* sysdeps/unix/sysv/linux/if_index.c (if_nameindex_netlink): Use
__netlink_request instead of __netlink_sendreq and __netlink_receive
pair.
2005-06-13 Thorsten Kukuk <kukuk@suse.de>
* sysdeps/unix/sysv/linux/netinet/if_tr.h: Don't include kernel
headers, instead copy important structs/defines.
2005-06-13 Jakub Jelinek <jakub@redhat.com>
* elf/rtld.c (dl_main): Move DT_DEBUG setup before first
_dl_debug_state call.
Ulrich Drepper [Sun, 12 Jun 2005 16:29:51 +0000 (16:29 +0000)]
* elf/dl-error.c (_dl_signal_error): Store information about use of
real malloc in the catch object.
(_dl_catch_error): Forward information about malloc use to caller
in new parameter.
(_dl_out_of_memory): Make static.
* elf/dl-deps.c: Adjust callers of _dl_catch_error.
* elf/dl-libc.c: Likewise.
* elf/dl-open.c: Likewise.
* elf/rtld.c: Likewise.
Add new --audit option.
* sysdeps/generic/ldsodefs.h: Remove _dl_out_of_memory declaration.
(rtld_global_ro._dl_signal_error): Add new parameter.
* include/dlfcn.h (_dl_catch_error): Add new parameter.
* dlfcn/dlfcn.c (_dlerror_run): Pass additional parameter to
_dl_catch_error. Only free if the returned newly value says so.
Ulrich Drepper [Mon, 30 May 2005 20:25:42 +0000 (20:25 +0000)]
..
2005-05-30 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): If
GLRO(dl_osversion) has been already set to a value smaller than
_dl_discover_osversion (), don't overwrite it here.
* sysdeps/alpha/divl.S: Use it.
* sysdeps/alpha/divq.S: Likewise
* sysdeps/alpha/divqu.S: Likewise.
* sysdeps/alpha/reml.S: Likewise.
* sysdeps/alpha/remq.S: Likewise.
* sysdeps/alpha/remqu.S: Likewise.
* gmon/gmon.c: Add space in weak_alias use.
Ulrich Drepper [Mon, 23 May 2005 17:14:22 +0000 (17:14 +0000)]
* sunrpc/pm_getport.c (__get_socket): New function.
(pmap_getport): Use it to open a non-reserved socket to the portmapper
for TCP.
* include/rpc/pmap_clnt.h (__get_socket): Declare.
* sunrpc/pm_getmaps.c (pmap_getmaps): Use __get_socket to get an
non-reserved socket for the portmapper.
Ulrich Drepper [Sat, 21 May 2005 18:40:10 +0000 (18:40 +0000)]
[BZ #955]
2005-05-19 Richard Henderson <rth@redhat.com>
* sysdeps/unix/clock_gettime.c (clock_gettime): Fix typo around
CLOCK_REALTIME.
* sysdeps/ia64/bits/atomic.h (__arch_compare_and_exchange_bool_32_acq,
__arch_compare_and_exchange_bool_64_acq,
__arch_compare_and_exchange_val_32_acq,
__arch_compare_and_exchange_val_64_acq, atomic_exchange_and_add):
Use __sync builtin without _si or _di suffix.
2005-05-19 Jakub Jelinek <jakub@redhat.com>
[BZ #955]
* iconvdata/ibm939.c (BODY): Avoid segfaults with input characters
<UFFFF> and above.
2005-05-17 Andreas Schwab <schwab@suse.de>
* sysdeps/unix/sysv/linux/clock_getcpuclockid.c
(clock_getcpuclockid): Always return a defined value.
Ulrich Drepper [Wed, 4 May 2005 17:58:13 +0000 (17:58 +0000)]
* intl/Makefile (tst-gettext[45].out): Pass also $(run-program-prefix)
as argument to the scripts.
* intl/tst-gettext2.sh: Use mkdir -p instead of test -d + mkdir.
* intl/tst-gettext4.sh: Likewise. Use run_program_prefix argument.
* intl/tst-gettext5.sh: Likewise.
Ulrich Drepper [Tue, 3 May 2005 15:19:04 +0000 (15:19 +0000)]
* sysdeps/posix/posix_fallocate.c (posix_fallocate): If len == 0,
call ftruncate if offset is bigger than current size. Make sure
the file is offset + len bytes long if that is more than current size.
Don't overwrite previous content of the file.
* sysdeps/posix/posix_fallocate64.c (__posix_fallocate64_l64):
Likewise.
Ulrich Drepper [Tue, 3 May 2005 15:07:47 +0000 (15:07 +0000)]
(posix_fallocate): If len == 0, call ftruncate if offset is bigger than current size. Make sure the file is offset + len bytes long if that is more than current size. Don't overwrite previous content of the file.
* sysdeps/powerpc/powerpc64/memset.S (memset): Make ___memset local.
2005-03-07 Steven Munroe <sjmunroe@us.ibm.com>
[BZ #781]
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_TGKILL): Define for powerpc32/64 starting with 2.6.1.
(__ASSUME_UTIMES): Define for powerpc32/64 starting with 2.6.1.
(__ASSUME_FADVISE64_64_SYSCALL): Define for powerpc32 only starting
with 2.6.1.
(__ASSUME_WAITID_SYSCALL): Don't define for powerpc32/64.
Make it possible for multiple threads to use gettext() in different
locales.
* intl/dcigettext.c (HAVE_PER_THREAD_LOCALE): New macro.
(struct known_translation_t): If HAVE_PER_THREAD_LOCALE, add localename
field.
(transcmp): If HAVE_PER_THREAD_LOCALE, compare localename fields.
(DCIGETTEXT): If HAVE_PER_THREAD_LOCALE, fill the localename field in
search and newp.
* intl/tst-gettext4.c: New file.
* intl/tst-gettext4.sh: New file.
* intl/tst-gettext4-de.po: New file.
* intl/tst-gettext4-fr.po: New file.
* intl/tst-gettext5.c: New file.
* intl/tst-gettext5.sh: New file.
* intl/Makefile (distribute): Add tst-gettext4.sh, tst-gettext4-de.po,
tst-gettext4-fr.po, tst-gettext5.sh.
(multithread-test-srcs): New variable.
(test-srcs): Add its contents.
(tests): Depend on tst-gettext4.out, tst-gettext5.out.
(tst-gettext4.out, tst-gettext5.out): New rules.
(CFLAGS-tst-gettext4.c, CFLAGS-tst-gettext5.c): New variables.
Add rule for linking the multithread-test-srcs with the appropriate
thread-library.
Roland McGrath [Wed, 27 Apr 2005 08:03:47 +0000 (08:03 +0000)]
* rt/tst-cpuclock1.c: New file.
* rt/tst-cpuclock2.c: New file.
* rt/tst-cputimer1.c: New file.
* rt/tst-cputimer2.c: New file.
* rt/tst-cputimer3.c: New file.
* rt/Makefile (tests): Add them.
* sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h: New file.
* sysdeps/unix/sysv/linux/clock_getcpuclockid.c: New file.
* sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
(HAS_CPUCLOCK): New macro.
(clock_getcpuclockid): Function removed.
#include the new linux file to define it instead.
* sysdeps/unix/clock_gettime.c [HP_TIMING_AVAIL] (hp_timing_gettime):
New function, broken out of ...
(clock_gettime) [HP_TIMING_AVAIL]: ... here. Call it.
(realtime_gettime): New function, broken out of ...
(clock_gettime) [! HANDLED_REALTIME]: ... here. Call it.
(clock_gettime) [SYSDEP_GETTIME_CPU]: Use new macro in default case.
* sysdeps/unix/sysv/linux/clock_gettime.c (SYSCALL_GETTIME): New macro.
(SYSDEP_GETTIME_CPUTIME): New macro.
(SYSDEP_GETTIME): Use both.
[! __ASSUME_POSIX_TIMERS] (maybe_syscall_gettime): New function, broken
out of ...
(SYSDEP_GETTIME): ... here. Use it.
[__NR_clock_gettime] (HANDLED_CPUTIME): Define it.
(SYSDEP_GETTIME_CPUTIME): New macro. Handle CPU timers by trying
kernel support and falling back to hp-timing code.
* sysdeps/posix/clock_getres.c
[HP_TIMING_AVAIL] (hp_timing_getres): New function, broken out of ...
(clock_getres) [HP_TIMING_AVAIL]: ... here. Call it.
(realtime_getres): New function, broken out of ...
(clock_getres) [! HANDLED_REALTIME]: ... here. Call it.
(clock_getres) [SYSDEP_GETRES_CPU]: Use new macro in default case.
* sysdeps/unix/sysv/linux/clock_getres.c (SYSCALL_GETRES): New macro.
(SYSDEP_GETRES_CPUTIME): New macro.
(SYSDEP_GETRES): Use both.
[! __ASSUME_POSIX_TIMERS] (maybe_syscall_getres): New function, broken
out of ...
(SYSDEP_GETRES): ... here. Use it.
[__NR_clock_getres] (HANDLED_CPUTIME): Define it.
(SYSDEP_GETRES_CPUTIME): New macro. Handle CPU timers by trying
kernel support and falling back to hp-timing code.
* sysdeps/unix/sysv/linux/clock_nanosleep.c: Handle
CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
translating to the kernel clockid_t for our own process/thread clock.
Roland McGrath [Wed, 27 Apr 2005 08:01:41 +0000 (08:01 +0000)]
2005-04-27 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h: New file.
* sysdeps/unix/sysv/linux/clock_getcpuclockid.c: New file.
* sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c
(HAS_CPUCLOCK): New macro.
(clock_getcpuclockid): Function removed.
#include the new linux file to define it instead.
* sysdeps/unix/clock_gettime.c [HP_TIMING_AVAIL] (hp_timing_gettime):
New function, broken out of ...
(clock_gettime) [HP_TIMING_AVAIL]: ... here. Call it.
(realtime_gettime): New function, broken out of ...
(clock_gettime) [! HANDLED_REALTIME]: ... here. Call it.
(clock_gettime) [SYSDEP_GETTIME_CPU]: Use new macro in default case.
* sysdeps/unix/sysv/linux/clock_gettime.c (SYSCALL_GETTIME): New macro.
(SYSDEP_GETTIME_CPUTIME): New macro.
(SYSDEP_GETTIME): Use both.
[! __ASSUME_POSIX_TIMERS] (maybe_syscall_gettime): New function, broken
out of ...
(SYSDEP_GETTIME): ... here. Use it.
[__NR_clock_gettime] (HANDLED_CPUTIME): Define it.
(SYSDEP_GETTIME_CPUTIME): New macro. Handle CPU timers by trying
kernel support and falling back to hp-timing code.
* sysdeps/posix/clock_getres.c
[HP_TIMING_AVAIL] (hp_timing_getres): New function, broken out of ...
(clock_getres) [HP_TIMING_AVAIL]: ... here. Call it.
(realtime_getres): New function, broken out of ...
(clock_getres) [! HANDLED_REALTIME]: ... here. Call it.
(clock_getres) [SYSDEP_GETRES_CPU]: Use new macro in default case.
* sysdeps/unix/sysv/linux/clock_getres.c (SYSCALL_GETRES): New macro.
(SYSDEP_GETRES_CPUTIME): New macro.
(SYSDEP_GETRES): Use both.
[! __ASSUME_POSIX_TIMERS] (maybe_syscall_getres): New function, broken
out of ...
(SYSDEP_GETRES): ... here. Use it.
[__NR_clock_getres] (HANDLED_CPUTIME): Define it.
(SYSDEP_GETRES_CPUTIME): New macro. Handle CPU timers by trying
kernel support and falling back to hp-timing code.
* sysdeps/unix/sysv/linux/clock_nanosleep.c: Handle
CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
translating to the kernel clockid_t for our own process/thread clock.
* stdlib/test-canon.c: Make doesExist a directory and add more tests
for the new error case.
2004-06-02 Dmitry V. Levin <ldv@altlinux.org>
Ranjani Murthy <ranmur@gmail.com>
* stdlib/canonicalize.c (__realpath): Change realpath(3) to
return NULL and set errno to ENOTDIR for such pathnames like
"/path/to/existing-non-directory/".
(_dl_close): If called recursively, just remember GC needs to be rerun
and decrease l_direct_opencount. Avoid GC if l_direct_opencount
decreased to 1. Rerun GC at the end if any destructor unloaded some
additional libraries.
* elf/Makefile: Add rules to build and run unload6 test.
* elf/unload6.c: New test.
* elf/unload6mod1.c: New file.
* elf/unload6mod2.c: New file.
* elf/unload6mod3.c: New file.
* malloc/hooks.c (mem2chunk_check): Add magic_p argument, set *magic_p
if magic_p is not NULL.
(top_check): Invoke MALLOC_FAILURE_ACTION if MORECORE failed.
(malloc_check): Fail if sz == -1.
(free_check): Adjust mem2chunk_check caller.
(realloc_check): Likewise. Fail if bytes == -1. If bytes == 0 and
oldmem != NULL, call free_check and return NULL. If reallocating
and returning NULL, invert magic byte again to make oldmem valid
region for further checking.
(memalign_check): Fail if bytes == -1.
* malloc/Makefile: Add rules to build and run tst-mcheck.
* malloc/tst-mcheck.c: New test.