From: Rik van Riel <riel@surriel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
David Laight <david.laight.linux@gmail.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Andi Kleen <ak@linux.intel.com>,
Dan Williams <dan.j.williams@intel.com>,
linux-arch@vger.kernel.org, Kees Cook <keescook@chromium.org>,
kernel-hardening@lists.openwall.com,
"Paul E.McKenney" <paulmck@kernel.org>
Subject: Re: [PATCH 1/1] x86: In x86-64 barrier_nospec can always be lfence
Date: Sun, 09 Feb 2025 20:09:51 -0500 [thread overview]
Message-ID: <15734b32cecddde7905d3a97005a0c883383cc74.camel@surriel.com> (raw)
In-Reply-To: <CAHk-=wiSnNEWsvDariBQ4O-mz7Nc7LbkdKUQntREVCFWiMe9zw@mail.gmail.com>
On Sun, 2025-02-09 at 13:57 -0800, Linus Torvalds wrote:
>
> So on x86, both read and write barriers are complete no-ops, because
> all reads are ordered, and all writes are ordered.
Given that this thread started with a reference
to rdtsc, it may be worth keeping in mind that
rdtsc reads themselves do not always appear to
be ordered.
Paul and I spotted some occasionaly "backwards
TSC values" from the CSD lock instrumentation code,
which went away when using ordered TSC reads:
https://lkml.iu.edu/hypermail/linux/kernel/2410.1/03202.html
I guess maybe a TSC read does not follow all the same
rules as a memory read, sometimes?
--
All Rights Reversed.
next prev parent reply other threads:[~2025-02-10 1:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-09 19:10 [PATCH 1/1] x86: In x86-64 barrier_nospec can always be lfence David Laight
2025-02-09 19:32 ` Linus Torvalds
2025-02-09 21:40 ` David Laight
2025-02-09 21:57 ` Linus Torvalds
2025-02-10 1:09 ` Rik van Riel [this message]
2025-02-10 2:15 ` H. Peter Anvin
2025-02-10 4:29 ` Andi Kleen
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=15734b32cecddde7905d3a97005a0c883383cc74.camel@surriel.com \
--to=riel@surriel.com \
--cc=ak@linux.intel.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=david.laight.linux@gmail.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/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.