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: Access through cast to volatile
Date: Sun, 17 May 2015 21:35:04 +0200	[thread overview]
Message-ID: <1431891304.4219.5.camel@inria.fr> (raw)
In-Reply-To: <alpine.LNX.2.11.1505172057400.22867@monopod.intra.ispras.ru>

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

Am Sonntag, den 17.05.2015, 21:21 +0300 schrieb Alexander Monakov:
> On Sun, 17 May 2015, Jens Gustedt wrote:
> > > > I only recently learned that even cast to volatile doesn't help in
> > > > cases where the original object to which p points is not declared
> > > > volatile. The C standard states that only volatile *declared* objects
> > > > are subject to the rules of volatile. Accessing through a volatile
> > > > pointer doesn't help.
> > > 
> > > I'm not so sure about that.
> > 
> > I am quite sure. We recently had a discussion on that in the
> > committee, and the outcome was basically what I was stating above.
> 
> Was the Linux kernel's use of volatile cast in its ACCESS_ONCE macro
> discussed?

yes

But the Linux kernel uses stronger properties than are given by the C
standard. It is in many parts built upon assumptions about gcc and its
extensions.

> (I realize it's offtopic, but I hope it's acceptable)

I don't think it is offtopic, we have to be sure what assumptions we
want to make.

Jens


-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: 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:[~2015-05-17 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-17 18:21 Alexander Monakov
2015-05-17 19:35 ` Jens Gustedt [this message]

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=1431891304.4219.5.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).