From 9050b454a42bbeabecc9b02b5f77703489995b8b Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Sat, 16 May 2026 19:36:24 +0000 Subject: [PATCH] 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 --- iter6_v3_kcsan_config_delta.sh | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 iter6_v3_kcsan_config_delta.sh diff --git a/iter6_v3_kcsan_config_delta.sh b/iter6_v3_kcsan_config_delta.sh new file mode 100755 index 0000000..ceef417 --- /dev/null +++ b/iter6_v3_kcsan_config_delta.sh @@ -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 ==="