From: Andrey Ryabinin <ryabinin.a.a@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Andrey Konovalov <andreyknvl@gmail.com>
Cc: "Maciej Żenczykowski" <maze@google.com>,
"Maciej Wieczor-Retman" <m.wieczorretman@pm.me>,
"Alexander Potapenko" <glider@google.com>,
"Dmitry Vyukov" <dvyukov@google.com>,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
kasan-dev@googlegroups.com, "Uladzislau Rezki" <urezki@gmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
joonki.min@samsung-slsi.corp-partner.google.com,
stable@vger.kernel.org
Subject: Re: [PATCH 1/2] mm/kasan: Fix KASAN poisoning in vrealloc()
Date: Mon, 19 Jan 2026 15:43:02 +0100 [thread overview]
Message-ID: <38bcbe9c-5bc6-4bfa-b4ed-e187e048d600@gmail.com> (raw)
In-Reply-To: <20260118164812.411f8f4f76e3a8aeec5d4704@linux-foundation.org>
On 1/19/26 1:48 AM, Andrew Morton wrote:
> On Sat, 17 Jan 2026 18:08:36 +0100 Andrey Konovalov <andreyknvl@gmail.com> wrote:
>
>> On Sat, Jan 17, 2026 at 2:16 AM Andrey Konovalov <andreyknvl@gmail.com> wrote:
>>>
>>> On Fri, Jan 16, 2026 at 2:26 PM Andrey Ryabinin <ryabinin.a.a@gmail.com> wrote:
>>>>
>>>> So something like bellow I guess.
>>>
>>> Yeah, looks good.
>>>
>>>> I think this would actually have the opposite effect and make the code harder to follow.
>>>> Introducing an extra wrapper adds another layer of indirection and more boilerplate, which
>>>> makes the control flow less obvious and the code harder to navigate and grep.
>>>>
>>>> And what's the benefit here? I don't clearly see it.
>>>
>>> One functional benefit is when HW_TAGS mode enabled in .config but
>>> disabled via command-line, we avoid a function call into KASAN
>>> runtime.
>>
>> Ah, and I just realized than kasan_vrealloc should go into common.c -
>> we also need it for HW_TAGS.
>
> I think I'll send this cc:stable bugfix upstream as-is.
>
Please, include follow-up fix before sending. We have to move kasan_vrealloc()
to common.c as shadow.c is not compiled for CONFIG_KASAN_HW_TAGS=y.
So without the fixup, CONFIG_KASAN_HW_TAGS=y will become broken.
next prev parent reply other threads:[~2026-01-19 14:44 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 12:42 KASAN vs realloc Maciej Żenczykowski
2026-01-07 20:28 ` Kees Cook
2026-01-07 20:47 ` Maciej Wieczor-Retman
2026-01-07 21:47 ` Maciej Żenczykowski
2026-01-07 21:50 ` Maciej Żenczykowski
2026-01-07 21:55 ` Maciej Żenczykowski
2026-01-09 18:55 ` Maciej Wieczor-Retman
2026-01-09 20:05 ` Maciej Żenczykowski
2026-02-06 19:07 ` Maciej Żenczykowski
2026-02-06 20:14 ` Maciej Wieczor-Retman
2026-02-06 21:26 ` Maciej Żenczykowski
2026-01-13 19:15 ` [PATCH 1/2] mm/kasan: Fix KASAN poisoning in vrealloc() Andrey Ryabinin
2026-01-13 19:15 ` [PATCH 2/2] mm/kasan/kunit: extend vmalloc OOB tests to cover vrealloc() Andrey Ryabinin
2026-01-15 3:56 ` Andrey Konovalov
2026-01-16 13:28 ` [PATCH] mm-kasan-kunit-extend-vmalloc-oob-tests-to-cover-vrealloc-fix Andrey Ryabinin
2026-01-16 18:53 ` Maciej Wieczor-Retman
2026-01-17 1:16 ` Andrey Konovalov
2026-01-14 12:17 ` [PATCH 1/2] mm/kasan: Fix KASAN poisoning in vrealloc() Maciej Wieczor-Retman
2026-01-15 3:56 ` Andrey Konovalov
2026-01-16 13:26 ` Andrey Ryabinin
2026-01-17 1:16 ` Andrey Konovalov
2026-01-17 17:08 ` Andrey Konovalov
2026-01-19 0:48 ` Andrew Morton
2026-01-19 14:43 ` Andrey Ryabinin [this message]
2026-01-19 14:45 ` [PATCH] mm-kasan-fix-kasan-poisoning-in-vrealloc-fix Andrey Ryabinin
2026-01-20 17:46 ` Andrey Konovalov
2026-01-21 16:01 ` Andrey Ryabinin
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=38bcbe9c-5bc6-4bfa-b4ed-e187e048d600@gmail.com \
--to=ryabinin.a.a@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=joonki.min@samsung-slsi.corp-partner.google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.wieczorretman@pm.me \
--cc=maze@google.com \
--cc=stable@vger.kernel.org \
--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