Arm + KASAN + syzbot

Russell King - ARM Linux admin linux at armlinux.org.uk
Thu Mar 11 13:42:13 GMT 2021


On Thu, Mar 11, 2021 at 11:54:22AM +0100, Dmitry Vyukov wrote:
> The instance has KASAN disabled because Go binaries don't run on KASAN kernel:
> https://lore.kernel.org/linux-arm-kernel/CACT4Y+YdJoNTqnBSELcEbcbVsKBtJfYUc7_GSXbUQfAJN3JyRg@mail.gmail.com/

I suspect this is unlikely to change as it hasn't attracted any
interest. Someone using Go and KASAN needs to debug this... I suspect
it may be due to something being KASAN instrumented that shouldn't be.

> It also has KCOV disabled (so no coverage guidance and coverage
> reports for now) because KCOV does not fully work on arm:
> https://lore.kernel.org/linux-arm-kernel/20210119130010.GA2338@C02TD0UTHF1T.local/T/#m78fdfcc41ae831f91c93ad5dabe63f7ccfb482f0

Looking at those, they look a bit weird. First:

PC is at check_kcov_mode kernel/kcov.c:163 [inline]
PC is at __sanitizer_cov_trace_pc+0x40/0x78 kernel/kcov.c:197

Why is this duplicated?

Second:

sp : 8b4e6078  ip : 8b4e6088  fp : 8b4e6084
...
Process   (pid: 0, stack limit = 0x147f9c36)

The stack limit is definitely wrong, and it looks like the thread_info
is likely wrong too. Given the value of "sp" I wonder if the kernel
stack has overflowed and overwritten the thread_info structure at the
bottom of the kernel stack.

I've no idea what effect KCOV would have on the kernel - it's something
I've never looked at, so I don't know what changes it would impose.
At this point, as there's very little commercial interest in arm32,
there's probably little hope in getting this sorted. It may make sense
to force KCOV to be disabled for arm32.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list