linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Linus Torvalds <torvalds@linuxfoundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Borkmann <daniel@iogearbox.net>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Redundant barrier_nospec() added by commit 74e19ef0ff80 ("uaccess: Add speculation barrier to copy_from_user()")
Date: Thu, 19 Jun 2025 10:42:13 +0200	[thread overview]
Message-ID: <6f58923f-5ee2-41c6-bb73-8e0fb9ad9a96@csgroup.eu> (raw)

Hello Dave,

In commit 74e19ef0ff80 ("uaccess: Add speculation barrier to 
copy_from_user()") you add barrier_nospec() to copy_from_user().

There is already a barrier_nospec() in allow_read_from_user() which is 
called by raw_copy_from_user(), see commit 8524e2e76441 
("powerpc/uaccess: Perform barrier_nospec() in KUAP allowance helpers"). 
Why do you need an additional one ?

And why only copy_from_user() and not also other places like 
copy_from_user_iter() for instance ?

Thanks
Christophe



                 reply	other threads:[~2025-06-19  8:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6f58923f-5ee2-41c6-bb73-8e0fb9ad9a96@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=daniel@iogearbox.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox