summaryrefslogtreecommitdiff
path: root/kernel/ksyms_common.c
diff options
context:
space:
mode:
authorManinder Singh <maninder1.s@samsung.com>2023-06-08 09:01:19 +0530
committerLuis Chamberlain <mcgrof@kernel.org>2023-06-08 12:27:20 -0700
commit0eeaf1eb40a34fddd1d568a9b32c3d6669238743 (patch)
tree3b35020719fdae8aad4401d0c476355eccb7e5a1 /kernel/ksyms_common.c
parentb06e9318bfd03f531b918bd27b63f1eb88c21729 (diff)
kallsyms: make kallsyms_show_value() as generic function
This change makes function kallsyms_show_value() as generic function without dependency on CONFIG_KALLSYMS. Now module address will be displayed with lsmod and /proc/modules. Earlier: ======= / # insmod test.ko / # lsmod test 12288 0 - Live 0x0000000000000000 (O) // No Module Load address / # With change: ========== / # insmod test.ko / # lsmod test 12288 0 - Live 0xffff800000fc0000 (O) // Module address / # cat /proc/modules test 12288 0 - Live 0xffff800000fc0000 (O) Co-developed-by: Onkarnath <onkarnath.1@samsung.com> Signed-off-by: Onkarnath <onkarnath.1@samsung.com> Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Zhen Lei <thunder.leizhen@huawei.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/ksyms_common.c')
-rw-r--r--kernel/ksyms_common.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/ksyms_common.c b/kernel/ksyms_common.c
index 3840fa1c9c86..cf1a73cbf2f6 100644
--- a/kernel/ksyms_common.c
+++ b/kernel/ksyms_common.c
@@ -6,7 +6,6 @@
#include <linux/kallsyms.h>
#include <linux/security.h>
-#ifdef CONFIG_KALLSYMS
static inline int kallsyms_for_perf(void)
{
#ifdef CONFIG_PERF_EVENTS
@@ -42,4 +41,3 @@ bool kallsyms_show_value(const struct cred *cred)
return false;
}
}
-#endif