Fix default stack guard.
Tom de Vries
Tom_deVries@mentor.com
Wed Feb 15 16:54:00 GMT 2012
Hi,
the following tests fail with glibc trunk for i686-pc-linux-gnu running on an
ubuntu 2.6.24-28-server kernel:
- elf/tst-stackguard1
- elf/tst-stackguard1-static
- nptl/tst-stackguard1
- nptl/tst-stackguard1-static
The tests fail because the default stack guard in the testcases is not the same
as the one in _dl_setup_stack_chk_guard in sysdeps/unix/sysv/linux/dl-osinfo.h.
The reasons for which we choose (in _dl_setup_stack_chk_guard) to use the
default stack guard are:
- __ASSUME_AT_RANDOM is not defined. This is because we compile with
--enable-kernel=2.6.9. AT_RANDOM is supported from 2.6.29 onwards.
- _dl_random is NULL. This is because the ubuntu 2.6.24-28-server kernel
doesn't support AT_RANDOM, so it doesn't pass it in the auxiliary vector, so
_dl_random is not set in _dl_sysdep_start.
- ENABLE_STACKGUARD_RANDOMIZE is not defined, because
--enable-stackguard-randomization is not used.
The patch fixes the failing test-cases by restoring the default stack guard to
what it was before the commit 'Make stack canary value harder to read through
read overflow' (15a856b1090669df0aec536edbdf240e71a470ca).
Tested on i686-pc-linux-gnu/2.6.24-28-server system.
Thanks,
- Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-stackguard1.2.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120215/0a3d071c/attachment.bin>
More information about the Libc-alpha
mailing list