手機 - Motorola XT897 - Sailfish OS 4.4.0.68 - 解決Kernel address maps (/proc/{kallsyms,modules}) are restricted問題



參考資訊:
https://stackoverflow.com/questions/21284906/perf-couldnt-record-kernel-reference-relocation-symbol

問題如下:

$ ./record.sh 3420
    WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,
    check /proc/sys/kernel/kptr_restrict.

    Samples in kernel functions may not be resolved if a suitable vmlinux
    file is not found in the buildid cache or in the vmlinux path.

    Samples in kernel modules won't be resolved at all.

    If some relocation was applied (e.g. kexec) symbols may be misresolved
    even with a suitable vmlinux or kallsyms file.

解法如下:

$ devel-su
# echo 0 > /proc/sys/kernel/kptr_restrict