手機 - Unihertz Titan (TEE-EMMC) - 解決/proc/kallsyms都是0的問題



參考資訊:
https://askubuntu.com/questions/307221/how-to-get-the-address-with-proc-kallsyms

問題如下:

    # cat /proc/kallsyms | head
    0000000000000000 T do_undefinstr
    0000000000000000 T _stext
    0000000000000000 T __exception_text_start
    0000000000000000 T do_sysinstr
    0000000000000000 T do_mem_abort
    0000000000000000 T do_el0_irq_bp_hardening
    0000000000000000 T do_el0_ia_bp_hardening
    0000000000000000 T do_sp_pc_abort
    0000000000000000 T do_debug_exception
    0000000000000000 t gic_handle_irq

解法如下:

# echo 0  > /proc/sys/kernel/kptr_restrict
# cat /proc/kallsyms | head
    ffffff8008081000 T do_undefinstr
    ffffff8008081000 T _stext
    ffffff8008081000 T __exception_text_start
    ffffff8008081480 T do_sysinstr
    ffffff8008081510 T do_mem_abort
    ffffff80080815d8 T do_el0_irq_bp_hardening
    ffffff8008081610 T do_el0_ia_bp_hardening
    ffffff8008081730 T do_sp_pc_abort
    ffffff800808187c T do_debug_exception
    ffffff80080819b4 t gic_handle_irq