From: Qu Wenruo <wqu@suse.com>
To: Daniel J Blueman <daniel@quora.org>
Cc: David Sterba <dsterba@suse.com>, Chris Mason <clm@fb.com>,
Linux BTRFS <linux-btrfs@vger.kernel.org>,
linux-crypto@vger.kernel.org,
Linux Kernel <linux-kernel@vger.kernel.org>,
kasan-dev@googlegroups.com, ryabinin.a.a@gmail.com
Subject: Re: Soft tag and inline kasan triggering NULL pointer dereference, but not for hard tag and outline mode (was Re: [6.19-rc3] xxhash invalid access during BTRFS mount)
Date: Thu, 1 Jan 2026 11:45:26 +1030 [thread overview]
Message-ID: <03cb035e-e34b-4b95-b1df-c8dc6db5a6b0@suse.com> (raw)
In-Reply-To: <eb8d0d62-f8a3-4198-b230-94f72028ac4e@suse.com>
在 2025/12/31 15:39, Qu Wenruo 写道:
>
>
> 在 2025/12/31 15:30, Daniel J Blueman 写道:
>> On Wed, 31 Dec 2025 at 12:55, Qu Wenruo <wqu@suse.com> wrote:
[...]
>>>
>>> x86_64 + generic + inline: PASS
>>> x86_64 + generic + outline: PASS
>> [..]
>>> arm64 + hard tag: PASS
>>> arm64 + generic + inline: PASS
>>> arm64 + generic + outline: PASS
>>
>> Do you see "KernelAddressSanitizer initialized" with KASAN_GENERIC
>> and/or KASAN_HW_TAGS?
>
> Yes. For my current running one using generic and inline, it shows at
> boot time:
>
> [ 0.000000] cma: Reserved 64 MiB at 0x00000000fc000000
> [ 0.000000] crashkernel reserved: 0x00000000dc000000 -
> 0x00000000fc000000 (512 MB)
> [ 0.000000] KernelAddressSanitizer initialized (generic) <<<
> [ 0.000000] psci: probing for conduit method from ACPI.
> [ 0.000000] psci: PSCIv1.3 detected in firmware.
>
>
>>
>> I didn't see it in either case, suggesting it isn't implemented or
>> supported on my system.
>>
>>> arm64 + soft tag + inline: KASAN error at boot
>>> arm64 + soft tag + outline: KASAN error at boot
>>
>> Please retry with CONFIG_BPF unset.
>
> I will retry but I believe this (along with your reports about hardware
> tags/generic not reporting the error) has already proven the problem is
> inside KASAN itself.
>
> Not to mention the checksum verification/calculation is very critical
> part of btrfs, although in v6.19 there is a change in the crypto
> interface, I still doubt about whether we have a out-of-boundary access
> not exposed in such hot path until now.
BTW, I tried to bisect the cause, and indeed got the same KASAN warning
during some runs just mounting a newly created btrfs, and the csum
algorithm doesn't seem to matter.
Both xxhash and sha256 can trigger it randomly.
Unfortunately there is no reliable way to reproduce the kasan warning, I
have to cancel the bisection.
For now I strongly doubt if this is a bug in software tag-based KASAN
itself, and that's the only combination resulting the warning.
If KASAN people has some clue I'm very happy to test, meanwhile I'll
keep using hardware tag-based kasan on arm64 and generic one on x86_64
to test btrfs, to make sure no obvious bad memory access.
Thanks,
Qu
>
> Thanks,
> Qu
>
>>
>> Thanks,
>> Dan
>
>
next prev parent reply other threads:[~2026-01-01 1:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 7:32 [6.19-rc3] xxhash invalid access during BTRFS mount Daniel J Blueman
2025-12-30 8:56 ` Qu Wenruo
2025-12-30 9:28 ` Qu Wenruo
2025-12-31 3:29 ` Daniel J Blueman
2025-12-31 4:05 ` Soft tag and inline kasan triggering NULL pointer dereference, but not for hard tag and outline mode (was Re: [6.19-rc3] xxhash invalid access during BTRFS mount) Qu Wenruo
2025-12-31 4:55 ` Qu Wenruo
2025-12-31 5:00 ` Daniel J Blueman
2025-12-31 5:09 ` Qu Wenruo
2026-01-01 1:15 ` Qu Wenruo [this message]
2026-01-01 6:02 ` Daniel J Blueman
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=03cb035e-e34b-4b95-b1df-c8dc6db5a6b0@suse.com \
--to=wqu@suse.com \
--cc=clm@fb.com \
--cc=daniel@quora.org \
--cc=dsterba@suse.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ryabinin.a.a@gmail.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