Re: [PATCH] kasan: Disable Software Tag-Based KASAN with GCC

From: Marco Elver
Date: Fri Oct 18 2024 - 04:37:57 EST


On Tue, Oct 15, 2024 at 01:39PM +0100, 'Will Deacon' via kasan-dev wrote:
> On Mon, 14 Oct 2024 17:11:00 +0100, Will Deacon wrote:
> > Syzbot reports a KASAN failure early during boot on arm64 when building
> > with GCC 12.2.0 and using the Software Tag-Based KASAN mode:
> >
> > | BUG: KASAN: invalid-access in smp_build_mpidr_hash arch/arm64/kernel/setup.c:133 [inline]
> > | BUG: KASAN: invalid-access in setup_arch+0x984/0xd60 arch/arm64/kernel/setup.c:356
> > | Write of size 4 at addr 03ff800086867e00 by task swapper/0
> > | Pointer tag: [03], memory tag: [fe]
> >
> > [...]
>
> Applied to arm64 (for-next/fixes), thanks!
>
> [1/1] kasan: Disable Software Tag-Based KASAN with GCC
> https://git.kernel.org/arm64/c/7aed6a2c51ff

I do not think this is the right fix. Please see alternative below.
Please do double-check that the observed splat above is fixed with that.

Thanks,
-- Marco

------ >8 ------