public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] nptl: rseq failure after registration on main thread is fatal
@ 2021-12-09 8:50 Florian Weimer
0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2021-12-09 8:50 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a41c8e92350e744a4bc639df5025153d05263e7f
commit a41c8e92350e744a4bc639df5025153d05263e7f
Author: Florian Weimer <fweimer@redhat.com>
Date: Thu Dec 9 09:49:32 2021 +0100
nptl: rseq failure after registration on main thread is fatal
This simplifies the application programming model.
Browser sandboxes have already been fixed:
Sandbox is incompatible with rseq registration
<https://bugzilla.mozilla.org/show_bug.cgi?id=1651701>
Allow rseq in the Linux sandboxes. r=gcp
<https://hg.mozilla.org/mozilla-central/rev/042425712eb1>
Sandbox needs to support rseq system call
<https://bugs.chromium.org/p/chromium/issues/detail?id=1104160>
Linux sandbox: Allow rseq(2)
<https://chromium.googlesource.com/chromium/src.git/+/230675d9ac8f1>
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Diff:
---
nptl/pthread_create.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 4608fd9068..c097fc54e6 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -370,7 +370,8 @@ start_thread (void *arg)
/* Register rseq TLS to the kernel. */
{
bool do_rseq = THREAD_GETMEM (pd, flags) & ATTR_FLAG_DO_RSEQ;
- rseq_register_current_thread (pd, do_rseq);
+ if (!rseq_register_current_thread (pd, do_rseq) && do_rseq)
+ __libc_fatal ("Fatal glibc error: rseq registration failed\n");
}
#ifndef __ASSUME_SET_ROBUST_LIST
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-09 8:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 8:50 [glibc] nptl: rseq failure after registration on main thread is fatal Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).