• S
    bpf: enable stackmap with build_id in nmi context · bae77c5e
    Song Liu 提交于
    Currently, we cannot parse build_id in nmi context because of
    up_read(&current->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: NSong Liu <songliubraving@fb.com>
    Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
    bae77c5e
Kconfig 59.9 KB