diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-12 18:44:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-12 19:01:23 -0800 |
commit | 516fb7f2e73dcc303fb97fc3593209fcacf2d982 (patch) | |
tree | 9ce9a22e13c85739215c9ceed067a15cd3210cb5 /include | |
parent | 277642dcca765a1955d4c753a5a315ff7f2eb09d (diff) | |
download | op-kernel-dev-516fb7f2e73dcc303fb97fc3593209fcacf2d982.zip op-kernel-dev-516fb7f2e73dcc303fb97fc3593209fcacf2d982.tar.gz |
/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 'include')
-rw-r--r-- | include/linux/kallsyms.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 11dd93e..0a777c5 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -14,6 +14,14 @@ #define KSYM_SYMBOL_LEN (sizeof("%s+%#lx/%#lx [%s]") + (KSYM_NAME_LEN - 1) + \ 2*(BITS_PER_LONG*3/10) + (MODULE_NAME_LEN - 1) + 1) +/* How and when do we show kallsyms values? */ +extern int kallsyms_show_value(void); +#ifndef CONFIG_64BIT +# define KALLSYM_FMT "%08lx" +#else +# define KALLSYM_FMT "%016lx" +#endif + struct module; #ifdef CONFIG_KALLSYMS |