Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [may-be-patch?] introduce MODULE_USE_UNEXPORTED() | Date | Thu, 21 Jul 2011 17:29:25 +0930 |
| |
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.
| |