[PATCH 1/2] bpf: support new field in BPF_PROG_LOAD

Paul Chaignon paul.chaignon at gmail.com
Wed Nov 27 07:47:57 UTC 2019


On Wed, Nov 27, 2019 at 01:53:07AM +0300, Dmitry V. Levin wrote:
> On Mon, Nov 25, 2019 at 05:48:47PM +0100, Paul Chaignon wrote:
> > * bpf_attr.h (BPF_MAP_LOOKUP_ELEM_struct): New field introduced by Linux
> > commit v5.1-rc1~178^2~375^2~4^2~3.
> > * xlat/bpf_map_lookup_elem_flags.in: New file.
> > * bpf.c: Include "xlat/bpf_map_lookup_elem_flags.h".
> > (BEGIN_BPF_CMD_DECODER(BPF_MAP_LOOKUP_ELEM)): Decode the new field.
> > * tests/bpf.c (BPF_PROG_LOAD_checks, BPF_MAP_LOOKUP_ELEM_checks): Update
> > expected outputs.
> > 
> > Signed-off-by: Paul Chaignon <paul.chaignon at gmail.com>
> 
> Thanks!  I wonder how could we miss it before.
> 
> But why do you mention BPF_PROG_LOAD here?
> Shouldn't it be BPF_MAP_LOOKUP_ELEM instead?

Ah, my bad.  I originally had everything in a single commit and then
decided to separate the fix from the field update.  Looks like I missed
a piece.  I'll send a v2 with the two fixes to commit messages and a new
test for the last program type value.

[...]

Paul


More information about the Strace-devel mailing list