Skip to content

Commit

Permalink
kconfig: use 'debug.config'
Browse files Browse the repository at this point in the history
Instead of maintain a list ourselves.

On top of that:

- NET_NS_REFCNT_TRACKER is added: useful for 'net' tests
- SLUB_DEBUG_ON is removed: perf impact is too important

It is also easier for other to have a similar config.

Diff:

  -DEBUG_PAGEALLOC_ENABLE_DEFAULT n
   BUG_ON_DATA_CORRUPTION n -> y
   DEBUG_KMEMLEAK n -> y
   DEBUG_LIST n -> y
   DEBUG_LOCKDEP y -> n
   DEBUG_OBJECTS n -> y
   DEBUG_PAGEALLOC y -> n
   DEBUG_PER_CPU_MAPS n -> y
   DEBUG_SECTION_MISMATCH n -> y
   DEBUG_VIRTUAL n -> y
   DEBUG_VM n -> y
   DETECT_HUNG_TASK n -> y
   KASAN_INLINE n -> y
   KASAN_OUTLINE y -> n
   KASAN_VMALLOC n -> y
   PAGE_EXTENSION n -> y
   PAGE_OWNER n -> y
   PANIC_ON_OOPS n -> y
   PANIC_ON_OOPS_VALUE 0 -> 1
   PREEMPT y -> n
   PREEMPT_VOLUNTARY n -> y
   PRINTK_CALLER n -> y
   PTDUMP_DEBUGFS n -> y
   SCHED_STACK_END_CHECK n -> y
   SOFTLOCKUP_DETECTOR n -> y
   UBSAN n -> y
  +BOOTPARAM_HUNG_TASK_PANIC n
  +BOOTPARAM_HUNG_TASK_PANIC_VALUE 0
  +BOOTPARAM_SOFTLOCKUP_PANIC n
  +BOOTPARAM_SOFTLOCKUP_PANIC_VALUE 0
  +CC_HAS_UBSAN_BOUNDS y
  +CPUMASK_OFFSTACK n
  +DEBUG_KMEMLEAK_AUTO_SCAN y
  +DEBUG_KMEMLEAK_DEFAULT_OFF n
  +DEBUG_KMEMLEAK_MEM_POOL_SIZE 16000
  +DEBUG_KMEMLEAK_TEST n
  +DEBUG_KOBJECT_RELEASE n
  +DEBUG_OBJECTS_ENABLE_DEFAULT 1
  +DEBUG_OBJECTS_FREE y
  +DEBUG_OBJECTS_PERCPU_COUNTER y
  +DEBUG_OBJECTS_RCU_HEAD y
  +DEBUG_OBJECTS_SELFTEST n
  +DEBUG_OBJECTS_TIMERS y
  +DEBUG_OBJECTS_WORK y
  +DEBUG_VM_PGFLAGS y
  +DEBUG_VM_RB y
  +DEBUG_VM_VMACACHE y
  +DEFAULT_HUNG_TASK_TIMEOUT 120
  +LOCKUP_DETECTOR y
  +PTDUMP_CORE y
  +TEST_DEBUG_VIRTUAL n
  +TEST_UBSAN n
  +UBSAN_ALIGNMENT n
  +UBSAN_BOOL y
  +UBSAN_BOUNDS y
  +UBSAN_DIV_ZERO n
  +UBSAN_ENUM y
  +UBSAN_ONLY_BOUNDS y
  +UBSAN_SANITIZE_ALL y
  +UBSAN_SHIFT y
  +UBSAN_TRAP n
  +VMAP_STACK y

Hopefully, enabling some new features doesn't have bad impacts on the
tests like SLUB_DEBUG did.

Signed-off-by: Matthieu Baerts <[email protected]>
  • Loading branch information
matttbe committed Mar 2, 2022
1 parent a7b3196 commit d599eb4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,17 @@ gen_kconfig() { local mode kconfig=()

if [ "${mode}" = "debug" ]; then
kconfig+=(
-e KASAN -e KASAN_OUTLINE -d TEST_KASAN
-e PROVE_LOCKING -e DEBUG_LOCKDEP
-e PREEMPT -e DEBUG_PREEMPT
-e DEBUG_SLAVE -e DEBUG_PAGEALLOC -e DEBUG_MUTEXES -e DEBUG_SPINLOCK -e DEBUG_ATOMIC_SLEEP
-e PROVE_RCU -e DEBUG_OBJECTS_RCU_HEAD
-e NET_NS_REFCNT_TRACKER
-e DEBUG_KMEMLEAK -e DEBUG_KMEMLEAK_AUTO_SCAN -d DEBUG_KMEMLEAK_DEFAULT_OFF
-e NET_NS_REFCNT_TRACKER # useful for 'net' tests
-d SLUB_DEBUG_ON # perf impact is too important
)

_make_o defconfig debug.config
else
# low-overhead sampling-based memory safety error detector.
# Only in non-debug: KASAN is more precise
kconfig+=(-e KFENCE)

_make_o defconfig
fi

# Extra options needed for MPTCP KUnit tests
Expand Down Expand Up @@ -234,8 +233,6 @@ gen_kconfig() { local mode kconfig=()
# extra config
kconfig+=("${@}")

_make_o defconfig

# KBUILD_OUTPUT is used by virtme
"${VIRTME_CONFIGKERNEL}" --arch=x86_64 --update

Expand Down

0 comments on commit d599eb4

Please sign in to comment.