public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Alexandre Ghiti <alex@ghiti.fr>
Cc: WangYuli <wangyuli@uniontech.com>,
	stable@vger.kernel.org, sashal@kernel.org,
	parri.andrea@gmail.com, mathieu.desnoyers@efficios.com,
	palmer@rivosinc.com, linux-kernel@vger.kernel.org,
	paul.walmsley@sifive.com, palmer@dabbelt.com,
	aou@eecs.berkeley.edu, nathan@kernel.org,
	ndesaulniers@google.com, trix@redhat.com,
	linux-riscv@lists.infradead.org, llvm@lists.linux.dev,
	paulmck@kernel.org, mingo@redhat.com, peterz@infradead.org,
	juri.lelli@redhat.com, vincent.guittot@linaro.org,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
	vschneid@redhat.com, brauner@kernel.org, arnd@arndb.de
Subject: Re: [PATCH 6.6] membarrier: riscv: Add full memory barrier in switch_mm()
Date: Tue, 10 Sep 2024 13:58:02 +0200	[thread overview]
Message-ID: <2024091037-errant-countdown-4928@gregkh> (raw)
In-Reply-To: <364e0e33-68ad-4f0c-86f1-f6a95def9a30@ghiti.fr>

On Tue, Sep 10, 2024 at 01:31:04PM +0200, Alexandre Ghiti wrote:
> Hi Greg,
> 
> On 10/09/2024 09:32, Greg KH wrote:
> > On Mon, Sep 09, 2024 at 10:57:01AM +0800, WangYuli wrote:
> > > From: Andrea Parri <parri.andrea@gmail.com>
> > > 
> > > [ Upstream commit d6cfd1770f20392d7009ae1fdb04733794514fa9 ]
> > > 
> > > The membarrier system call requires a full memory barrier after storing
> > > to rq->curr, before going back to user-space.  The barrier is only
> > > needed when switching between processes: the barrier is implied by
> > > mmdrop() when switching from kernel to userspace, and it's not needed
> > > when switching from userspace to kernel.
> > > 
> > > Rely on the feature/mechanism ARCH_HAS_MEMBARRIER_CALLBACKS and on the
> > > primitive membarrier_arch_switch_mm(), already adopted by the PowerPC
> > > architecture, to insert the required barrier.
> > > 
> > > Fixes: fab957c11efe2f ("RISC-V: Atomic and Locking Code")
> > > Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
> > > Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > > Link: https://lore.kernel.org/r/20240131144936.29190-2-parri.andrea@gmail.com
> > > Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> > > Signed-off-by: WangYuli <wangyuli@uniontech.com>
> > > ---
> > >   MAINTAINERS                         |  2 +-
> > >   arch/riscv/Kconfig                  |  1 +
> > >   arch/riscv/include/asm/membarrier.h | 31 +++++++++++++++++++++++++++++
> > >   arch/riscv/mm/context.c             |  2 ++
> > >   kernel/sched/core.c                 |  5 +++--
> > >   5 files changed, 38 insertions(+), 3 deletions(-)
> > >   create mode 100644 arch/riscv/include/asm/membarrier.h
> > Now queued up, thanks.
> 
> 
> The original patch was merged in 6.9 and the Fixes tag points to a commit
> introduced in v4.15. So IIUC, this patch should have been backported
> "automatically" to the releases < 6.9 right? As stated in the documentation
> (process/stable-kernel-rules.html):
> 
> "Note, such tagging is unnecessary if the stable team can derive the
> appropriate versions from Fixes: tags."
> 
> Or did we miss something?

Yes, you didn't tag cc: stable at all in this commit, which is why we
did not see it.  The documentation says that :)

thanks,

greg k-h

  reply	other threads:[~2024-09-10 11:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09  2:57 [PATCH 6.6] membarrier: riscv: Add full memory barrier in switch_mm() WangYuli
2024-09-10  7:32 ` Greg KH
2024-09-10 11:31   ` Alexandre Ghiti
2024-09-10 11:58     ` Greg KH [this message]
2024-09-10 12:35       ` Alexandre Ghiti
2024-09-10 13:25         ` Greg KH
2024-09-10 18:59           ` Alexandre Ghiti

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=2024091037-errant-countdown-4928@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=arnd@arndb.de \
    --cc=brauner@kernel.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.com \
    --cc=parri.andrea@gmail.com \
    --cc=paul.walmsley@sifive.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=trix@redhat.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=wangyuli@uniontech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox