From: Lecopzer Chen <lecopzer.chen@mediatek.com>
To: <ardb@kernel.org>
Cc: <dvyukov@google.com>, <f.fainelli@gmail.com>,
<kasan-dev@googlegroups.com>, <lecopzer.chen@mediatek.com>,
<linus.walleij@linaro.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux@armlinux.org.uk>,
<liuwenliang@huawei.com>, <stable@vger.kernel.org>,
<yj.chiang@mediatek.com>
Subject: Re: [PATCH] ARM: module: fix MODULE_PLTS not work for KASAN
Date: Thu, 23 Dec 2021 21:04:37 +0800 [thread overview]
Message-ID: <20211223130437.23313-1-lecopzer.chen@mediatek.com> (raw)
In-Reply-To: <CAMj1kXGL++stjcuryn8zVwMgH4F05mONoU3Kca9Ch8N2dW-_bg@mail.gmail.com>
> > Fixes: 421015713b306e47af9 ("ARM: 9017/2: Enable KASan for ARM")
> > Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-12-23 13:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-23 10:15 [PATCH] ARM: module: fix MODULE_PLTS not work for KASAN Lecopzer Chen
2021-12-23 11:01 ` Ard Biesheuvel
2021-12-23 13:04 ` Lecopzer Chen [this message]
2021-12-24 3:13 ` Linus Walleij
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=20211223130437.23313-1-lecopzer.chen@mediatek.com \
--to=lecopzer.chen@mediatek.com \
--cc=ardb@kernel.org \
--cc=dvyukov@google.com \
--cc=f.fainelli@gmail.com \
--cc=kasan-dev@googlegroups.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=liuwenliang@huawei.com \
--cc=stable@vger.kernel.org \
--cc=yj.chiang@mediatek.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