[Mesa-dev] [PATCH] util: Don't block SIGSYS for new threads

Marek Olšák maraeo at gmail.com
Mon Feb 25 21:43:02 UTC 2019


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Sat, Feb 23, 2019 at 2:05 AM Drew Davenport <ddavenport at chromium.org>
wrote:

> SIGSYS is needed for programs using seccomp for sandboxing.
> ---
>  src/util/u_thread.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/util/u_thread.h b/src/util/u_thread.h
> index 7538d7d634b2..a46c18d3db20 100644
> --- a/src/util/u_thread.h
> +++ b/src/util/u_thread.h
> @@ -44,7 +44,8 @@ static inline thrd_t u_thread_create(int (*routine)(void
> *), void *param)
>     int ret;
>
>     sigfillset(&new_set);
> -   pthread_sigmask(SIG_SETMASK, &new_set, &saved_set);
> +   sigdelset(&new_set, SIGSYS);
> +   pthread_sigmask(SIG_BLOCK, &new_set, &saved_set);
>     ret = thrd_create( &thread, routine, param );
>     pthread_sigmask(SIG_SETMASK, &saved_set, NULL);
>  #else
> --
> 2.20.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190225/e8dc2a5b/attachment-0001.html>


More information about the mesa-dev mailing list