[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG_fn=Wj9rB0jHKT3QKjZsPYce1JFcb1e72QBOBP52Ybs3_qgQ@mail.gmail.com>
Date: Mon, 10 Nov 2025 18:32:21 +0100
From: Alexander Potapenko <glider@...gle.com>
To: Maciej Wieczor-Retman <m.wieczorretman@...me>
Cc: xin@...or.com, peterz@...radead.org, kaleshsingh@...gle.com,
kbingham@...nel.org, akpm@...ux-foundation.org, nathan@...nel.org,
ryabinin.a.a@...il.com, dave.hansen@...ux.intel.com, bp@...en8.de,
morbo@...gle.com, jeremy.linton@....com, smostafa@...gle.com, kees@...nel.org,
baohua@...nel.org, vbabka@...e.cz, justinstitt@...gle.com,
wangkefeng.wang@...wei.com, leitao@...ian.org, jan.kiszka@...mens.com,
fujita.tomonori@...il.com, hpa@...or.com, urezki@...il.com, ubizjak@...il.com,
ada.coupriediaz@....com, nick.desaulniers+lkml@...il.com, ojeda@...nel.org,
brgerst@...il.com, elver@...gle.com, pankaj.gupta@....com,
mark.rutland@....com, trintaeoitogc@...il.com, jpoimboe@...nel.org,
thuth@...hat.com, pasha.tatashin@...een.com, dvyukov@...gle.com,
jhubbard@...dia.com, catalin.marinas@....com, yeoreum.yun@....com,
mhocko@...e.com, lorenzo.stoakes@...cle.com, samuel.holland@...ive.com,
vincenzo.frascino@....com, bigeasy@...utronix.de, surenb@...gle.com,
ardb@...nel.org, Liam.Howlett@...cle.com, nicolas.schier@...ux.dev,
ziy@...dia.com, kas@...nel.org, tglx@...utronix.de, mingo@...hat.com,
broonie@...nel.org, corbet@....net, andreyknvl@...il.com,
maciej.wieczor-retman@...el.com, david@...hat.com, maz@...nel.org,
rppt@...nel.org, will@...nel.org, luto@...nel.org, kasan-dev@...glegroups.com,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
x86@...nel.org, linux-kbuild@...r.kernel.org, linux-mm@...ck.org,
llvm@...ts.linux.dev, linux-doc@...r.kernel.org, stable@...r.kernel.org,
Baoquan He <bhe@...hat.com>
Subject: Re: [PATCH v6 01/18] kasan: Unpoison pcpu chunks with base address tag
On Wed, Oct 29, 2025 at 8:05 PM Maciej Wieczor-Retman
<m.wieczorretman@...me> wrote:
>
> From: Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>
>
> The problem presented here is related to NUMA systems and tag-based
> KASAN modes - software and hardware ones. It can be explained in the
> following points:
>
> 1. There can be more than one virtual memory chunk.
> 2. Chunk's base address has a tag.
> 3. The base address points at the first chunk and thus inherits
> the tag of the first chunk.
> 4. The subsequent chunks will be accessed with the tag from the
> first chunk.
> 5. Thus, the subsequent chunks need to have their tag set to
> match that of the first chunk.
>
> Refactor code by moving it into a helper in preparation for the actual
> fix.
The code in the helper function:
> +void __kasan_unpoison_vmap_areas(struct vm_struct **vms, int nr_vms)
> +{
> + int area;
> +
> + for (area = 0 ; area < nr_vms ; area++) {
> + kasan_poison(vms[area]->addr, vms[area]->size,
> + arch_kasan_get_tag(vms[area]->addr), false);
> + }
> +}
is different from what was originally called:
> - for (area = 0; area < nr_vms; area++)
> - vms[area]->addr = kasan_unpoison_vmalloc(vms[area]->addr,
> - vms[area]->size, KASAN_VMALLOC_PROT_NORMAL);
> + kasan_unpoison_vmap_areas(vms, nr_vms);
, so the patch description is a bit misleading.
Please also ensure you fix the errors reported by kbuild test robot.
Powered by blists - more mailing lists