]> granicus.if.org Git - strace/commit
bpf: update BPF_PROG_LOAD decoding
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 27 Jul 2017 00:44:31 +0000 (00:44 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 27 Jul 2017 00:44:31 +0000 (00:44 +0000)
commitc024f1a60f9c3580bd2d1afd1d37d533db501564
treef861cf5ab5ed63d5804502be3e6d9bd668a8ff30
parenta1e8d312ed4f313c2be8b4fa8572047a35d2d873
bpf: update BPF_PROG_LOAD decoding

Implement decoding of union bpf_attr.prog_flags field for BPF_PROG_LOAD
command introduced by linux kernel commit v4.12-rc2~34^2~29^2~2.

* configure.ac: Check for prog_flags member of union bpf_attr
instead of kern_version.
* xlat/bpf_prog_flags.in: New file.
* bpf.c: Include "xlat/bpf_prog_flags.h".
(decode_BPF_PROG_LOAD): Add prog_flags field to the structure, print it.
* tests/bpf.c: Update macro guards of BPF_PROG_LOAD decoder test.
(init_BPF_PROG_LOAD_first, print_BPF_PROG_LOAD_attr): Update expected
output.
(init_BPF_PROG_LOAD_attr): Initialize prog_flags field, update offset.
bpf.c
configure.ac
tests/bpf.c
xlat/bpf_prog_flags.in [new file with mode: 0644]