2009-06-22 21:00:48

by Masami Hiramatsu

[permalink] [raw]
Subject: [BUGFIX][ PATCH] 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.

Signed-off-by: Masami Hiramatsu <[email protected]>
Cc: Ananth N Mavinakayanahalli <[email protected]>
---

lib/Kconfig.debug | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 23067ab..661c675 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -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


--
Masami Hiramatsu

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

e-mail: [email protected]


2009-06-30 21:38:35

by Andrew Morton

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency

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.
>
> Signed-off-by: Masami Hiramatsu <[email protected]>
> Cc: Ananth N Mavinakayanahalli <[email protected]>
> ---
>
> lib/Kconfig.debug | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
> index 23067ab..661c675 100644
> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -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.

2009-06-30 21:41:28

by Linus Torvalds

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency



On Tue, 30 Jun 2009, Andrew Morton wrote:
>
> 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

2009-06-30 22:09:01

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency

Linus Torvalds wrote:
>
> On Tue, 30 Jun 2009, Andrew Morton wrote:
>> 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,


--
Masami Hiramatsu

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

e-mail: [email protected]

2009-06-30 23:17:25

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency

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?

Masami Hiramatsu wrote:
> Linus Torvalds wrote:
>> On Tue, 30 Jun 2009, Andrew Morton wrote:
>>> 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,
>
>

--
Masami Hiramatsu

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

e-mail: [email protected]

2009-06-30 23:24:27

by Ingo Molnar

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency


* Masami Hiramatsu <[email protected]> wrote:

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

maybe because i applied your fix already? ;-)

Ingo

2009-06-30 23:46:37

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency

Ingo Molnar wrote:
> * Masami Hiramatsu <[email protected]> wrote:
>
>> 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,

--
Masami Hiramatsu

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

e-mail: [email protected]

2009-07-01 00:07:07

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency

Masami Hiramatsu wrote:
> Ingo Molnar wrote:
>> * Masami Hiramatsu <[email protected]> wrote:
>>
>>> 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,

--
Masami Hiramatsu

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

e-mail: [email protected]

2009-07-01 08:43:22

by Ingo Molnar

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency


* Masami Hiramatsu <[email protected]> wrote:

> Masami Hiramatsu wrote:
> > Ingo Molnar wrote:
> >> * Masami Hiramatsu <[email protected]> wrote:
> >>
> >>> 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

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

2009-07-01 12:07:27

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [BUGFIX][ PATCH] kprobes: fix kprobe selftest configuration dependency

On 2009年07月01日 04:43, Ingo Molnar wrote:
> * Masami Hiramatsu <[email protected]> wrote:
>
>> Masami Hiramatsu wrote:
>>> Ingo Molnar wrote:
>>>> * Masami Hiramatsu <[email protected]> wrote:
>>>>
>>>>> 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
>
> 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!

--
Masami Hiramatsu

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

e-mail: [email protected]