title: perf: Couldn't record kernel reference relocation symbol
body: <p>I have compiled <code>perf</code> for my kernel (3.11.10). During the compilation, some libraries were missing, so I have installed those.</p>
  <p>But now when I run <code>perf</code>, I get following message:</p>
  <pre><code>Couldn't record kernel reference relocation symbol
  Symbol resolution may be skewed if relocation was used (e.g. kexec).
  Check /proc/kallsyms permission or run as root.
  
  Kernel address maps (/proc/{kallsyms,modules}) were restricted.
  Check /proc/sys/kernel/kptr_restrict before running 'perf record'
  If some relocation was applied (e.g. kexec) symbols may be misresolved.
  Samples in kernel modules can't be resolved as well.
  </code></pre>
  <p>Since  I am using custom build kernel, the most obvious explanation to me is, that some option is missing from my kernel. If so, how can I find out what is missing?</p>
  <p><strong>I am not sure what exactly <code>perf</code> is complaining about. How can I fix this?</strong></p>
  <p><strong>EDIT:</strong></p>
  <p><code>/proc/kallsyms</code> does not exist and <code>/proc/sys/kernel/kptr_restrict</code> contains <code>0</code>:</p>
  <pre><code>$ cat /proc/sys/kernel/kptr_restrict
  0
  </code></pre>
  <p>I have compiled the kernel myself, and it is possible that it is missing some option. What is this <code>/proc/kallsyms</code> ? How can I enable it in my kernel?</p>