aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kallsyms.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-12 18:44:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-12 19:01:23 -0800
commit516fb7f2e73dcc303fb97fc3593209fcacf2d982 (patch)
tree9ce9a22e13c85739215c9ceed067a15cd3210cb5 /kernel/kallsyms.c
parentmodules: make sysfs attribute files readable by owner only (diff)
downloadlinux-dev-516fb7f2e73dcc303fb97fc3593209fcacf2d982.tar.xz
linux-dev-516fb7f2e73dcc303fb97fc3593209fcacf2d982.zip
/proc/module: use the same logic as /proc/kallsyms for address exposure
The (alleged) users of the module addresses are the same: kernel profiling. So just expose the same helper and format macros, and unify the logic. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--kernel/kallsyms.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 51b49ed452e4..1e6ae66c6244 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -581,12 +581,6 @@ static void s_stop(struct seq_file *m, void *p)
{
}
-#ifndef CONFIG_64BIT
-# define KALLSYM_FMT "%08lx"
-#else
-# define KALLSYM_FMT "%016lx"
-#endif
-
static int s_show(struct seq_file *m, void *p)
{
unsigned long value;
@@ -640,7 +634,7 @@ static inline int kallsyms_for_perf(void)
* Otherwise, require CAP_SYSLOG (assuming kptr_restrict isn't set to
* block even that).
*/
-static int kallsyms_show_value(void)
+int kallsyms_show_value(void)
{
switch (kptr_restrict) {
case 0: