Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1272468 > unrolled thread

Linux 4.3 kallsyms_lookup_name not returning per_cpu symbol values

Started byJeffrey Merkey <jeffmerkey@gmail.com>
First post2015-11-18 19:50 +0100
Last post2015-11-24 06:20 +0100
Articles 4 — 1 participant

Back to article view | Back to linux.kernel


Contents

  Linux 4.3 kallsyms_lookup_name not returning per_cpu symbol values Jeffrey Merkey <jeffmerkey@gmail.com> - 2015-11-18 19:50 +0100
    Re: Linux 4.3 kallsyms_lookup_name not returning per_cpu symbol values Jeffrey Merkey <jeffmerkey@gmail.com> - 2015-11-19 06:40 +0100
      Re: Linux 4.3 kallsyms_lookup_name not returning per_cpu symbol values Jeffrey Merkey <jeffmerkey@gmail.com> - 2015-11-19 06:50 +0100
    Re: Linux 4.3 kallsyms_lookup_name not returning per_cpu symbol values Jeffrey Merkey <jeffmerkey@gmail.com> - 2015-11-24 06:20 +0100

#1272468 — Linux 4.3 kallsyms_lookup_name not returning per_cpu symbol values

FromJeffrey Merkey <jeffmerkey@gmail.com>
Date2015-11-18 19:50 +0100
SubjectLinux 4.3 kallsyms_lookup_name not returning per_cpu symbol values
Message-ID<qwfXP-6Jq-7@gated-at.bofh.it>
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++))
          break;

       if (!iter->name[0])
	  continue;

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

       if (iter->module_name[0])
       {
          if (print("%0*lx %c %s [%s]\n", (int)(2*sizeof(void*)),
	      iter->value, iter->type, iter->name,
	      iter->module_name))
             return 1;
       }
       else
       {
          if (print("%0*lx %c %s\n", (int)(2*sizeof(void*)),
	      iter->value, iter->type, iter->name))
             return 1;
       }
    }
    return 0;
}
EXPORT_SYMBOL_GPL(mdb_kallsyms);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1272859

FromJeffrey Merkey <jeffmerkey@gmail.com>
Date2015-11-19 06:40 +0100
Message-ID<qwq6S-57A-9@gated-at.bofh.it>
In reply to#1272468
I tracked this down and it turns out to be a page mapping problem with
one of the sound drivers on the system trashing memory.   It's a bug,
but a bug in a vendor supplied driver.

Jeff

On 11/18/15, Jeffrey Merkey <jeffmerkey@gmail.com> wrote:
> 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++))
>           break;
>
>        if (!iter->name[0])
> 	  continue;
>
>        // if an exclusion search was specified, skip non-matching entries
>        if (str && *str && !strstr(iter->name, str))
>           continue;
>
>        if (iter->module_name[0])
>        {
>           if (print("%0*lx %c %s [%s]\n", (int)(2*sizeof(void*)),
> 	      iter->value, iter->type, iter->name,
> 	      iter->module_name))
>              return 1;
>        }
>        else
>        {
>           if (print("%0*lx %c %s\n", (int)(2*sizeof(void*)),
> 	      iter->value, iter->type, iter->name))
>              return 1;
>        }
>     }
>     return 0;
> }
> EXPORT_SYMBOL_GPL(mdb_kallsyms);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1272860

FromJeffrey Merkey <jeffmerkey@gmail.com>
Date2015-11-19 06:50 +0100
Message-ID<qwqgx-5bb-5@gated-at.bofh.it>
In reply to#1272859
Take that back, I just reproduced it again.  Seems to affect random
symbols not just per cpu.  I'll research some more.



On 11/18/15, Jeffrey Merkey <jeffmerkey@gmail.com> wrote:
> I tracked this down and it turns out to be a page mapping problem with
> one of the sound drivers on the system trashing memory.   It's a bug,
> but a bug in a vendor supplied driver.
>
> Jeff
>
> On 11/18/15, Jeffrey Merkey <jeffmerkey@gmail.com> wrote:
>> 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++))
>>           break;
>>
>>        if (!iter->name[0])
>> 	  continue;
>>
>>        // if an exclusion search was specified, skip non-matching entries
>>        if (str && *str && !strstr(iter->name, str))
>>           continue;
>>
>>        if (iter->module_name[0])
>>        {
>>           if (print("%0*lx %c %s [%s]\n", (int)(2*sizeof(void*)),
>> 	      iter->value, iter->type, iter->name,
>> 	      iter->module_name))
>>              return 1;
>>        }
>>        else
>>        {
>>           if (print("%0*lx %c %s\n", (int)(2*sizeof(void*)),
>> 	      iter->value, iter->type, iter->name))
>>              return 1;
>>        }
>>     }
>>     return 0;
>> }
>> EXPORT_SYMBOL_GPL(mdb_kallsyms);
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1276063

FromJeffrey Merkey <jeffmerkey@gmail.com>
Date2015-11-24 06:20 +0100
Message-ID<qyebg-3JI-5@gated-at.bofh.it>
In reply to#1272468
Got to the bottom of this one.  bug closed.

Jeff

On 11/18/15, Jeffrey Merkey <jeffmerkey@gmail.com> wrote:
> 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++))
>           break;
>
>        if (!iter->name[0])
> 	  continue;
>
>        // if an exclusion search was specified, skip non-matching entries
>        if (str && *str && !strstr(iter->name, str))
>           continue;
>
>        if (iter->module_name[0])
>        {
>           if (print("%0*lx %c %s [%s]\n", (int)(2*sizeof(void*)),
> 	      iter->value, iter->type, iter->name,
> 	      iter->module_name))
>              return 1;
>        }
>        else
>        {
>           if (print("%0*lx %c %s\n", (int)(2*sizeof(void*)),
> 	      iter->value, iter->type, iter->name))
>              return 1;
>        }
>     }
>     return 0;
> }
> EXPORT_SYMBOL_GPL(mdb_kallsyms);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web