Skip to content

Commit

Permalink
dashboard/config/linux: disable CONFIG_STACKPROTECTOR for KMSAN
Browse files Browse the repository at this point in the history
Linux v6.4-rc1 built with Clang versions <= 16 with stack protector
enabled panic with the following stack trace:

Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: start_kernel+0xd8a/0xd90
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.3.0-rc1-00042-g9ea7e6b62c2b-dirty #106
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88
 dump_stack_lvl+0x1bc/0x250 lib/dump_stack.c:106
 dump_stack+0x1e/0x20 lib/dump_stack.c:113
 panic+0x4cd/0xc10 kernel/panic.c:340
 __stack_chk_fail+0x18/0x20 kernel/panic.c:759
 start_kernel+0xd8a/0xd90 init/main.c:?
 x86_64_start_reservations+0x2e/0x30 arch/x86/kernel/head64.c:556
 x86_64_start_kernel+0x118/0x120 arch/x86/kernel/head64.c:537
 secondary_startup_64_no_verify+0xcf/0xdb arch/x86/kernel/head_64.S:358
 </TASK>

ClangBuiltLinux/linux#1815 describes the
problem, which is fixed on the Clang side
(https://reviews.llvm.org/D147975), but before the fix reaches syzbot
we'll have to keep the stack protector disabled.
  • Loading branch information
ramosian-glider committed May 9, 2023
1 parent 8d2f31f commit 30aa2a7
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 204 deletions.
6 changes: 5 additions & 1 deletion dashboard/config/linux/bits/kmsan.yml
Expand Up @@ -5,7 +5,7 @@ compiler: /usr/bin/clang

kernel:
repo: https://github.com/google/kmsan.git
tag: kmsan-v6.2-rc7
tag: kmsan-v6.4-rc1

config:
- KMSAN
Expand All @@ -26,6 +26,10 @@ config:
- HARDENED_USERCOPY: [n, weak]
- HARDENED_USERCOPY_FALLBACK: [n, weak]

# Stack protector is broken in Clang before version 17.
# See https://github.com/ClangBuiltLinux/linux/issues/1815 for details.
- STACKPROTECTOR: n

# KMSAN doesn't support ORC unwinder (https://github.com/google/kmsan/issues/48).
- UNWINDER_FRAME_POINTER

Expand Down

0 comments on commit 30aa2a7

Please sign in to comment.