Machine freezes after running KASAN KUnit test 21 with a GCC 13.2 built kernel but runs tests fine with a CLANG 18 build kernel (v6.9-rc5, 32bit ppc, PowerMac G4 DP)

Erhard Furtner erhard_f at mailbox.org
Wed May 1 22:41:56 AEST 2024


On Sat, 27 Apr 2024 20:50:20 +0200
Erhard Furtner <erhard_f at mailbox.org> wrote:

> Greetings!
> 
> Building kernel v6.9-rc5 with GCC 13.2 + binutils 2.42 and running KASAN KUnit tests (CONFIG_KASAN_INLINE=y, CONFIG_KASAN_KUNIT_TEST=y) on my Dual CPU PowerMac G4 DP always freezes the machine after test 21 (see attached dmesg gcc_v02). Sometimes the G4 is able to reboot, most of the time it just freezes:

Turns out this is not a ppc specific issue at all, happens also on my AMD FX 8370, tested on kernel v6.9-rc6. clang18 built kernel runs and passes KASAN KUnit tests fine whereas a gcc13 built kernel freezes or reboots after test 20 (ppc after test 21):

[...]
    ok 16 kmalloc_uaf_16
    # kmalloc_oob_in_memset: EXPECTATION FAILED at mm/kasan/kasan_test.c:566
    KASAN failure expected in "memset(ptr, 0, size + KASAN_GRANULE_SIZE)", but none occurred
    not ok 17 kmalloc_oob_in_memset
    # kmalloc_oob_memset_2: EXPECTATION FAILED at mm/kasan/kasan_test.c:496
    KASAN failure expected in "memset(ptr + size - 1, 0, memset_size)", but none occurred
    not ok 18 kmalloc_oob_memset_2
    # kmalloc_oob_memset_4: EXPECTATION FAILED at mm/kasan/kasan_test.c:514
    KASAN failure expected in "memset(ptr + size - 3, 0, memset_size)", but none occurred
    not ok 19 kmalloc_oob_memset_4
    # kmalloc_oob_memset_8: EXPECTATION FAILED at mm/kasan/kasan_test.c:532
    KASAN failure expected in "memset(ptr + size - 7, 0, memset_size)", but none occurred
    not ok 20 kmalloc_oob_memset_8
    # kmalloc_oob_memset_16: EXPECTATION FAILED at mm/kasan/kasan_test.c:550
    KASAN failure expected in "memset(ptr + size - 15, 0, memset_size)", but none occurred


Kernel .config + dmesg attached. 

Regards,
Erhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmesg_69-rc6_fx8370-gcc13
Type: application/octet-stream
Size: 148058 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20240501/a7c7c689/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config_69-rc6_fx8370
Type: application/octet-stream
Size: 134278 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20240501/a7c7c689/attachment-0003.obj>


More information about the Linuxppc-dev mailing list