From: "Arnd Bergmann" <arnd@arndb.de>
To: moonafterrain@outlook.com,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy" <chleroy@kernel.org>,
"Paul Mackerras" <paulus@ozlabs.org>,
"Alexander Viro" <viro@zeniv.linux.org.uk>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
"Yuhao Jiang" <danisjiang@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH 2/6] powerpc/spufs: don't leak kernel stack via spu_run
Date: Mon, 03 Aug 2026 11:09:13 +0200 [thread overview]
Message-ID: <a6c11272-044a-4f9a-9cde-68e1f12798c9@app.fastmail.com> (raw)
In-Reply-To: <20260802-fixes-v1-2-7368423440f4@outlook.com>
On Sun, Aug 2, 2026, at 17:51, Junrui Luo via B4 Relay wrote:
>
> Initialize status to 0, which is what userspace would have observed had
> the assignment been reached anyway: spufs_run_spu() resets
> ctx->event_return to 0 on entry, and 0 is the "no events pending" value
> for this word.
>
> Fixes: 67207b9664a8 ("[PATCH] spufs: The SPU file system, base")
> Reported-by: Yuhao Jiang <danisjiang@gmail.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Junrui Luo <moonafterrain@outlook.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
> @@ -37,7 +37,7 @@ static long do_spu_run(struct file *filp,
> {
> long ret;
> struct spufs_inode_info *i;
> - u32 npc, status;
> + u32 npc, status = 0;
>
> ret = -EFAULT;
> if (get_user(npc, unpc))
I think I would prefer skipping the broken put_user() in case
of an error, but your version also works.
Arnd
next prev parent reply other threads:[~2026-08-03 9:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 15:51 [PATCH 0/6] powerpc/spufs: assorted fixes Junrui Luo via B4 Relay
2026-08-02 15:51 ` [PATCH 1/6] powerpc/spufs: fix spu_context leak in coredump Junrui Luo via B4 Relay
2026-08-03 9:05 ` Arnd Bergmann
2026-08-02 15:51 ` [PATCH 2/6] powerpc/spufs: don't leak kernel stack via spu_run Junrui Luo via B4 Relay
2026-08-03 9:09 ` Arnd Bergmann [this message]
2026-08-02 15:51 ` [PATCH 3/6] powerpc/spufs: bound NPC against local store size Junrui Luo via B4 Relay
2026-08-03 9:14 ` Arnd Bergmann
2026-08-04 6:30 ` Junrui Luo
2026-08-02 15:51 ` [PATCH 4/6] powerpc/spufs: check permissions in spufs_setattr() Junrui Luo via B4 Relay
2026-08-03 9:16 ` Arnd Bergmann
2026-08-02 15:51 ` [PATCH 5/6] powerpc/spufs: fix deadlock on gang creation failure Junrui Luo via B4 Relay
2026-08-02 15:51 ` [PATCH 6/6] powerpc/spufs: don't hold state_mutex during user access Junrui Luo via B4 Relay
2026-08-03 9:26 ` Arnd Bergmann
2026-08-03 9:28 ` [PATCH 0/6] powerpc/spufs: assorted fixes Arnd Bergmann
2026-08-03 9:59 ` Junrui Luo
2026-08-03 10:18 ` Arnd Bergmann
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=a6c11272-044a-4f9a-9cde-68e1f12798c9@app.fastmail.com \
--to=arnd@arndb.de \
--cc=chleroy@kernel.org \
--cc=danisjiang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=moonafterrain@outlook.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=paulus@ozlabs.org \
--cc=stable@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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