freebsd-src/libexec/rtld-elf
Mark Johnston e7951d0b04 rtld-elf: Avoid unnecessary lock_restart_for_upgrade() calls
In order to atomically upgrade the rtld bind lock, load_filtees() may
trigger a longjmp back to _rtld_bind() so that the binding can be done
with the write lock held.  However, the write lock is only needed when
filtee objects haven't already been loaded, so move the
lock_restart_for_upgrade() call to avoid unnecessary lock upgrades when
a filtee is defined.

Reviewed by:	kib
Tested by:	brooks
MFC after:	1 week
Sponsored by:	Innovate UK
2024-02-02 09:39:54 -05:00
..
aarch64 libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
amd64 rtld: introduce STATIC_TLS_EXTRA 2023-10-30 13:42:05 -04:00
arm libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
i386 rtld: introduce STATIC_TLS_EXTRA 2023-10-30 13:42:05 -04:00
powerpc rtld: introduce STATIC_TLS_EXTRA 2023-10-30 13:42:05 -04:00
powerpc64 rtld: introduce STATIC_TLS_EXTRA 2023-10-30 13:42:05 -04:00
riscv libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
rtld-libc libexec: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
tests rtld: add a test for RTLD_DEEPBIND 2023-11-30 19:26:09 -06:00
debug.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
debug.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
libmap.c Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
libmap.conf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libmap.h Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
Makefile Stop #defining FREEBSD_ELF 2023-12-12 15:30:00 -08:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
map_object.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
rtld.1 rtld: introduce STATIC_TLS_EXTRA 2023-10-30 13:42:05 -04:00
rtld.c rtld-elf: Avoid unnecessary lock_restart_for_upgrade() calls 2024-02-02 09:39:54 -05:00
rtld.h RTLD_DEEPBIND: make lookup not just symbolic, but walk all refobj' DAGs 2023-11-30 21:34:36 +02:00
rtld_lock.c Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
rtld_lock.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
rtld_malloc.c libexec: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
rtld_malloc.h rtld_malloc: add __crt_aligned_alloc_offset() 2023-08-21 17:16:42 +03:00
rtld_paths.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
rtld_printf.c Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
rtld_printf.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
rtld_tls.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
rtld_utrace.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
Symbol.map Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:23 -06:00
xmalloc.c rtld: switch from malloc_aligned() to __crt_aligned_alloc() 2023-08-21 17:16:42 +03:00