This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC -mm][PATCH 5/6] prepare kprobes code for x86 unification
Masami Hiramatsu wrote:
> Finally, I reproduced it by executing a command below:
> % stap -e 'probe kernel.function("migration_init"){}'
>
> And also, I found that oops occurred without my patch,
> and even more, it occurred with 2.6.24-rc4 on x86-64,
> but did not occurred with 2.6.23.8-34.fc7.
>
> We might find an unknown bug.
I compared both .config files and found that this bug
did not occur with CONFIG_RELOCATABLE=y.
I checked this with vanilla-2.6.23 on x86-64.
I also read the contents of the page which included migration_init().
It was filled by "0xcc"(POISON_FREE_INITMEM).
I think those freed pages are marked as freed and are not purged
from the pagetable when CONFIG_RELOCATABLE=y.
Anyway, probing those "__init" functions after the kernel freed it
is meaningless and even dangerous . I think kprobes should check it
and reject it when registering a probe.
Thank you,
-masami
>
> Thanks,
>
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@redhat.com, masami.hiramatsu.pt@hitachi.com