From: Alexey Izbyshev <izbyshev@ispras.ru>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: __synccall: deadlock and reliance on racy /proc/self/task
Date: Mon, 11 Feb 2019 00:04:06 +0300 [thread overview]
Message-ID: <8e5fe0aa993c35c4c92605d455096f66@ispras.ru> (raw)
In-Reply-To: <20190208183357.GX23599@brightrain.aerifal.cx>
On 2019-02-08 21:33, Rich Felker wrote:
> On Fri, Feb 08, 2019 at 09:14:48PM +0300, Alexey Izbyshev wrote:
>> ...I was talking about a barrier
>> between loads of head and cp->tid/cp->next:
>>
>> for (cp = head; cp && cp->tid != tid; cp=cp->next);
>>
>> In my understanding, we need consume semantics to observe correct
>> values of tid and next after we load head. If we don't take Alpha
>> into account,
>> it probably works without barriers on most current architectures,
>> however, I don't know what policy musl has for such cases.
>
> I don't see how that's the case. The only stores to members of ch are
> made before the a_cas_p (which has seq_cst order, but just release
> would suffice) storing &ch into head and making it visible.
>
This is probably off-topic because we know that the issue is not related
to barriers, but I was referring to what is described in DATA DEPENDENCY
BARRIERS section at
<https://www.kernel.org/doc/Documentation/memory-barriers.txt>. Since
the last time I looked at it, kernel devs marked it "historical" and
added the following note:
> As of v4.15 of the Linux kernel, an smp_read_barrier_depends() was
> added to READ_ONCE(), which means that about the only people who
> need to pay attention to this section are those working on DEC Alpha
> architecture-specific code and those working on READ_ONCE() itself.
> For those who need it, and for those who are interested in the history,
> here is the story of data-dependency barriers.
So musl probably has no need to care.
Alexey
next prev parent reply other threads:[~2019-02-10 21:04 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 21:40 Alexey Izbyshev
2019-02-07 18:36 ` Rich Felker
2019-02-08 18:14 ` Alexey Izbyshev
2019-02-08 18:33 ` Rich Felker
2019-02-09 16:21 ` Szabolcs Nagy
2019-02-09 18:33 ` Alexey Izbyshev
2019-02-09 21:40 ` Szabolcs Nagy
2019-02-09 22:29 ` Alexey Izbyshev
2019-02-10 0:52 ` Rich Felker
2019-02-10 1:16 ` Szabolcs Nagy
2019-02-10 1:20 ` Rich Felker
2019-02-10 4:01 ` Rich Felker
2019-02-10 12:32 ` Szabolcs Nagy
2019-02-10 15:05 ` Rich Felker
2019-02-10 12:15 ` Alexey Izbyshev
2019-02-10 14:57 ` Rich Felker
2019-02-10 21:04 ` Alexey Izbyshev [this message]
2019-02-12 18:48 ` Rich Felker
2019-02-21 0:41 ` Rich Felker
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=8e5fe0aa993c35c4c92605d455096f66@ispras.ru \
--to=izbyshev@ispras.ru \
--cc=dalias@libc.org \
--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).