Reading kallsyms in user mode

I am writing code about low-level materials. I need to know the addresses of the kernel characters to write reliable code. So I try to read kallsyms when im in user mode in the Ubuntu-3.0.19 kernel. and that kallsyms are displayed in user mode.

... 00000000 r __ksymtab_prepare_kernel_cred 00000000 r __kcrctab_prepare_kernel_cred 00000000 r __kstrtab_prepare_kernel_cred ...

How can I solve this problem in user mode. when they root and everything is fine, but that’s not what I need.

thank.

+5
source share
1 answer

Intentionally, that /proc/kallsymsshows zeros instead of real addresses for a non-root user. This slightly reduces the security risk.

. . , %pK s_show() kallsyms.c, s_show /proc/kallsyms.

, , root. System.map root. /proc/sys/kernel/kptr_restrict.

+8

All Articles