Re: [PATCH v4] perf tools: perf_event_paranoid and kptr_restrict may crash on 'perf top'

2021-03-16 Thread Arnaldo Carvalho de Melo
Em Tue, Mar 16, 2021 at 09:24:53AM +0800, Jackie Liu escreveu: > After install the libelf-dev package and compiling perf, kptr_restrict=2 > and perf_event_paranoid=3 will cause perf top to crash, because the > value of /proc/kallsyms cannot be obtained, which leads to > info->jited_ksyms == NULL.

Re: [PATCH v4] perf tools: perf_event_paranoid and kptr_restrict may crash on 'perf top'

2021-03-16 Thread Jiri Olsa
On Tue, Mar 16, 2021 at 09:24:53AM +0800, Jackie Liu wrote: > After install the libelf-dev package and compiling perf, kptr_restrict=2 > and perf_event_paranoid=3 will cause perf top to crash, because the > value of /proc/kallsyms cannot be obtained, which leads to > info->jited_ksyms == NULL. In

[PATCH v4] perf tools: perf_event_paranoid and kptr_restrict may crash on 'perf top'

2021-03-15 Thread Jackie Liu
After install the libelf-dev package and compiling perf, kptr_restrict=2 and perf_event_paranoid=3 will cause perf top to crash, because the value of /proc/kallsyms cannot be obtained, which leads to info->jited_ksyms == NULL. In order to solve this problem, Add a judgment before use. v3->v4: Fix