Do not stack-protect ifunc resolvers [BZ #7065]
authorNick Alcock <nick.alcock@oracle.com>
Mon, 26 Dec 2016 09:08:41 +0000 (10:08 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 26 Dec 2016 09:08:41 +0000 (10:08 +0100)
commitde6591238b478bc86b8cf5af01a484114e399213
tree2717c115fbc7518fcbe9348239ff536eb914d267
parent003a27e8195470f470f4d9384ca70d4e9fc8bd1b
Do not stack-protect ifunc resolvers [BZ #7065]

When dynamically linking, ifunc resolvers are called before TLS is
initialized, so they cannot be safely stack-protected.

We avoid disabling stack-protection on large numbers of files by
using __attribute__ ((__optimize__ ("-fno-stack-protector")))
to turn it off just for the resolvers themselves.  (We provide
the attribute even when statically linking, because we will later
use it elsewhere too.)
16 files changed:
ChangeLog
config.h.in
configure
configure.ac
elf/ifuncdep2.c
elf/ifuncmain6pie.c
elf/ifuncmain7.c
elf/ifuncmod1.c
elf/ifuncmod5.c
include/libc-symbols.h
sysdeps/generic/ifunc-sel.h
sysdeps/nacl/nacl_interface_query.c
sysdeps/powerpc/ifunc-sel.h
sysdeps/unix/make-syscalls.sh
sysdeps/unix/sysv/linux/x86_64/x32/getcpu.c
sysdeps/x86_64/ifuncmod8.c