lkml.org 
[lkml]   [2011]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [may-be-patch?] introduce MODULE_USE_UNEXPORTED()
Date
On Tue, 19 Jul 2011 20:45:36 +0200, Oleg Nesterov <oleg@redhat.com> wrote:
> Hi.
>
> >From time to time I need to write a module for debugging purposes,
> and it is a bit annoying I can't simply use, say, put_task_struct().
>
> Can't we do something like the simple patch below? Of course, it
> is very unsafe to use kallsyms_lookup_name() by many reasons. But
> it looks handy for the testing/debugging.
>
> Yes, I am not saying this feature is terribly useful, so I agree
> in advance with the "go away, we don't need this hack" nack.
>
> Still, what do you think?
>
> Oleg.

I hate it, but I've wanted it too...

Can we bury it under a CONFIG_DEBUG_KERNEL option? I don't want
distributions turning this on. And add a GPL license check.

Alternative is to have a "void *khacker_lookup_sym(const char *)" which
does this at runtime, but that's less convenient to use than this.

Thanks,
Rusty.


\
 
 \ /
  Last update: 2011-07-21 11:37    [W:0.110 / U:0.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site