Skip to content
  • Arnaldo Carvalho de Melo's avatar
    toops: Sync tools/include/uapi/linux/bpf.h with the kernel · 791cceb8
    Arnaldo Carvalho de Melo authored
    The way we're using kernel headers in tools/ now, with a copy that is
    made to the same path prefixed by "tools/" plus checking if that copy
    got stale, i.e. if the kernel counterpart changed, helps in keeping
    track with new features that may be useful for tools to exploit.
    
    For instance, looking at all the changes to bpf.h since it was last
    copied to tools/include brings this to toolers' attention:
    
    Need to investigate this one to check how to run a program via perf, setting up
    a BPF event, that will take advantage of the way perf already calls clang/LLVM,
    sets up the event and runs the workload in a single command line, helping in
    debugging such semi cooperative programs:
    
      96ae5227 ("bpf: Add bpf_probe_write_user BPF helper to be called in tracers")
    
    This one needs further investigation about using the feature it improves
    in 'perf trace' to do some tcpdumpin' mixed with syscalls, tracepoints,
    probe points, callgraphs, etc:
    
      555c8a86 ("bpf: avoid stack copy and use skb ctx for event output")
    
    Add tracing just packets that are related to some container to that mix:
    
      4a482f34 ("cgroup: bpf: Add bpf_skb_in_cgroup_proto")
      4ed8ec52 ("cgroup: bpf: Add BPF_MAP_TYPE_CGROUP_ARRAY")
    
    Definetely needs to have example programs accessing task_struct from a bpf proggie
    started from 'perf trace':
    
      606274c5 ("bpf: introduce bpf_get_current_task() helper")
    
    Core networking related, XDP:
    
      6ce96ca3 ("bpf: add XDP_TX xdp_action for direct forwarding")
      6a773a15 ("bpf: add XDP prog type for early driver filter")
      13c5c240 ("bpf: add bpf_get_hash_recalc helper")
      d2485c42 ("bpf: add bpf_skb_change_type helper")
      6578171a ("bpf: add bpf_skb_change_proto helper")
    
    Changes detected by the tools build system:
    
      $ make -C tools/perf O=/tmp/build/perf install-bin
      make: Entering directory '/home/acme/git/linux/tools/perf'
        BUILD:   Doing 'make -j4' parallel build
      Warning: tools/include/uapi/linux/bpf.h differs from kernel
        INSTALL  GTK UI
        CC       /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o
      <SNIP>
      $
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexei Starovoitov <ast@fb.com>
    Cc: Brenden Blanco <bblanco@plumgrid.com>
    Cc: Daniel Borkmann <daniel@iogearbox.net>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: David S. Miller <davem@davemloft.net>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Martin KaFai Lau <kafai@fb.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Sargun Dhillon <sargun@sargun.me>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: http://lkml.kernel.org/n/tip-difq4ts1xvww6eyfs9e7zlft@git.kernel.org
    
    
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    791cceb8