]> granicus.if.org Git - strace/commit
Implement decoding of BPF_OBJ_GET_INFO_BY_FD command of bpf syscall
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 21 Nov 2017 23:12:04 +0000 (23:12 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 21 Nov 2017 23:12:04 +0000 (23:12 +0000)
commit5c511738301565ed694d5a02abe7ac4bd688b96a
tree76cbea0891465e5d4526fdfffedd812e03889e8a
parent9df60f314d804763a2cc4dcb0065457ff32de628
Implement decoding of BPF_OBJ_GET_INFO_BY_FD command of bpf syscall

* configure.ac (AC_CHECK_MEMBERS): Add union bpf_attr.info.info.
* bpf.c (decode_BPF_OBJ_GET_INFO_BY_FD): New function.
(SYS_FUNC(bpf)) <bpf_cmd_decoders>: Use it.
* NEWS: Mention this.
* tests/bpf.c: Add macro guard for BPF_OBJ_GET_INFO_BY_FD decoder test.
[HAVE_UNION_BPF_ATTR_INFO_INFO] (sample_BPF_OBJ_GET_INFO_BY_FD_attr):
New variable.
[HAVE_UNION_BPF_ATTR_INFO_INFO] (init_BPF_OBJ_GET_INFO_BY_FD_first,
print_BPF_OBJ_GET_INFO_BY_FD_first, init_BPF_OBJ_GET_INFO_BY_FD_attr,
print_BPF_OBJ_GET_INFO_BY_FD_attr): New functions.
(main) [HAVE_UNION_BPF_ATTR_INFO_INFO]: Use them.
NEWS
bpf.c
configure.ac
tests/bpf.c