[lkml]   [2015]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectLinux 4.3 kallsyms_lookup_name not returning per_cpu symbol values
kallsyms_lookup_name is not returning per_cpu symbols when called.
The symbols show up when you run something with the kallsyms_iter
struct but not through the regular interface. I have looked through
the code and I am not able to determine with certainty if its designed
this way or just busted. Any help with this would be appreciated.

The following code does display the per_cpu symbols, they just don't
seem to show up when called from kallsyms_lookup_name.

struct kallsym_iter mdb_iter;
int mdb_kallsyms(char *str, int (*print)(char *s, ...))
register loff_t pos = 0;
register struct kallsym_iter *iter = &mdb_iter;

if (!print)
return 0;

// set to beginning of the kallsyms list
reset_iter(iter, 0);
while (1)
// search the kallsyms list
if (!update_iter(iter, pos++))

if (!iter->name[0])

// if an exclusion search was specified, skip non-matching entries
if (str && *str && !strstr(iter->name, str))

if (iter->module_name[0])
if (print("%0*lx %c %s [%s]\n", (int)(2*sizeof(void*)),
iter->value, iter->type, iter->name,
return 1;
if (print("%0*lx %c %s\n", (int)(2*sizeof(void*)),
iter->value, iter->type, iter->name))
return 1;
return 0;

 \ /
  Last update: 2015-11-18 20:01    [W:0.036 / U:0.168 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site