]> granicus.if.org Git - strace/commit
Update bpf syscall decoding
authorQuentin Monnet <quentin.monnet@6wind.com>
Thu, 26 Jan 2017 14:36:56 +0000 (15:36 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 29 Jan 2017 21:54:43 +0000 (21:54 +0000)
commit0a8dd6a68c108654ba5a17dce6c5839495cd26d3
tree013452f1b48e51bae73511fc625e144d3dba0ba3
parentfe871501ff0473af7f55f155314027404c2770f8
Update bpf syscall decoding

Implement decoding of BPF_OBJ_PIN, BPF_OBJ_GET, BPF_PROG_ATTACH,
and BPF_PROG_DETACH commands.

* bpf.c: Include "xlat/bpf_attach_type.h".
(bpf_obj_manage, bpf_prog_attach, bpf_prog_detach): New functions.
(SYS_FUNC(bpf)): Use them.
* configure.ac: Check for union bpf_attr.bpf_fd and union
bpf_attr.attach_type.
* xlat/bpf_attach_type.in: New file.
* xlat/bpf_commands.in: Update list of BPF_* command constants.
* xlat/bpf_map_types.in: Update list of BPF_MAP_TYPE_* constants.
* xlat/bpf_prog_types.in: Update list of BPF_PROG_TYPE_* constants.
* tests/bpf.c [HAVE_UNION_BPF_ATTR_BPF_FD] (obj_manage): New function.
[HAVE_UNION_BPF_ATTR_ATTACH_TYPE] (prog_cgroup): Likewise.
(main): Use them.
bpf.c
configure.ac
tests/bpf.c
xlat/bpf_attach_type.in [new file with mode: 0644]
xlat/bpf_commands.in
xlat/bpf_map_types.in
xlat/bpf_prog_types.in