mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Jens Gustedt <jens.gustedt@inria.fr>
To: musl@lists.openwall.com
Subject: Re: Fixing multithreaded set*id() AS-safety
Date: Sat, 20 Dec 2014 09:48:16 +0100	[thread overview]
Message-ID: <1419065296.29611.1.camel@inria.fr> (raw)
In-Reply-To: <20141220033918.GA3273@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

Hello

Am Freitag, den 19.12.2014, 22:39 -0500 schrieb Rich Felker:
> Neither approach is really attractive. Strategy 1 feels less hackish
> and more elegant (it actually makes the pthread_create code more
> elegant than it is now by having fewer special cases), but the cost
> feels wasteful. Strategy 2 is ugly but has the ugliness isolated to
> synccall.c (the internals for set*id()) where it doesn't interact with
> other parts of the code in any significant way.
> 
> Any opinions on which way we should go? I'll probably hold off to do
> any of this until the next release cycle (or maybe even later), but I
> want to go ahead and start thinking about and discussing it.

I am much more in favor of version 2 or something equivalent, because
it keeps the complexity where it belongs. As our implementation is
currently, all changes to pthread_create would equally impact
thrd_create.

C threads are an interface that knows nothing about unistd.h and that
is mean to be simple and efficient. A program that builds entirely on
C11 features to be portable will never use any of these, so the impact
of weird border cases from POSIX should be minimal, wherever we can
avoid it.

Jens


-- 
:: INRIA Nancy Grand Est ::: AlGorille ::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2014-12-20  8:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-20  3:39 Rich Felker
2014-12-20  8:48 ` Jens Gustedt [this message]
2014-12-20 19:24   ` Rich Felker
2015-01-10  5:33 ` Rich Felker
2015-01-10 22:52   ` stephen Turner
2015-01-11  4:07     ` Rich Felker
2015-01-11 16:31       ` stephen Turner

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=1419065296.29611.1.camel@inria.fr \
    --to=jens.gustedt@inria.fr \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).