This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add UNSUPPORTED check in elf/tst-pldd.


* Stefan Liebler:

>  static void
>  target_process (void *arg)
>  {
> +  if (ptrace_scope == 1)
> +    {
> +      /* YAMA is configured to "restricted ptrace".
> +	 Disable the restriction for this subprocess.  */
> +      support_ptrace_process_set_ptracer_any ();
> +    }
> +
>    pause ();
>  }

I think this has a race condition if pldd attaches to the process before
the support_ptrace_process_set_ptracer_any call.  I have no idea how
hard it is in practice to hit this race.  It should be possible to use a
process-shared barrier or some other form of synchronization to avoid
this issue.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]