diff options
author | Song Liu <songliubraving@fb.com> | 2018-05-07 13:50:48 -0400 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-14 17:29:45 -0400 |
commit | bae77c5eb5b2107e300fb02da2311f2aa0d8ee3c (patch) | |
tree | 54161e53098e6b684e7eb03bab0082626f0307fe /init | |
parent | a84880ef4352c61896028448d809e32f8646628d (diff) |
bpf: enable stackmap with build_id in nmi context
Currently, we cannot parse build_id in nmi context because of
up_read(¤t->mm->mmap_sem), this makes stackmap with build_id
less useful. This patch enables parsing build_id in nmi by putting
the up_read() call in irq_work. To avoid memory allocation in nmi
context, we use per cpu variable for the irq_work. As a result, only
one irq_work per cpu is allowed. If the irq_work is in-use, we
fallback to only report ips.
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index f013afc74b11..480a4f2713d9 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -1391,6 +1391,7 @@ config BPF_SYSCALL | |||
1391 | bool "Enable bpf() system call" | 1391 | bool "Enable bpf() system call" |
1392 | select ANON_INODES | 1392 | select ANON_INODES |
1393 | select BPF | 1393 | select BPF |
1394 | select IRQ_WORK | ||
1394 | default n | 1395 | default n |
1395 | help | 1396 | help |
1396 | Enable the bpf() system call that allows to manipulate eBPF | 1397 | Enable the bpf() system call that allows to manipulate eBPF |