lkml.org 
[lkml]   [2022]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.10 138/563] bpf: Remove config check to enable bpf support for branch records
Hi!

> Branch data available to BPF programs can be very useful to get stack traces
> out of userspace application.
>
> Commit fff7b64355ea ("bpf: Add bpf_read_branch_records() helper") added BPF
> support to capture branch records in x86. Enable this feature also for other
> architectures as well by removing checks specific to x86.
>
> If an architecture doesn't support branch records, bpf_read_branch_records()
> still has appropriate checks and it will return an -EINVAL in that scenario.
> Based on UAPI helper doc in include/uapi/linux/bpf.h, unsupported architectures
> should return -ENOENT in such case. Hence, update the appropriate check to
> return -ENOENT instead.
>
> Selftest 'perf_branches' result on power9 machine which has the branch stacks
> support:
>
> - Before this patch:
>
> [command]# ./test_progs -t perf_branches
> #88/1 perf_branches/perf_branches_hw:FAIL
> #88/2 perf_branches/perf_branches_no_hw:OK
> #88 perf_branches:FAIL
> Summary: 0/1 PASSED, 0 SKIPPED, 1 FAILED
>
> - After this patch:
>
> [command]# ./test_progs -t perf_branches
> #88/1 perf_branches/perf_branches_hw:OK
> #88/2 perf_branches/perf_branches_no_hw:OK
> #88 perf_branches:OK
> Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED
>
> Selftest 'perf_branches' result on power9 machine which doesn't have branch
> stack report:
>
> - After this patch:
>
> [command]# ./test_progs -t perf_branches
> #88/1 perf_branches/perf_branches_hw:SKIP
> #88/2 perf_branches/perf_branches_no_hw:OK
> #88 perf_branches:OK
> Summary: 1/1 PASSED, 1 SKIPPED, 0 FAILED

This makes me nervous, it is not really a bugfix and probably noone
tested it on the stable branch. It would be safer to keep it disabled.

Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-01-25 20:29    [W:1.915 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site