diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-07-07 18:53:17 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-07-09 00:44:45 +0200 |
commit | 0e289487308236903b19273f2ddb4f0adf732b9e (patch) | |
tree | c90853607b25de230a8a343f38b222d66f72ec0e /Documentation/arm64 | |
parent | fcda189a5133b6fe50eb63d1062a15be4df9e3de (diff) |
libbpf: Handle missing BPF_OBJ_GET_INFO_BY_FD gracefully in perf_buffer
perf_buffer__new() is relying on BPF_OBJ_GET_INFO_BY_FD availability for few
sanity checks. OBJ_GET_INFO for maps is actually much more recent feature than
perf_buffer support itself, so this causes unnecessary problems on old kernels
before BPF_OBJ_GET_INFO_BY_FD was added.
This patch makes those sanity checks optional and just assumes best if command
is not supported. If user specified something incorrectly (e.g., wrong map
type), kernel will reject it later anyway, except user won't get a nice
explanation as to why it failed. This seems like a good trade off for
supporting perf_buffer on old kernels.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200708015318.3827358-6-andriin@fb.com
Diffstat (limited to 'Documentation/arm64')
0 files changed, 0 insertions, 0 deletions