[PATCH 0/5 v16] KASan for Arm

Nick Desaulniers ndesaulniers at google.com
Mon Nov 9 18:47:45 EST 2020


On Thu, Oct 29, 2020 at 6:32 PM Nathan Chancellor
<natechancellor at gmail.com> wrote:
>
> On Thu, Oct 29, 2020 at 05:38:22PM -0700, Nick Desaulniers wrote:
> > On Thu, Oct 29, 2020 at 5:29 PM Nathan Chancellor
> > <natechancellor at gmail.com> wrote:
> > >
> > > After this series was applied and available in -next, ARCH=arm LLVM=1
> > > allyesconfig builds started failing:
> > >
> > > $ make -skj"$(nproc)" ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KCONFIG_ALLCONFIG=<(echo CONFIG_CPU_BIG_ENDIAN=n) LLVM=1 distclean allyesconfig vmlinux
> > > ...
> > > ld.lld: error: section: .exit.data is not contiguous with other relro sections
> > > ...
> >
> > relro? smells like:
> > https://lore.kernel.org/lkml/20201016175339.2429280-1-ndesaulniers@google.com/T/#u
> >
>
> Huh, did not even realize that the error messages were the same, my bad!
>
> This issue is simple enough to produce by just adding CONFIG_KASAN=y to
> multi_v7_defconfig. I tried adding '-z norelro' to LDFLAGS_vmlinux in
> arch/arm/Makefile and it fixes the build error but the resulting kernel
> does not boot in QEMU.

> '-z norelro' boots fine without KASAN so I assume there is something up
> specifically with KASAN and LLVM for ARM.

Regardless, we still want `-z norelro`. Can you please send a patch if
you still have the diff locally?
-- 
Thanks,
~Nick Desaulniers



More information about the linux-arm-kernel mailing list