All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Nadav Amit <nadav.amit@gmail.com>, linux-mm@kvack.org
Subject: Re: x86: possible store-tearing in native_set_pte?
Date: Mon, 16 May 2016 16:18:22 +0200	[thread overview]
Message-ID: <5739D6AE.6010501@suse.cz> (raw)
In-Reply-To: <C38292D5-A96B-41CA-B037-60D28326668A@gmail.com>

On 04/26/2016 02:40 AM, Nadav Amit wrote:
> Resending with fixed formatting (sorry for that):
>
> Can someone please explain why it is ok for native_set_pte to assign
> the PTE without WRITE_ONCE() ?

You should probably ask also x86 maintainers/list. IMHO you might have a 
point, but I may be missing something.

> Isn't it possible for a PTE write to be torn, and the PTE to be
> prefetched in between (or even used for translation by another core)?
>
> I did not encounter this case, but it seems to me possible according
> to the documentation:
>
> Intel SDM 4.10.2.3 "Detail of TLB Use": "The processor may cache
> translations required for prefetches and for accesses ... that would
> never actually occur in the executed code path."
>
> Documentation/memory-barriers.txt: "The compiler is within its rights
> to invent stores to a variable".
>
> Thanks,
> Nadav
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2016-05-16 14:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26  0:24 x86: possible store-tearing in native_set_pte? Nadav Amit
2016-04-26  0:40 ` Nadav Amit
2016-05-16 14:18   ` Vlastimil Babka [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=5739D6AE.6010501@suse.cz \
    --to=vbabka@suse.cz \
    --cc=linux-mm@kvack.org \
    --cc=nadav.amit@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.