iter6 v3: stage KCSAN-only config delta script for second-pass build

KASAN and KCSAN are mutually exclusive on 7.0-rc3 kernel
(lib/Kconfig.kcsan: 'depends on ... !KASAN'). User picked
KASAN first. This script applies the KCSAN-only config delta
on top of the lockdep base for the follow-up build, so the
KCSAN config survives session-compacting.

Run AFTER the KASAN-pass test cycle completes, IF KASAN comes
up silent on the GPU-compositor wedge test.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Markus Fritsche
2026-05-16 19:36:24 +00:00
parent 96e2d439c9
commit 9050b454a4
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
# iter6 v3 second-pass: KCSAN-only kernel build (if KASAN-pass comes up silent)
#
# Run AFTER the KASAN-pass build/install/test cycle is complete.
# This script applies the KCSAN config delta on top of the lockdep base.
# KCSAN is mutually exclusive with KASAN on this kernel
# (lib/Kconfig.kcsan: depends on ... !KASAN).
#
# Usage: cd ~/src/linux-rockchip && bash /path/to/this/script
set -e
cd "$(dirname "$(readlink -f "$0")")"
[[ -f Makefile ]] || cd ~/src/linux-rockchip
echo "=== restore lockdep config (pre-kasan baseline) ==="
[[ -f .config.pre-iter6v3-kasan ]] && cp .config.pre-iter6v3-kasan .config
echo
echo "=== apply KCSAN-only config delta ==="
./scripts/config --disable KASAN --disable KASAN_GENERIC --disable KASAN_OUTLINE \
--disable KASAN_STACK --disable KASAN_VMALLOC \
--enable KCSAN --enable KCSAN_VERBOSE \
--set-val KCSAN_REPORT_ONCE_IN_MS 2000 \
--enable KCSAN_REPORT_VALUE_CHANGE_ONLY \
--enable DEBUG_PREEMPT --enable DEBUG_ATOMIC_SLEEP \
--enable DEBUG_OBJECTS --enable DEBUG_OBJECTS_RCU_HEAD \
--enable DEBUG_LIST \
--enable SLUB_DEBUG --enable SLUB_DEBUG_ON \
--enable PAGE_POISONING \
--set-str LOCALVERSION "-lockdep-kcsan"
make olddefconfig
grep -E "^CONFIG_(KASAN|KCSAN)" .config | head
echo
echo "=== verify mutex with KASAN ==="
if grep -q "^CONFIG_KASAN=y" .config; then
echo "ERROR: KASAN still =y — KCSAN won't enable. Fix .config manually."
exit 1
fi
echo "=== KCSAN build can proceed with: time pump make -j8 CC='distcc gcc' Image modules dtbs ==="