From: "tip-bot2 for Michael Jeanson" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Michael Jeanson <mjeanson@efficios.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: sched/core] selftests/rseq: check if libc rseq support is registered
Date: Tue, 28 Jun 2022 07:16:45 -0000 [thread overview]
Message-ID: <165640060512.4207.5481017420790615805.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220614154830.1367382-4-mjeanson@efficios.com>
The following commit has been merged into the sched/core branch of tip:
Commit-ID: d1a997ba4c1bf65497d956aea90de42a6398f73a
Gitweb: https://git.kernel.org/tip/d1a997ba4c1bf65497d956aea90de42a6398f73a
Author: Michael Jeanson <mjeanson@efficios.com>
AuthorDate: Tue, 14 Jun 2022 11:48:30 -04:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 28 Jun 2022 09:08:28 +02:00
selftests/rseq: check if libc rseq support is registered
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
---
tools/testing/selftests/rseq/rseq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rseq/rseq.c b/tools/testing/selftests/rseq/rseq.c
index 986b945..4177f95 100644
--- a/tools/testing/selftests/rseq/rseq.c
+++ b/tools/testing/selftests/rseq/rseq.c
@@ -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;
next prev parent reply other threads:[~2022-06-28 7:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 15:48 [PATCH 0/3] selftests/rseq: fixes for RISC-V and Glibc 2.35 Michael Jeanson
2022-06-14 15:48 ` [PATCH 1/3] selftests/rseq: riscv: use rseq_get_abi() helper Michael Jeanson
2022-06-28 7:16 ` [tip: sched/core] " tip-bot2 for Michael Jeanson
2022-06-14 15:48 ` [PATCH 2/3] selftests/rseq: riscv: fix 'literal-suffix' warning Michael Jeanson
2022-06-28 7:16 ` [tip: sched/core] " tip-bot2 for Michael Jeanson
2022-06-14 15:48 ` [PATCH 3/3] selftests/rseq: check if libc rseq support is registered Michael Jeanson
2022-06-28 7:16 ` tip-bot2 for Michael Jeanson [this message]
2022-06-14 17:18 ` [PATCH 0/3] selftests/rseq: fixes for RISC-V and Glibc 2.35 Mathieu Desnoyers
2022-06-15 10:15 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=165640060512.4207.5481017420790615805.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mjeanson@efficios.com \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®