lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Dec 2021 21:04:37 +0800
From:   Lecopzer Chen <lecopzer.chen@...iatek.com>
To:     <ardb@...nel.org>
CC:     <dvyukov@...gle.com>, <f.fainelli@...il.com>,
        <kasan-dev@...glegroups.com>, <lecopzer.chen@...iatek.com>,
        <linus.walleij@...aro.org>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux@...linux.org.uk>,
        <liuwenliang@...wei.com>, <stable@...r.kernel.org>,
        <yj.chiang@...iatek.com>
Subject: Re: [PATCH] ARM: module: fix MODULE_PLTS not work for KASAN

> > Fixes: 421015713b306e47af9 ("ARM: 9017/2: Enable KASan for ARM")
> > Signed-off-by: Lecopzer Chen <lecopzer.chen@...iatek.com>
> > ---
> >  arch/arm/kernel/module.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
> > index beac45e89ba6..c818aba72f68 100644
> > --- a/arch/arm/kernel/module.c
> > +++ b/arch/arm/kernel/module.c
> > @@ -46,7 +46,7 @@ void *module_alloc(unsigned long size)
> >         p = __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
> >                                 gfp_mask, PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE,
> >                                 __builtin_return_address(0));
> > -       if (!IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || p)
> > +       if (!IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || IS_ENABLED(CONFIG_KASAN) || p)
> 
> 
> Hello Lecopzer,
> 
> This is not the right place to fix this. If module PLTs are
> incompatible with KAsan, they should not be selectable in Kconfig at
> the same time.
> 
> But ideally, we should implement KASAN_VMALLOC for ARM as well - we
> also need this for the vmap'ed stacks.

Hi Ard,

Thanks a lots for your advice.

Of course, I just simulate how arm64 did, It's surrounded by a bunch of
IS_ENABLED(CONFIG_...). I think I could also send a patch for arm64 to
move out the IS_ENABLED() to Kconfig.

Actually I have a patch set support KASAN_VMALLOC for arm which is
similar with I did for arm64, this patch is regarded as the first patch
from the serise.

But It has problems that it's very easy to run out of vmalloc area
due to 32bit address space(balance between low and highmem),
so the serise is pending and I send this patch alone.

Anyway, I'll send v2 to move the conditioni-if to Kconfig.

thanks,

Lecopzer










Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ