Skip to content

bpf: allow map helpers access to map values directly

Paul Chaignon via iovisor-dev netdev 2 versions – Applied

Status from this message: Applied to bpf-next, thanks Paul!

Get series with b4
b4 am 20180424130636.GA6270@Nover

Versions newest first · linked by author and title

  1. v5 Latest1 of 2 patches 1 replyApplied
  2. v41 of 2 patches 0 repliesSuperseded

Changes in v5 from the cover letter

- Refactor using check_helper_mem_access.

1 of 2 patches is in this archive. The cover letter announces 2.

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/2bpf: allow map helpers access to map values directlykernel/bpf/verifier.c+7 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH bpf-next v5 0/2] bpf: allow map helpers access to map values directly

Currently, helpers that expect ARG_PTR_TO_MAP_KEY and ARG_PTR_TO_MAP_VALUE can only access stack and packet memory. This patchset allows these helpers to directly access map values by passing registers of type PTR_TO_MAP_VALUE.

The first patch changes the verifier; the second adds new test cases.

The first three versions of this patchset were sent on the iovisor-dev mailing list only.

Changelogs:
Changes in v5:
- Refactor using check_helper_mem_access.
Changes in v4:
- Rebase.
Changes in v3:
- Bug fixes.
- Negative test cases.
Changes in v2:
- Additional test cases for adjusted maps.

Paul Chaignon (2):
bpf: allow map helpers access to map values directly tools/bpf: add verifier tests for accesses to map values

 kernel/bpf/verifier.c                       |  24 +--
 tools/testing/selftests/bpf/test_verifier.c | 266 ++++++++++++++++++++++++++++
 2 files changed, 273 insertions(+), 17 deletions(-)
Signature · 1 line
2.7.4