From: Alexei Starovoitov Date: Wed, 1 Jul 2020 15:22:09 +0000 (-0700) Subject: Merge branch 'bpf_get_task_stack' X-Git-Tag: v5.10.7~1943^2~344^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64f0013c073a0162a6bd31b33def10cb2b2fe6e0;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'bpf_get_task_stack' Song Liu says: ==================== This set introduces a new helper bpf_get_task_stack(). The primary use case is to dump all /proc/*/stack to seq_file via bpf_iter__task. A few different approaches have been explored and compared: 1. A simple wrapper around stack_trace_save_tsk(), as v1 [1]. This approach introduces new syntax, which is different to existing helper bpf_get_stack(). Therefore, this is not ideal. 2. Extend get_perf_callchain() to support "task" as argument. This approach reuses most of bpf_get_stack(). However, extending get_perf_callchain() requires non-trivial changes to architecture specific code. Which is error prone. 3. Current (v2) approach, leverages most of existing bpf_get_stack(), and uses stack_trace_save_tsk() to handle architecture specific logic. [1] https://lore.kernel.org/netdev/20200623070802.2310018-1-songliubraving@fb.com/ Changes v4 => v5: 1. Rebase and work around git-am issue. (Alexei) 2. Update commit log for 4/4. (Yonghong) Changes v3 => v4: 1. Simplify the selftests with bpf_iter.h. (Yonghong) 2. Add example output to commit log of 4/4. (Yonghong) Changes v2 => v3: 1. Rebase on top of bpf-next. (Yonghong) 2. Sanitize get_callchain_entry(). (Peter) 3. Use has_callchain_buf for bpf_get_task_stack. (Andrii) 4. Other small clean up. (Yonghong, Andrii). Changes v1 => v2: 1. Reuse most of bpf_get_stack() logic. (Andrii) 2. Fix unsigned long vs. u64 mismatch for 32-bit systems. (Yonghong) 3. Add %pB support in bpf_trace_printk(). (Daniel) 4. Fix buffer size to bytes. ==================== Signed-off-by: Alexei Starovoitov --- 64f0013c073a0162a6bd31b33def10cb2b2fe6e0