linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Brahmajit Das <listout@listout.xyz>
Cc: Nathan Chancellor <nathan@kernel.org>,
	linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-btrfs@vger.kernel.org, clm@fb.com, josef@toxicpanda.com,
	dsterba@suse.com, kees@kernel.org, ailiop@suse.com,
	mark@harmstone.com, Brahmajit Das <bdas@suse.de>
Subject: Re: [PATCH v4] btrfs: replace deprecated strcpy with strscpy
Date: Thu, 3 Jul 2025 17:12:26 +0200	[thread overview]
Message-ID: <20250703151226.GW31241@suse.cz> (raw)
In-Reply-To: <25hcimtuueppt4w3ccvid3d7c3eots7nat4qspdr6t6minxfa2@zb4fmwz7qsyp>

On Thu, Jul 03, 2025 at 06:08:24AM +0530, Brahmajit Das wrote:
> On 02.07.2025 11:27, Nathan Chancellor wrote:
> > Hi Brahmajit,
> > 
> > On Fri, Jun 20, 2025 at 10:19:57PM +0530, Brahmajit Das wrote:
> ...
> > 
> > This change is now in -next as commit d282edfe8850 ("btrfs: replace
> > strcpy() with strscpy()"), where this hunk appears to causes a slew of
> > warnings on my arm64 systems along the lines of:
> > 
> ...
> > 
> > It looks like the offset_in_page(buf) part of the WARN() in
> > sysfs_emit() gets triggered with this, presumably because kmalloc()
> > returns something that is not page aligned like sysfs_emit() requires?
>
> Nathan, can you help me with providing a bit more info to debug this. I
> set up qemu aarch64 env with btrfs but couldn't reproduce this issue by
> boot test. Basically trying to understand what workflow triggered this.
> 
> You can find my kernel config, dmesg log and boot logs here:
> https://gist.github.com/listout/de8b6efa6ddb02805b5886f35c3f73d4

sysfs_emit() is wrapper for scnprintf with implicit buffer length, so
we can use that instead. I'll fix it in for-next.

      reply	other threads:[~2025-07-03 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20 16:49 [PATCH v4] btrfs: replace deprecated strcpy with strscpy Brahmajit Das
2025-07-01 14:55 ` David Sterba
2025-07-02 18:27 ` Nathan Chancellor
2025-07-02 20:46   ` Brahmajit Das
2025-07-03  0:38   ` Brahmajit Das
2025-07-03 15:12     ` David Sterba [this message]

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=20250703151226.GW31241@suse.cz \
    --to=dsterba@suse.cz \
    --cc=ailiop@suse.com \
    --cc=bdas@suse.de \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=kees@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=listout@listout.xyz \
    --cc=mark@harmstone.com \
    --cc=nathan@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 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).