[PATCH 2/2] bpf: update BPF constants

Paul Chaignon paul.chaignon at gmail.com
Tue Nov 26 10:26:40 UTC 2019

On Mon, Nov 25, 2019 at 06:17:22PM +0100, Eugene Syromiatnikov wrote:
> On Mon, Nov 25, 2019 at 05:52:19PM +0100, Paul Chaignon wrote:
> > * xlat/bpf_prog_types.in (BPF_PROG_TYPE_CGROUP_SOCK_ADDR): New constant
> > introduced by Linux commit v4.17-rc1~148^2~19^2^2~6.
> > BPF_PROG_TYPE_CGROUP_SOCKOPT): Update constant values following missing
> > entry in enum.
> > * tests/bpf.c (BPF_PROG_LOAD_checks): Update expected outputs.
> > * tests/kernel_version.c (print_bpf_attr, main): Likewise.
> > 
> > Signed-off-by: Paul Chaignon <paul.chaignon at gmail.com>
> Fixes: v4.24~49 "xlat: update bpf(2)-related constants"
> Fixes: v4.25~58 "xlat: add BPF_PROG_TYPE_SK_REUSEPORT to bpf_prog_types.in"
> Fixes: v4.26~12 "xlat: add flow dissector bpf program type constants"
> Fixes: v5.2~38 "xlat: update BPF_* constants"
> Fixes: v5.3~60 "xlat: update BPF_* constants"

Thanks!  I'll add those.

> The fact that this discrepancy hasn't been caught by the strace's test
> suite is quite concerning.

For this particular case, we could add a new test case that checks the
value of the last program type (to be updated with each new program type).
But in general, as long as we copy these values manually, I don't think
there'll be a very good way to test them...


More information about the Strace-devel mailing list