Skip to contentSkip to conversation

kprobes: fix kprobe selftest configuration dependency

PATCH In review Masami Hiramatsu 4 participants 10 messages Jun 22, 2009 – Jul 1, 2009 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kprobes: fix kprobe selftest configuration dependency

Select CONFIG_KALLSYMS_ALL when CONFIG_KPROBES_SANITY_TEST=y. Kprobe selftest always fail without CONFIG_KALLSYMS_ALL=y, because kallsyms doesn't list up the target functions which are probed in this test.

Cc Ananth N Mavinakayanahalli <[email protected]>

---

 lib/Kconfig.debug |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/Kconfig.debug +1 -0
index 23067ab..661c675 100644
@@ -727,6 +727,7 @@ config KPROBES_SANITY_TEST
 	bool "Kprobes sanity tests"
 	depends on DEBUG_KERNEL
 	depends on KPROBES
+	select KALLSYMS_ALL
 	default n
 	help
 	  This option provides for testing basic kprobes functionality on
Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]
maintainer
#1 lore raw
Quoted 17 lines · On Mon, 22 Jun 2009 17:03:02 -0400 Masami Hiramatsu <[email protected]> wrote:

Select CONFIG_KALLSYMS_ALL when CONFIG_KPROBES_SANITY_TEST=y. Kprobe selftest always fail without CONFIG_KALLSYMS_ALL=y, because kallsyms doesn't list up the target functions which are probed in this test.

Cc Ananth N Mavinakayanahalli <[email protected]>

---

 lib/Kconfig.debug |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
lib/Kconfig.debug +0 -0
index 23067ab..661c675 100644

lib/Kconfig.debug config KPROBES_SANITY_TEST · line 733

Quoted 7 lines
lib/Kconfig.debug +1 -0
@@ -727,6 +727,7 @@ config KPROBES_SANITY_TEST
 	bool "Kprobes sanity tests"
 	depends on DEBUG_KERNEL
 	depends on KPROBES
+	select KALLSYMS_ALL
 	default n
 	help
 	  This option provides for testing basic kprobes functionality on

KALLSYMS_ALL depends on KALLSYMS, so what happens here if KALLSYMS=n?

Ah, KPROBES depends on KALLSYMS, so that problem won't be occurring.

Still, the end result is significently more complex and fragile than a `depends on' would have been. But I suppose we've done worse. Oh well.

#2 lore raw
Quoted 3 lines · Andrew Morton

Still, the end result is significently more complex and fragile than a `depends on' would have been. But I suppose we've done worse. Oh well.

Couldn't we just limit the selftest to a set of symbols that doesn't require the "all" part?

Linus

#3 lore raw
Quoted 7 lines · Linus Torvalds
Quoted 2 lines · Andrew Morton

Still, the end result is significently more complex and fragile than a `depends on' would have been. But I suppose we've done worse. Oh well.

Couldn't we just limit the selftest to a set of symbols that doesn't require the "all" part?

OK. I'll try it.

Thank you,

Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]
#4 lore raw

Oops, I couldn't reproduce this bug on the latest -tip tree. I'll need to dig it deeper. Andew, and Ingo, could you please drop it?

Quoted 12 lines · Masami Hiramatsu
Quoted 5 lines · Linus Torvalds
Quoted 2 lines · Andrew Morton

Still, the end result is significently more complex and fragile than a `depends on' would have been. But I suppose we've done worse. Oh well.

Couldn't we just limit the selftest to a set of symbols that doesn't require the "all" part?

OK. I'll try it.

Thank you,

Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]
#5 lore raw
Quoted 1 line · Masami Hiramatsu

Oops, I couldn't reproduce this bug on the latest -tip tree.

maybe because i applied your fix already? ;-)

Ingo

#6 lore raw
Quoted 5 lines · Ingo Molnar
Quoted 1 line · Masami Hiramatsu

Oops, I couldn't reproduce this bug on the latest -tip tree.

maybe because i applied your fix already? ;-)

If so, I'll be happy. But I reverted that change and checked :-( Maybe, that came from a combination of configs (but I've lost it...)

Thanks,

Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]
#7 lore raw
Quoted 8 lines · Masami Hiramatsu
Quoted 4 lines · Ingo Molnar
Quoted 1 line · Masami Hiramatsu

Oops, I couldn't reproduce this bug on the latest -tip tree.

maybe because i applied your fix already? ;-)

If so, I'll be happy. But I reverted that change and checked :-( Maybe, that came from a combination of configs (but I've lost it...)

Ok, I found.
Sorry, the problem has been fixed with below commit...

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ac6ca5c86c63dd95acc6a34dff8d33c23b703a37

Thanks,

Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]
#8 lore raw
Quoted 7 lines · Masami Hiramatsu
Quoted 6 lines · Masami Hiramatsu
Quoted 4 lines · Ingo Molnar
Quoted 1 line · Masami Hiramatsu

Oops, I couldn't reproduce this bug on the latest -tip tree.

maybe because i applied your fix already? ;-)

Quoted 7 lines
Quoted 2 lines

If so, I'll be happy. But I reverted that change and checked :-( Maybe, that came from a combination of configs (but I've lost it...)

Ok, I found.
Sorry, the problem has been fixed with below commit...

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ac6ca5c86c63dd95acc6a34dff8d33c23b703a37

thx - i thus dropped this:

130c5b2 kprobes: Fix kprobe selftest configuration dependency

Kept the other two patches - one for tracing/urgent (for .31), the other for tracing/core (.32). Agreed?

Ingo

#9 lore raw
Quoted 13 lines · Ingo Molnar
Quoted 11 lines · Masami Hiramatsu
Quoted 7 lines · Masami Hiramatsu
Quoted 4 lines · Ingo Molnar
Quoted 1 line · Masami Hiramatsu

Oops, I couldn't reproduce this bug on the latest -tip tree.

maybe because i applied your fix already? ;-)

If so, I'll be happy. But I reverted that change and checked :-( Maybe, that came from a combination of configs (but I've lost it...)

Ok, I found.
Sorry, the problem has been fixed with below commit...

Quoted 8 lines
Quoted 1 line

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ac6ca5c86c63dd95acc6a34dff8d33c23b703a37

thx - i thus dropped this:

130c5b2 kprobes: Fix kprobe selftest configuration dependency

Kept the other two patches - one for tracing/urgent (for .31), the other for tracing/core (.32). Agreed?

Yes, I agreed. :-)

Thanks!

Signature · 7 lines
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]