From: "Jiayuan Chen" <jiayuan.chen@linux.dev>
To: "Maciej Wieczor-Retman" <maciej.wieczor-retman@intel.com>
Cc: linux-mm@kvack.org,
syzbot+997752115a851cb0cf36@syzkaller.appspotmail.com,
"Andrey Ryabinin" <ryabinin.a.a@gmail.com>,
"Alexander Potapenko" <glider@google.com>,
"Andrey Konovalov" <andreyknvl@gmail.com>,
"Dmitry Vyukov" <dvyukov@google.com>,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Uladzislau Rezki" <urezki@gmail.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Kees Cook" <kees@kernel.org>,
kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] mm/kasan: Fix incorrect unpoisoning in vrealloc for KASAN
Date: Wed, 03 Dec 2025 02:05:11 +0000 [thread overview]
Message-ID: <fe3436bcc785ae432edb9a24aa8993e8d25dad9f@linux.dev> (raw)
In-Reply-To: <xfqnzil2oiidogd2drvjrzg4dymydywkge4zws2dildgqvcr2v@ns45a6frntpf>
December 3, 2025 at 04:48, "Maciej Wieczor-Retman" <maciej.wieczor-retman@intel.com mailto:maciej.wieczor-retman@intel.com?to=%22Maciej%20Wieczor-Retman%22%20%3Cmaciej.wieczor-retman%40intel.com%3E > wrote:
>
> Hi, I'm working on [1]. As Andrew pointed out to me the patches are quite
> similar. I was wondering if you mind if the reuse_tag was an actual tag value?
> Instead of just bool toggling the usage of kasan_random_tag()?
>
> I tested the problem I'm seeing, with your patch and the tags end up being reset.
> That's because the vms[area] pointers that I want to unpoison don't have a tag
> set, but generating a different random tag for each vms[] pointer crashes the
> kernel down the line. So __kasan_unpoison_vmalloc() needs to be called on each
> one but with the same tag.
>
> Arguably I noticed my series also just resets the tags right now, but I'm
> working to correct it at the moment. I can send a fixed version tomorrow. Just
> wanted to ask if having __kasan_unpoison_vmalloc() set an actual predefined tag
> is a problem from your point of view?
>
> [1] https://lore.kernel.org/all/cover.1764685296.git.m.wieczorretman@pm.me/
>
Hi Maciej,
It seems we're focusing on different issues, but feel free to reuse or modify the 'reuse_tag'.
It's intended to preserve the tag in one 'vma'.
I'd also be happy to help reproduce and test your changes to ensure the issue I encountered
isn't regressed once you send a patch based on mine.
Thanks.
next prev parent reply other threads:[~2025-12-03 2:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251128111516.244497-1-jiayuan.chen@linux.dev>
2025-12-02 20:48 ` Maciej Wieczor-Retman
2025-12-03 2:05 ` Jiayuan Chen [this message]
2025-12-02 23:23 ` Kees Cook
2025-12-03 1:29 ` Jiayuan Chen
2025-12-03 7:30 Maciej Wieczór-Retman
2025-12-04 13:55 Maciej Wieczor-Retman
2025-12-04 14:38 ` Jiayuan Chen
2025-12-04 15:06 ` Andrey Konovalov
2025-12-04 15:35 ` Jiayuan Chen
2025-12-04 15:19 ` Maciej Wieczor-Retman
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=fe3436bcc785ae432edb9a24aa8993e8d25dad9f@linux.dev \
--to=jiayuan.chen@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=dakr@kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maciej.wieczor-retman@intel.com \
--cc=ryabinin.a.a@gmail.com \
--cc=syzbot+997752115a851cb0cf36@syzkaller.appspotmail.com \
--cc=urezki@gmail.com \
--cc=vincenzo.frascino@arm.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