lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 10 Oct 2006 20:06:41 +0100
From:	Paulo Marques <pmarques@...popie.com>
To:	Adam Jerome <abj@...ell.com>
CC:	linux-kernel@...r.kernel.org, Akpm@...l.org,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PATCH 002/001] /kernel: /proc/kallsyms reports lower-case	types
 for some non-exported symbols       (Resend #1)

Adam Jerome wrote:
> This patch addresses incorrect symbol type information reported through /proc/kallsyms.
> A lowercase character should designate the symbol as local (or non-exported).  An
> uppercase character should designate the symbol as global (or external). Without this
> patch, some non-exported symbols are incorrectly assigned an upper-case designation in
> /proc/kallsyms.  This patch corrects this condition by converting non-exported symbols
> types to lower case when appropriate and eliminates the superfluous upcase_if_global
> function

After looking at this patch I thought "this is all wrong: we should fix 
this at build time and not at run-time". The module infrastructure is a 
little hard to follow, though (Rusty CC'ed).

Anyway, it looks like doing the case correction in add_kallsyms should 
at least avoid the "is_exported" call at every module symbol at every 
"cat /proc/kallsyms". It would be done only once at module loading 
(doing it at build time would be even better, though).

"is_exported" does a linear search inside the symbols of one module, so 
the time it takes to "cat" all the symbols in a module grows O(N^2). 
Although there aren't that many symbols in each module, a quick grep 
shows that "usbcore", for instance, has 876 symbols in /proc/kallsyms.

The st_info field seems to be used only to display the type in 
"/proc/kallsyms" and in mod_find_symname to ignore undefined symbols 
(this would have to be adjusted if the case of the 'U' symbol is changed).

This has actually very little to do with the patch in question, because 
this behavior was already in place before the patch. Maybe some 
benchmarks of "cat /proc/kallsyms" with both the is_exported call and 
without it can show if this really matters in the end.

-- 
Paulo Marques - www.grupopie.com

"The face of a child can say it all, especially the
mouth part of the face."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ