lkml.org 
[lkml]   [2020]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH glibc 5/9] glibc: Perform rseq(2) registration at C startup and thread creation (v17)
Date
* Mathieu Desnoyers via Libc-alpha:

> diff --git a/elf/libc_early_init.c b/elf/libc_early_init.c
> index 1ac66d895d..30466afea0 100644
> --- a/elf/libc_early_init.c
> +++ b/elf/libc_early_init.c
> @@ -18,10 +18,13 @@
>
> #include <ctype.h>
> #include <libc-early-init.h>
> +#include <rseq-internal.h>
>
> void
> __libc_early_init (void)
> {
> /* Initialize ctype data. */
> __ctype_init ();
> + /* Register rseq ABI to the kernel. */
> + (void) rseq_register_current_thread ();
> }

I think the registration must be restricted to the primary namespace.
Otherwise, LD_AUDIT will register the area to the secondary libc (in
the audit module), not the primary libc for the entire process.

I think the easiest way to implement this for now is a flag argument
for __libc_early_init (as the upstream __libc_multiple_libcs is not
entirely accurate). I will submit a patch.

\
 
 \ /
  Last update: 2020-04-27 14:00    [W:0.606 / U:4.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site