optprobes: fix kconfig depends/selects
PATCH 1/1 optprobes: fix kconfig depends/selects
From: Randy Dunlap <[email protected]>
KALLSYMS and KALLSYMS_ALL depend on DEBUG_KERNEL, so add that dependency. KALLSYMS_ALL depends on KALLSYMS, so select both of them, not just KALLSYMS_ALL.
warning: (OPTPROBES && KPROBES && HAVE_OPTPROBES && !PREEMPT || MTD_UBI_DEBUG && MTD && SYSFS && MTD_UBI || UBIFS_FS_DEBUG && MISC_FILESYSTEMS && UBIFS_FS || LOCKDEP && DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT || LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects KALLSYMS_ALL which has unmet direct dependencies (DEBUG_KERNEL && KALLSYMS)
--- arch/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/Kconfig +2 -0
@@ -45,6 +45,8 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT + depends on DEBUG_KERNEL + select KALLSYMS select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS
Quoted 4 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.
Indeed, Thanks for pointing it!
Quoted 23 lines
warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc Ananth N Mavinakayanahalli <[email protected]>Cc Anil S Keshavamurthy <[email protected]>Cc "David S. Miller" <[email protected]>Cc Masami Hiramatsu <[email protected]>--- arch/Kconfig | 2 ++ 1 file changed, 2 insertions(+)arch/Kconfig +2
-0@@ -45,6 +45,8 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT + depends on DEBUG_KERNEL + select KALLSYMS select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS
Masami Hiramatsu
Acked-byQuoted 9 lines · Masami Hiramatsu
Quoted 4 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.Indeed, Thanks for pointing it!
Signed-off-by Masami Hiramatsu <[email protected]>
Oops, I meant;
Sorry:(
Quoted 25 lines
Quoted 23 lines
warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc Ananth N Mavinakayanahalli <[email protected]>Cc Anil S Keshavamurthy <[email protected]>Cc "David S. Miller" <[email protected]>Cc Masami Hiramatsu <[email protected]>--- arch/Kconfig | 2 ++ 1 file changed, 2 insertions(+)arch/Kconfig +2
-0@@ -45,6 +45,8 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT + depends on DEBUG_KERNEL + select KALLSYMS select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS
Quoted 26 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc Ananth N Mavinakayanahalli <[email protected]>Cc Anil S Keshavamurthy <[email protected]>Cc "David S. Miller" <[email protected]>Cc Masami Hiramatsu <[email protected]>---
arch/Kconfig | 2 ++1 file changed, 2 insertions(+)arch/Kconfig +0
-0@@ -45,6 +45,8 @@ config OPTPROBESdef_bool y
depends on KPROBES &&HAVE_OPTPROBES
depends on !PREEMPT
+ depends onDEBUG_KERNEL
+ select KALLSYMS
selectKALLSYMS_ALL
Quoted 2 lines
config
HAVE_EFFICIENT_UNALIGNED_ACCESS
--
This causes another problem:
arch/Kconfig:33:error: recursive dependency detected!arch/Kconfig:33: symbol KPROBES depends on KALLSYMS
init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBESarch/Kconfig:44: symbol OPTPROBES depends on KPROBES
The 'select KALLSYMS' is redundant.
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Signature · 1 line
Felipe Contreras
Quoted 32 lines · Felipe Contreras
Quoted 19 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Anil S Keshavamurthy <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Masami Hiramatsu <[email protected]> --- arch/Kconfig | 2 ++ 1 file changed, 2 insertions(+)arch/Kconfig config OPTPROBES
Quoted 9 lines
arch/Kconfig +2
-1@@ -45,6 +45,8 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT + depends on DEBUG_KERNEL + select KALLSYMS select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS --This causes another problem:
Quoted 8 lines
arch/Kconfig:33:error: recursive dependency detected!
arch/Kconfig:33: symbol KPROBES depends on KALLSYMS
init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBESarch/Kconfig:44: symbol OPTPROBES depends on KPROBESThe 'select KALLSYMS' is redundant.
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Thanks for checking. I saw this problem just a day or two ago myself.
Dropping the select does not eliminate the kconfig warning. I'll try something else.
Signature · 2 lines
~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 38 lines · Randy Dunlap
Quoted 37 lines · Felipe Contreras
Quoted 26 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc Ananth N Mavinakayanahalli <[email protected]>Cc Anil S Keshavamurthy <[email protected]>Cc "David S. Miller" <[email protected]>Cc Masami Hiramatsu <[email protected]>---
arch/Kconfig | 2 ++1 file changed, 2 insertions(+)arch/Kconfig +0
-0@@ -45,6 +45,8 @@ config OPTPROBESdef_bool y
depends on KPROBES &&HAVE_OPTPROBES
depends on !PREEMPT
+ depends onDEBUG_KERNEL
+ select KALLSYMS
selectKALLSYMS_ALLQuoted 2 lines
config
HAVE_EFFICIENT_UNALIGNED_ACCESS
--This causes another problem:
arch/Kconfig:33:error: recursive dependency detected!
arch/Kconfig:33: symbol KPROBES depends on KALLSYMS init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBESarch/Kconfig:44: symbol OPTPROBES depends on KPROBES
Quoted 8 lines
Quoted 3 lines
The 'select KALLSYMS' is redundant.
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Thanks for checking. I saw this problem just a day or two ago myself.
Dropping the select does not eliminate the kconfig warning. I'll try something else.
Huh? The original warning is gone by just adding 'depends on DEBUG_KERNEL'.
Signature · 1 line
Felipe Contreras
Quoted 41 lines · On Sun, 12 Sep 2010 21:41:07 +0300 Felipe Contreras wrote:
Quoted 40 lines · Randy Dunlap
Quoted 39 lines · Felipe Contreras
Quoted 26 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc Ananth N Mavinakayanahalli <[email protected]>Cc Anil S Keshavamurthy <[email protected]>Cc "David S. Miller" <[email protected]>Cc Masami Hiramatsu <[email protected]>---
arch/Kconfig | 2 ++1 file changed, 2 insertions(+)arch/Kconfig +0
-0@@ -45,6 +45,8 @@ config OPTPROBESdef_bool y
depends on KPROBES &&HAVE_OPTPROBES
depends on !PREEMPT
+ depends onDEBUG_KERNEL
+ select KALLSYMS
selectKALLSYMS_ALLQuoted 2 lines
config
HAVE_EFFICIENT_UNALIGNED_ACCESS
--This causes another problem:
arch/Kconfig:33:error: recursive dependency detected!
arch/Kconfig:33: symbol KPROBES depends on KALLSYMS init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBESarch/Kconfig:44: symbol OPTPROBES depends on KPROBESThe 'select KALLSYMS' is redundant.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Thanks for checking. I saw this problem just a day or two ago myself.
Dropping the select does not eliminate the kconfig warning. I'll try something else.
Huh? The original warning is gone by just adding 'depends on
DEBUG_KERNEL'.
not so in my testing.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Quoted 32 lines · Felipe Contreras
Quoted 19 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Anil S Keshavamurthy <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Masami Hiramatsu <[email protected]> --- arch/Kconfig | 2 ++ 1 file changed, 2 insertions(+)arch/Kconfig config OPTPROBES
Quoted 9 lines
arch/Kconfig +2
-1@@ -45,6 +45,8 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT + depends on DEBUG_KERNEL + select KALLSYMS select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS --This causes another problem:
Quoted 9 lines
arch/Kconfig:33:error: recursive dependency detected!
arch/Kconfig:33: symbol KPROBES depends on KALLSYMS
init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBESarch/Kconfig:44: symbol OPTPROBES depends on KPROBESThe 'select KALLSYMS' is redundant.
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Thanks, let me clear the dependency;
Kprobes uses kallsyms_lookup for finding target function and checking instruction boundary, thus CONFIG_KPROBES should select CONFIG_KALLSYMS and CONFIG_KALLSYMS_ALL.
Optprobe is a optional feature which is supported on x86 arch, and it also uses kallsyms_lookup for checking instructions in the target function. Anyway, since optprobe itself is depends on kprobes, it doesn't need to select both of KALLSYMS/KALLSYMS_ALL.
Thank you,
Signature · 4 lines
Masami HIRAMATSU 2nd Dept. Linux Technology Center Hitachi, Ltd., Systems Development Laboratory E-mail: [email protected]
Quoted 43 lines · Masami Hiramatsu
Quoted 32 lines · Felipe Contreras
Quoted 19 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Anil S Keshavamurthy <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Masami Hiramatsu <[email protected]> --- arch/Kconfig | 2 ++ 1 file changed, 2 insertions(+)arch/Kconfig config OPTPROBES
Quoted 9 lines
arch/Kconfig +2
-1@@ -45,6 +45,8 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT + depends on DEBUG_KERNEL + select KALLSYMS select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS --This causes another problem:
Quoted 9 lines
arch/Kconfig:33:error: recursive dependency detected!
arch/Kconfig:33: symbol KPROBES depends on KALLSYMS
init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBESarch/Kconfig:44: symbol OPTPROBES depends on KPROBESThe 'select KALLSYMS' is redundant.
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Quoted 8 lines
Thanks, let me clear the dependency;
Kprobes useskallsyms_lookupfor finding target function and checking instruction boundary, thusCONFIG_KPROBESshould selectCONFIG_KALLSYMSandCONFIG_KALLSYMS_ALL.
Optprobe is a optional feature which is supported on x86 arch, and it also useskallsyms_lookupfor checking instructions in the target function. Anyway, since optprobe itself is depends on kprobes, it doesn't need to select both of KALLSYMS/KALLSYMS_ALL.
Hmm, wait, I might misunderstand something here. I thought KALLSYMS_ALL added symbols of static functions.
But, does KALLSYMS_ALL just add symbols of variables? If so, both of KPROBES and OPTPROBES require only KALLSYMS. It means that they don't need to care about CONFIG_DEBUG_KERNEL.
Thank you,
Signature · 4 lines
Masami HIRAMATSU 2nd Dept. Linux Technology Center Hitachi, Ltd., Systems Development Laboratory E-mail: [email protected]
Quoted 53 lines · Masami Hiramatsu
Quoted 43 lines · Masami Hiramatsu
Quoted 32 lines · Felipe Contreras
Quoted 26 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc Ananth N Mavinakayanahalli <[email protected]>Cc Anil S Keshavamurthy <[email protected]>Cc "David S. Miller" <[email protected]>Cc Masami Hiramatsu <[email protected]>---
arch/Kconfig | 2 ++1 file changed, 2 insertions(+)arch/Kconfig +0
-0@@ -45,6 +45,8 @@ config OPTPROBESdef_bool y
depends on KPROBES &&HAVE_OPTPROBES
depends on !PREEMPT
+ depends onDEBUG_KERNEL
+ select KALLSYMS
selectKALLSYMS_ALLQuoted 2 lines
config
HAVE_EFFICIENT_UNALIGNED_ACCESS
--This causes another problem:
Quoted 9 lines
arch/Kconfig:33:error: recursive dependency detected!
arch/Kconfig:33: symbol KPROBES depends on KALLSYMS init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBESarch/Kconfig:44: symbol OPTPROBES depends on KPROBESThe 'select KALLSYMS' is redundant.
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Quoted 8 lines
Thanks, let me clear the dependency;
Kprobes useskallsyms_lookupfor finding target function and checking instruction boundary, thusCONFIG_KPROBESshould selectCONFIG_KALLSYMSandCONFIG_KALLSYMS_ALL.
Optprobe is a optional feature which is supported on x86 arch, and it also useskallsyms_lookupfor checking instructions in the target function. Anyway, since optprobe itself is depends on kprobes, it doesn't need to select both of KALLSYMS/KALLSYMS_ALL.
Quoted 5 lines
Hmm, wait, I might misunderstand something here. I thought
KALLSYMS_ALLadded symbols of static functions.
But, doesKALLSYMS_ALLjust add symbols of variables? If so, both of KPROBES and OPTPROBES require only KALLSYMS. It means that they don't need to care aboutCONFIG_DEBUG_KERNEL.
So:
- select KALLSYMS_ALL
+ depends on KALLSYMS_ALL
Because KALLSYMS_ALL depends on DEBUG_KERNEL && KALLSYMS.
Signature · 1 line
Felipe Contreras
Quoted 65 lines · Felipe Contreras
Quoted 53 lines · Masami Hiramatsu
Quoted 43 lines · Masami Hiramatsu
Quoted 32 lines · Felipe Contreras
Quoted 19 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Anil S Keshavamurthy <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Masami Hiramatsu <[email protected]> --- arch/Kconfig | 2 ++ 1 file changed, 2 insertions(+)arch/Kconfig config OPTPROBES
Quoted 9 lines
arch/Kconfig +2
-1@@ -45,6 +45,8 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT + depends on DEBUG_KERNEL + select KALLSYMS select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS --This causes another problem:
Quoted 9 lines
arch/Kconfig:33:error: recursive dependency detected!
arch/Kconfig:33: symbol KPROBES depends on KALLSYMS init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBES arch/Kconfig:44: symbol OPTPROBES depends on KPROBESThe 'select KALLSYMS' is redundant.
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Quoted 8 lines
Thanks, let me clear the dependency;
Kprobes useskallsyms_lookupfor finding target function and checking instruction boundary, thusCONFIG_KPROBESshould selectCONFIG_KALLSYMSandCONFIG_KALLSYMS_ALL.
Optprobe is a optional feature which is supported on x86 arch, and it also useskallsyms_lookupfor checking instructions in the target function. Anyway, since optprobe itself is depends on kprobes, it doesn't need to select both of KALLSYMS/KALLSYMS_ALL.Quoted 5 lines
Hmm, wait, I might misunderstand something here. I thought
KALLSYMS_ALLadded symbols of static functions.
But, doesKALLSYMS_ALLjust add symbols of variables? If so, both of KPROBES and OPTPROBES require only KALLSYMS. It means that they don't need to care aboutCONFIG_DEBUG_KERNEL.So:
(quoted diff) +1
-1- select KALLSYMS_ALL + depends on KALLSYMS_ALL
Quoted 1 line
Because
KALLSYMS_ALLdepends onDEBUG_KERNEL&& KALLSYMS.
No, what I meant is;
- select KALLSYMS_ALL
:-)
Signature · 4 lines
Masami HIRAMATSU 2nd Dept. Linux Technology Center Hitachi, Ltd., Systems Development Laboratory E-mail: [email protected]
Quoted 66 lines · Masami Hiramatsu
Quoted 65 lines · Felipe Contreras
Quoted 53 lines · Masami Hiramatsu
Quoted 43 lines · Masami Hiramatsu
Quoted 32 lines · Felipe Contreras
Quoted 26 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
KALLSYMS and
KALLSYMS_ALLdepend onDEBUG_KERNEL, so add that dependency.KALLSYMS_ALLdepends on KALLSYMS, so select both of them, not justKALLSYMS_ALL.warning: (OPTPROBES && KPROBES &&
HAVE_OPTPROBES&& !PREEMPT ||MTD_UBI_DEBUG&& MTD && SYSFS &&MTD_UBI||UBIFS_FS_DEBUG&&MISC_FILESYSTEMS&&UBIFS_FS|| LOCKDEP &&DEBUG_KERNEL&&TRACE_IRQFLAGS_SUPPORT&&STACKTRACE_SUPPORT&&LOCKDEP_SUPPORT|| LATENCYTOP &&HAVE_LATENCYTOP_SUPPORT) selectsKALLSYMS_ALLwhich has unmet direct dependencies (DEBUG_KERNEL&& KALLSYMS)Signed-off-by Randy Dunlap <[email protected]>Cc Ananth N Mavinakayanahalli <[email protected]>Cc Anil S Keshavamurthy <[email protected]>Cc "David S. Miller" <[email protected]>Cc Masami Hiramatsu <[email protected]>---
arch/Kconfig | 2 ++1 file changed, 2 insertions(+)arch/Kconfig +0
-0@@ -45,6 +45,8 @@ config OPTPROBESdef_bool y
depends on KPROBES &&HAVE_OPTPROBES
depends on !PREEMPT
+ depends onDEBUG_KERNEL
+ select KALLSYMS
selectKALLSYMS_ALLQuoted 2 lines
config
HAVE_EFFICIENT_UNALIGNED_ACCESS
--This causes another problem:
Quoted 9 lines
arch/Kconfig:33:error: recursive dependency detected!
arch/Kconfig:33: symbol KPROBES depends on KALLSYMS init/Kconfig:825: symbol KALLSYMS is selected by OPTPROBESarch/Kconfig:44: symbol OPTPROBES depends on KPROBESThe 'select KALLSYMS' is redundant.
Otherwise: Signed-off-by: Felipe Contreras <[email protected]>
Quoted 8 lines
Thanks, let me clear the dependency;
Kprobes useskallsyms_lookupfor finding target function and checking instruction boundary, thusCONFIG_KPROBESshould selectCONFIG_KALLSYMSandCONFIG_KALLSYMS_ALL.
Optprobe is a optional feature which is supported on x86 arch, and it also useskallsyms_lookupfor checking instructions in the target function. Anyway, since optprobe itself is depends on kprobes, it doesn't need to select both of KALLSYMS/KALLSYMS_ALL.Quoted 5 lines
Hmm, wait, I might misunderstand something here. I thought
KALLSYMS_ALLadded symbols of static functions.
But, doesKALLSYMS_ALLjust add symbols of variables? If so, both of KPROBES and OPTPROBES require only KALLSYMS. It means that they don't need to care aboutCONFIG_DEBUG_KERNEL.So:
- selectKALLSYMS_ALL
+ depends onKALLSYMS_ALL
Quoted 6 lines
Quoted 1 line
Because
KALLSYMS_ALLdepends onDEBUG_KERNEL&& KALLSYMS.No, what I meant is;
- selectKALLSYMS_ALL:-)
Ohh, I didn't notice the _ALL. Makes sense.
Signature · 1 line
Felipe Contreras
PATCH 1/1 kprobes: Fix Kconfig dependency
In reply to Masami HiramatsuFix Kconfig dependency among Kprobes, optprobe and kallsyms.
Kprobes uses kallsyms_lookup for finding target function and checking instruction boundary, thus CONFIG_KPROBES should select CONFIG_KALLSYMS.
Optprobe is an optional feature which is supported on x86 arch, and it also uses kallsyms_lookup for checking instructions in the target function. Since KALLSYMS_ALL just adds symbols of kernel variables, it doesn't need to select KALLSYMS_ALL.
---
arch/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/Kconfig +2 -2
@@ -32,8 +32,9 @@ config HAVE_OPROFILE config KPROBES bool "Kprobes" - depends on KALLSYMS && MODULES + depends on MODULES depends on HAVE_KPROBES + select KALLSYMS help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes
@@ -45,7 +46,6 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT - select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS bool
Re: [PATCH -next,-tip ] kprobes: Fix Kconfig dependency
Quoted 41 lines · Masami Hiramatsu
Fix
Kconfigdependency among Kprobes, optprobe and kallsyms.Kprobes uses
kallsyms_lookupfor finding target function and checking instruction boundary, thusCONFIG_KPROBESshould selectCONFIG_KALLSYMS.Optprobe is an optional feature which is supported on x86 arch, and it also uses
kallsyms_lookupfor checking instructions in the target function. SinceKALLSYMS_ALLjust adds symbols of kernel variables, it doesn't need to selectKALLSYMS_ALL.Signed-off-by Masami Hiramatsu <[email protected]>Cc Felipe Contreras <[email protected]>Cc Randy Dunlap <[email protected]>,Cc Ananth N Mavinakayanahalli <[email protected]>,Cc Anil S Keshavamurthy <[email protected]>,Cc "David S. Miller" <[email protected]>,Cc akpm <[email protected]>---
arch/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)arch/Kconfig +2
-1@@ -32,8 +32,9 @@ config HAVE_OPROFILE config KPROBES bool "Kprobes" - depends on KALLSYMS && MODULES + depends on MODULES depends on HAVE_KPROBES + select KALLSYMS help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes
arch/Kconfig config OPTPROBES · line 51
Quoted 7 lines
arch/Kconfig +0
-1@@ -45,7 +46,6 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT - select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS bool
Fixes the kconfig dependency problem. Thanks.
Signature · 2 lines
~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***
[tip:perf/urgent] kprobes: Fix Kconfig dependency
In reply to Masami HiramatsuCommit-ID: 05ed160e89baf7f5fb3432d527fec467d2493626 Gitweb: http://git.kernel.org/tip/05ed160e89baf7f5fb3432d527fec467d2493626 Author: Masami Hiramatsu <[email protected]> AuthorDate: Mon, 13 Sep 2010 19:25:41 +0900 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 13 Sep 2010 20:41:31 +0200
kprobes: Fix Kconfig dependency
Fix Kconfig dependency among Kprobes, optprobe and kallsyms.
Kprobes uses kallsyms_lookup for finding target function and checking instruction boundary, thus CONFIG_KPROBES should select CONFIG_KALLSYMS.
Optprobe is an optional feature which is supported on x86 arch, and it also uses kallsyms_lookup for checking instructions in the target function. Since KALLSYMS_ALL just adds symbols of kernel variables, it doesn't need to select KALLSYMS_ALL.
LKML-Reference: <[email protected]>
--- arch/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/Kconfig +2 -2
@@ -32,8 +32,9 @@ config HAVE_OPROFILE config KPROBES bool "Kprobes" - depends on KALLSYMS && MODULES + depends on MODULES depends on HAVE_KPROBES + select KALLSYMS help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes
@@ -45,7 +46,6 @@ config OPTPROBES def_bool y depends on KPROBES && HAVE_OPTPROBES depends on !PREEMPT - select KALLSYMS_ALL config HAVE_EFFICIENT_UNALIGNED_ACCESS bool