Re: [PATCH v3] init: Do not select DEBUG_KERNEL by default

From: Sinan Kaya
Date: Thu Apr 11 2019 - 14:15:41 EST


On 4/11/2019 1:48 AM, Masahiro Yamada wrote:
I was going by what Kconfig tells me

Symbol: KALLSYMS_ALL [=n]
Depends on: DEBUG_KERNEL [=n] && KALLSYMS [=y]
Lots of features have 'depends on DEBUG_KERNEL'.
What is special about KALLSYMS_ALL here?

I had to do some learning about KALLSYSM_ALL. Based on my limited
searching, KALLSYMS_ALL allows you to locate the symbol location
at runtime from the kernel.

Without KALLSYM_ALL, you can only locate the kernel code only. With
KALLSYMS_ALL, you can locate the symbols for any data structure
including kernel modules.

I'm not a KALLSYMS person but based on my search, I'd consider
KALLSYMS_ALL a debug feature as it is today.

kernel/kallsyms.c: else if (IS_ENABLED(CONFIG_KALLSYMS_ALL))
kernel/livepatch/Kconfig: depends on KALLSYMS_ALL
kernel/module.c:#ifdef CONFIG_KALLSYMS_ALL
kernel/module.c:#ifndef CONFIG_KALLSYMS_ALL

lib/Kconfig.debug: select KALLSYMS_ALL
config LOCKDEP
bool
depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
select KALLSYMS
select KALLSYMS_ALL

lib/Kconfig.debug: select KALLSYMS_ALL
config LATENCYTOP
bool "Latency measuring infrastructure"
select KALLSYMS
select KALLSYMS_ALL

scripts/link-vmlinux.sh: if [ -n "${CONFIG_KALLSYMS_ALL}" ]; then