[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db30beb6-a331-46b7-92a3-1ee7782e317a@csgroup.eu>
Date: Wed, 25 Jun 2025 12:35:51 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Sabyrzhan Tasbolatov <snovitoll@...il.com>, ryabinin.a.a@...il.com,
glider@...gle.com, andreyknvl@...il.com, dvyukov@...gle.com,
vincenzo.frascino@....com, catalin.marinas@....com, will@...nel.org,
chenhuacai@...nel.org, kernel@...0n.name, maddy@...ux.ibm.com,
mpe@...erman.id.au, npiggin@...il.com, hca@...ux.ibm.com, gor@...ux.ibm.com,
agordeev@...ux.ibm.com, borntraeger@...ux.ibm.com, svens@...ux.ibm.com,
richard@....at, anton.ivanov@...bridgegreys.com, johannes@...solutions.net,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, x86@...nel.org,
hpa@...or.com, chris@...kel.net, jcmvbkbc@...il.com,
akpm@...ux-foundation.org
Cc: guoweikang.kernel@...il.com, geert@...ux-m68k.org, rppt@...nel.org,
tiwei.btw@...group.com, richard.weiyang@...il.com, benjamin.berg@...el.com,
kevin.brodsky@....com, kasan-dev@...glegroups.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
loongarch@...ts.linux.dev, linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org, linux-um@...ts.infradead.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/9] kasan: unify static kasan_flag_enabled across modes
Le 25/06/2025 à 11:52, Sabyrzhan Tasbolatov a écrit :
> Historically the fast-path static key `kasan_flag_enabled` existed
> only for `CONFIG_KASAN_HW_TAGS`. Generic and SW_TAGS either relied on
> `kasan_arch_is_ready()` or evaluated KASAN checks unconditionally.
> As a result every architecture had to toggle a private flag
> in its `kasan_init()`.
>
> This patch turns the flag into a single global runtime predicate that
> is built for every `CONFIG_KASAN` mode and adds a helper that flips
> the key once KASAN is ready.
Shouldn't kasan_init_generic() also perform the following line to reduce
even more code duplication between architectures ?
init_task.kasan_depth = 0;
Christophe
Powered by blists - more mailing lists