You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
selftests/rseq: check if libc rseq support is registered
[ Upstream commit d1a997ba4c ]
When checking for libc rseq support in the library constructor, don't
only depend on the symbols presence, check that the registration was
completed.
This targets a scenario where the libc has rseq support but it is not
wired for the current architecture in 'bits/rseq.h', we want to fallback
to our internal registration mechanism.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/r/20220614154830.1367382-4-mjeanson@efficios.com
Stable-dep-of: 3bcbc20942db ("selftests/rseq: Play nice with binaries statically linked against glibc 2.35+")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fbb6657037
commit
c08de20e70
@@ -111,7 +111,8 @@ void rseq_init(void)
|
||||
libc_rseq_offset_p = dlsym(RTLD_NEXT, "__rseq_offset");
|
||||
libc_rseq_size_p = dlsym(RTLD_NEXT, "__rseq_size");
|
||||
libc_rseq_flags_p = dlsym(RTLD_NEXT, "__rseq_flags");
|
||||
if (libc_rseq_size_p && libc_rseq_offset_p && libc_rseq_flags_p) {
|
||||
if (libc_rseq_size_p && libc_rseq_offset_p && libc_rseq_flags_p &&
|
||||
*libc_rseq_size_p != 0) {
|
||||
/* rseq registration owned by glibc */
|
||||
rseq_offset = *libc_rseq_offset_p;
|
||||
rseq_size = *libc_rseq_size_p;
|
||||
|
||||
Reference in New Issue
Block a user