]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] null-terminate over-long /proc/kallsyms symbols
authorAndreas Gruenbacher <agruen@suse.de>
Fri, 14 Jul 2006 07:24:04 +0000 (00:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 15 Jul 2006 04:53:52 +0000 (21:53 -0700)
commit7929899f89e18d835ab3a87ce4c59b1ab1041fb0
tree7fddd3a319c7607db2dd7082dcf3887c3e16b3c1
parent4791695e77015660024eba25ff9b8638db0ebe1f
[PATCH] null-terminate over-long /proc/kallsyms symbols

Got a customer bug report (https://bugzilla.novell.com/190296) about kernel
symbols longer than 127 characters which end up in a string buffer that is
not NULL terminated, leading to garbage in /proc/kallsyms.  Using strlcpy
prevents this from happening, even though such symbols still won't come out
right.

A better fix would be to not use a fixed-size buffer, but it's probably not
worth the trouble.  (Modversion'ed symbols even have a length limit of 60.)

[bunk@stusta.de: build fix]
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/module.h
kernel/kallsyms.c
kernel/module.c