kasan-for-arm32

Linus Walleij linus.walleij at linaro.org
Thu Nov 10 01:51:40 PST 2022


On Wed, Nov 9, 2022 at 12:14 PM 李文杰 <liwenjie.liwenjie at bytedance.com> wrote:

[Contex: porting kasan to kernel v5.4]

> 1. I know why my machine crash after porting the patch.
> 2. Because the kernel access the vmalloc region, which not shadowed.
> 3. Now I found at least two places where used vmalloc region:
>    1). arch/arm/mm/fault-armv.c ->check_writebuffer_bugs() -> vmap();
>    2). lib/genalloc.c -> chunk = vzalloc_node(nbytes, nid);
> 4. could I add the vmalloc to shadow memory region?

I think you need to backport at least the following patches from upstream:

823f606ab6b4 ARM: 9242/1: kasan: Only map modules if CONFIG_KASAN_VMALLOC=n
565cbaad83d8 ARM: 9202/1: kasan: support CONFIG_KASAN_VMALLOC

Both from Lecopzer Chen.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list