lkml.org 
[lkml]   [2008]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 2.6.28-rc6-git1 -- BUG: unable to handle kernel paging request at ffff8800be8b0019
From
Date
On Thu, 2008-11-27 at 17:34 +0000, Hugh Dickins wrote:
> An alternative quick just-for-now fix might be to remove that
> namebuf[KSYM_NAME_LEN - 1] = 0;
> from kallsyms_lookup(): as I understand it (please check), that
> could only make sense in cases where the symbol is KSYM_NAME_LEN
> long or longer - in which case, all of the places fixed in the
> patch below would be causing corruption already, even without my
> patch. I think. Maybe that "= 0" even serves no purpose at all?

I looked into this and unfortunately that won't help us. For example,
module_address_lookup() will copy KSYM_NAME_LEN - 1 bytes to namebuf
anyway so we'll overflow the buffer.

It would probably be a good idea to add a comment to kallsyms_lookup()
stating that namebuf needs to have at least KSYM_NAME_LEN bytes
available.

Pekka



\
 
 \ /
  Last update: 2008-11-28 08:57    [W:0.123 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site