linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Arnd Bergmann" <arnd@kernel.org>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Christian Brauner" <brauner@kernel.org>
Cc: "Jan Kara" <jack@suse.cz>,
	"Alexander Mikhalitsyn" <alexander@mihalicyn.com>,
	"Jann Horn" <jannh@google.com>,
	"Luca Boccassi" <luca.boccassi@gmail.com>,
	"Jeff Layton" <jlayton@kernel.org>,
	"Roman Kisel" <romank@linux.microsoft.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coredump: reduce stack usage in vfs_coredump()
Date: Wed, 25 Jun 2025 15:29:50 +0200	[thread overview]
Message-ID: <cb0c926f-15be-4400-a9b9-0122a6238fea@app.fastmail.com> (raw)
In-Reply-To: <8f080dc3-ef13-4d9a-8964-0c2b3395072e@samsung.com>

On Wed, Jun 25, 2025, at 13:54, Marek Szyprowski wrote:
> On 25.06.2025 13:41, Marek Szyprowski wrote:
>>
>> This change appears in today's linux-next (next-20250625) as commit 
>> fb82645d3f72 ("coredump: reduce stack usage in vfs_coredump()"). In my 
>> tests I found that it causes a kernel oops on some of my ARM 32bit 
>> Exynos based boards. This is really strange, because I don't see any 
>> obvious problem in this patch. Reverting $subject on top of linux-next 
>> hides/fixes the oops. I suspect some kind of use-after-free issue, but 
>> I cannot point anything related. Here is the kernel log from one of 
>> the affected boards (I've intentionally kept the register and stack 
>> dumps):
>
> I've just checked once again and found the source of the issue. 
> vfs_coredump() calls coredump_cleanup(), which calls coredump_finish(), 
> which performs the following dereference:
>
> next = current->signal->core_state->dumper.next
>
> of the core_state assigned in zap_threads() called from coredump_wait(). 
> It looks that core_state cannot be moved into coredump_wait() without 
> refactoring/cleaning this first.

Thanks for the analysis, I agree that this can't work and my patch
just needs to be dropped. The 'noinline_for_stack' change on
its own is probably sufficient to avoid the warning, and I can
respin a new version after more build testing.

     Arnd

  reply	other threads:[~2025-06-25 13:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20 11:21 [PATCH] coredump: reduce stack usage in vfs_coredump() Arnd Bergmann
2025-06-20 16:49 ` Alexander Mikhalitsyn
2025-06-23 10:36 ` Christian Brauner
     [not found] ` <CGME20250625114152eucas1p250b0d9a60a030e0eca6adf4d50794ebd@eucas1p2.samsung.com>
2025-06-25 11:41   ` Marek Szyprowski
     [not found]     ` <CGME20250625115426eucas1p17398cfcd215befcd3eafe0cac44b33a7@eucas1p1.samsung.com>
2025-06-25 11:54       ` Marek Szyprowski
2025-06-25 13:29         ` Arnd Bergmann [this message]
2025-06-26  6:22           ` Venkat Rao Bagalkote
2025-06-26  8:19           ` Christian Brauner

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=cb0c926f-15be-4400-a9b9-0122a6238fea@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=alexander@mihalicyn.com \
    --cc=arnd@kernel.org \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=jannh@google.com \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.boccassi@gmail.com \
    --cc=m.szyprowski@samsung.com \
    --cc=romank@linux.microsoft.com \
    --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;
as well as URLs for NNTP newsgroup(s).