Messages in this thread | | | Subject | Re: 2.6.28-rc6-git1 -- BUG: unable to handle kernel paging request at ffff8800be8b0019 | From | Pekka Enberg <> | Date | Fri, 28 Nov 2008 09:56:50 +0200 |
| |
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
| |