lkml.org 
[lkml]   [2009]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 5/7] Ksplice: Add functions for walking kallsyms symbols
Date
On Saturday 06 December 2008 10:33:58 Jeff Arnold wrote:
> From: Anders Kaseorg <andersk@mit.edu>
>
> kallsyms_lookup_name only returns the first match that it finds. Ksplice
> needs information about all symbols with a given name in order to correctly
> resolve local symbols.
>
> kallsyms_on_each_symbol provides a generic mechanism for iterating over the
> kallsyms table.

Seems reasonable. Did you really not want a name-filtering version? That
might be generally useful.

> +/* Call a function on each kallsyms symbol in the core kernel */
> +int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
> + unsigned long),
> + void *data);

But does no locking at all. It either needs a comment that it can only be
called from inside stop_machine, or that it needs preempt disabled, or
whatever.

> +static inline int kallsyms_on_each_symbol(int (*fn)(void *, const char *,
> + struct module *,
> + unsigned long),
> + void *data)
> +{
> + return 0;
> +}

Is the !CONFIG_KALLSYMS version useful to you? If not, please don't
implement the noop version. I want someone who *does* expect it to work to
have to think about it if they use it...

Thanks,
Rusty.


\
 
 \ /
  Last update: 2009-02-04 12:33    [W:0.262 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site