Re: [PATCH v3 1/2] ARM: ioremap: Sync PGDs for VMALLOC shadow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 17, 2024 at 4:22 PM Clement LE GOFFIC
<clement.legoffic@xxxxxxxxxxx> wrote:
>
> On 10/17/24 14:59, Linus Walleij wrote:
> > [...]
> >
> > +static unsigned long arm_kasan_mem_to_shadow(unsigned long addr)
> > +{
> > +     return (unsigned long)kasan_mem_to_shadow((void *)addr);
> > +}
> > +
>
> `kasan_mem_to_shadow` function symbol is only exported with :
> CONFIG_KASAN_GENERIC or defined(CONFIG_KASAN_SW_TAGS) from kasan.h
>
> To me, the if condition you added below should be expanded with those
> two macros.
(...)
> > +             if (IS_ENABLED(CONFIG_KASAN_VMALLOC)) {

Let's check this with the KASAN authors, I think looking for
CONFIG_KASAN_VMALLOC
should be enough as it is inside the if KASAN clause in
lib/Kconfig.kasan, i.e. the symbol KASAN must be enabled for
CONFIG_KASAN_VMALLOC to be enabled, and if KASAN is enabled
then either KASAN_GENERIC or KASAN_SW_TAGS is enabled
(the third option KASAN_HW_TAGS, also known as memory tagging
is only available on ARM64 and we are not ARM64.)

But I might be wrong! Kconfig regularly bites me in the foot...

Yours,
Linus Walleij





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux