Skip to content

Misc BPF improvements

Daniel Borkmann netdev 3 versions – Applied

Status from this message: Applied, Thanks Daniel.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest11 patches 8 repliesApplied
  2. v211 patches 1 replySuperseded
  3. v111 patches 17 repliesSuperseded

Changes in v3 from the cover letter

- Noticed a merge artefact inside uapi header comment, sigh, fixed now.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/11bpf: test case for map pointer poison with calls/branchesinclude/linux/filter.h tools/include/linux/filter.h tools/testing/selftests/bpf/test_verifier.c+178 -270 replies
2/11bpf: add also cbpf long jump test cases with heavy expansionlib/test_bpf.c+63 -00 replies
3/11bpf: fixup error message from gpl helpers on license mismatchkernel/bpf/verifier.c+1 -10 replies
4/11bpf: show prog and map id in fdinfokernel/bpf/syscall.c+8 -40 replies
5/11bpf: avoid retpoline for lookup/update/delete calls on mapsinclude/linux/filter.h kernel/bpf/hashtab.c kernel/bpf/verifier.c+62 -207 replies
6/11bpf: add bpf_skb_cgroup_id helperinclude/uapi/linux/bpf.h net/core/filter.c+45 -30 replies
7/11bpf: make sure to clear unused fields in tunnel/xfrm state fetchinclude/uapi/linux/bpf.h net/core/filter.c+8 -10 replies
8/11bpf: fix cbpf parser bug for octal numberstools/bpf/bpf_exp.l+1 -10 replies
9/11bpf: fix context access in tracing progs on 32 bit archsinclude/linux/filter.h kernel/bpf/verifier.c kernel/trace/bpf_trace.c+34 -90 replies
10/11bpf: sync bpf uapi header with toolstools/include/uapi/linux/bpf.h+20 -20 replies
11/11bpf, doc: add missing patchwork url and libbpf to maintainersMAINTAINERS+2 -00 replies

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchAlexei StarovoitovSong LiuJesper Dangaard BrouerWang YanQing
1/11A-b A-b
2/11A-b A-b
3/11A-b A-b A-b
4/11A-b A-b A-b
5/11A-b A-b
6/11A-b
7/11A-b A-b
8/11A-b A-b
9/11A-b T-b
10/11A-b A-b
11/11A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH bpf-next v3 00/11] Misc BPF improvements

This set adds various patches I still had in my queue, first two are test cases to provide coverage for the recent two fixes that went to bpf tree, then a small improvement on the error message for gpl helpers. Next, we expose prog and map id into fdinfo in order to allow for inspection of these objections currently used in applications. Patch after that removes a retpoline call for map lookup/update/delete helpers. A new helper is added in the subsequent patch to lookup the skb's socket's cgroup v2 id which can be used in an efficient way for e.g. lookups on egress side. Next one is a fix to fully clear state info in tunnel/xfrm helpers. Given this is full cap_sys_admin from init ns and has same priv requirements like tracing, bpf-next should be okay. A small bug fix for bpf_asm follows, and next a fix for context access in tracing which was recently reported. Lastly, a small update in the maintainer's file to add patchwork url and missing files.

Thanks!

v2 -> v3:
- Noticed a merge artefact inside uapi header comment, sigh, fixed now.
v1 -> v2:
- minor fix in getting context access work on 32 bit for tracing
- add paragraph to uapi helper doc to better describe kernel build deps for cggroup helper

Daniel Borkmann (11):
bpf: test case for map pointer poison with calls/branches
bpf: add also cbpf long jump test cases with heavy expansion
bpf: fixup error message from gpl helpers on license mismatch
bpf: show prog and map id in fdinfo
bpf: avoid retpoline for lookup/update/delete calls on maps
bpf: add bpf_skb_cgroup_id helper
bpf: make sure to clear unused fields in tunnel/xfrm state fetch
bpf: fix cbpf parser bug for octal numbers
bpf: fix context access in tracing progs on 32 bit archs
bpf: sync bpf uapi header with tools
bpf, doc: add missing patchwork url and libbpf to maintainers

 MAINTAINERS                                 |   2 +
 include/linux/filter.h                      |  43 ++++++-
 include/uapi/linux/bpf.h                    |  22 +++-
 kernel/bpf/hashtab.c                        |  12 +-
 kernel/bpf/syscall.c                        |  12 +-
 kernel/bpf/verifier.c                       |  72 ++++++++---
 kernel/trace/bpf_trace.c                    |  10 +-
 lib/test_bpf.c                              |  63 ++++++++++
 net/core/filter.c                           |  35 +++++-
 tools/bpf/bpf_exp.l                         |   2 +-
 tools/include/linux/filter.h                |  10 ++
 tools/include/uapi/linux/bpf.h              |  22 +++-
 tools/testing/selftests/bpf/test_verifier.c | 185 ++++++++++++++++++++++++----
 13 files changed, 422 insertions(+), 68 deletions(-)
Signature · 1 line
2.9.5