glibc/sysdeps
H.J. Lu 5e1548a6d9 Call _dl_open_check after relocation [BZ #24259]
This is a workaround for [BZ #20839] which doesn't remove the NODELETE
object when _dl_open_check throws an exception.  Move it after relocation
in dl_open_worker to avoid leaving the NODELETE object mapped without
relocation.

	[BZ #24259]
	* elf/dl-open.c (dl_open_worker): Call _dl_open_check after
	relocation.
	* sysdeps/x86/Makefile (tests): Add tst-cet-legacy-5a,
	tst-cet-legacy-5b, tst-cet-legacy-6a and tst-cet-legacy-6b.
	(modules-names): Add tst-cet-legacy-mod-5a, tst-cet-legacy-mod-5b,
	tst-cet-legacy-mod-5c, tst-cet-legacy-mod-6a, tst-cet-legacy-mod-6b
	and tst-cet-legacy-mod-6c.
	(CFLAGS-tst-cet-legacy-5a.c): New.
	(CFLAGS-tst-cet-legacy-5b.c): Likewise.
	(CFLAGS-tst-cet-legacy-mod-5a.c): Likewise.
	(CFLAGS-tst-cet-legacy-mod-5b.c): Likewise.
	(CFLAGS-tst-cet-legacy-mod-5c.c): Likewise.
	(CFLAGS-tst-cet-legacy-6a.c): Likewise.
	(CFLAGS-tst-cet-legacy-6b.c): Likewise.
	(CFLAGS-tst-cet-legacy-mod-6a.c): Likewise.
	(CFLAGS-tst-cet-legacy-mod-6b.c): Likewise.
	(CFLAGS-tst-cet-legacy-mod-6c.c): Likewise.
	($(objpfx)tst-cet-legacy-5a): Likewise.
	($(objpfx)tst-cet-legacy-5a.out): Likewise.
	($(objpfx)tst-cet-legacy-mod-5a.so): Likewise.
	($(objpfx)tst-cet-legacy-mod-5b.so): Likewise.
	($(objpfx)tst-cet-legacy-5b): Likewise.
	($(objpfx)tst-cet-legacy-5b.out): Likewise.
	(tst-cet-legacy-5b-ENV): Likewise.
	($(objpfx)tst-cet-legacy-6a): Likewise.
	($(objpfx)tst-cet-legacy-6a.out): Likewise.
	($(objpfx)tst-cet-legacy-mod-6a.so): Likewise.
	($(objpfx)tst-cet-legacy-mod-6b.so): Likewise.
	($(objpfx)tst-cet-legacy-6b): Likewise.
	($(objpfx)tst-cet-legacy-6b.out): Likewise.
	(tst-cet-legacy-6b-ENV): Likewise.
	* sysdeps/x86/tst-cet-legacy-5.c: New file.
	* sysdeps/x86/tst-cet-legacy-5a.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-5b.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-6.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-6a.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-6b.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-mod-5.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-mod-5a.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-mod-5b.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-mod-5c.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-mod-6.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-mod-6a.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-mod-6b.c: Likewise.
	* sysdeps/x86/tst-cet-legacy-mod-6c.c: Likewise.

(cherry picked from commit d0093c5cefb7f7a4143f3bb03743633823229cc6)
2019-10-31 16:53:28 -04:00
..
aarch64 aarch64: handle STO_AARCH64_VARIANT_PCS 2019-07-12 10:14:12 +01:00
alpha Update Alpha libm-test-ulps 2019-09-03 21:43:22 +02:00
arm arm: Use "nr" constraint for Systemtap probes [BZ #24164] 2019-02-05 13:49:03 +01:00
csky Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
generic posix: Fix large mmap64 offset for mips64n32 (BZ#24699) 2019-07-15 09:26:39 -03:00
gnu Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
hppa hppa: Update libm-tests-ulps 2019-08-18 11:38:26 +02:00
htl hurd: advertise *_setpshared as not supported 2019-01-02 22:21:34 +01:00
hurd Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i386 i386: Remove bogus THREAD_ATOMIC_* macros 2019-01-03 18:38:15 -02:00
ia64 Fix a few typos in comments 2019-01-12 13:44:51 +00:00
ieee754 Fix a few typos in comments 2019-01-12 13:44:51 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
m68k Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mach hurd: Check at_flags passed to faccessat 2019-01-22 22:47:10 +01:00
microblaze Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mips Update MIPS libm-test-ulps. 2019-01-02 17:25:33 +00:00
nios2 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
nptl nptl: Avoid fork handler lock for async-signal-safe fork [BZ #24161] 2019-02-08 12:54:41 +01:00
posix CVE-2016-10739: getaddrinfo: Fully parse IPv4 address strings [BZ #20018] 2019-01-21 21:26:03 +01:00
powerpc Fix output of LD_SHOW_AUXV=1. 2019-03-13 10:51:23 +01:00
pthread Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
riscv RISC-V: Update nofpu ULPs 2019-01-24 13:55:05 -05:00
s390 S390: Mark vx and vxe as important hwcap. 2019-03-21 09:27:37 +01:00
sh Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sparc Fix output of LD_SHOW_AUXV=1. 2019-03-13 10:51:23 +01:00
unix Fix RISC-V vfork build with Linux 5.3 kernel headers. 2019-09-20 21:30:04 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
x86 Call _dl_open_check after relocation [BZ #24259] 2019-10-31 16:53:28 -04:00
x86_64 x86-64 memcmp: Use unsigned Jcc instructions on size [BZ #24155] 2019-02-04 12:27:04 -08:00