Skip to content

bpf: Retire the unsupported_ops usage in struct_ops

Martin KaFai Lau bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesApplied 3/3
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Fixed a gcc compiler warning on Patch 1.

Patches in v2 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: Check unsupported ops from the bpf_struct_ops's cfi_stubsinclude/linux/bpf.h kernel/bpf/bpf_struct_ops.c kernel/bpf/verifier.c +1 more+21 -270 repliesApplied
2/3selftests/bpf: Fix the missing tramp_1 to tramp_40 ops in cfi_stubstools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c+14 -00 repliesApplied
3/3selftests/bpf: Ensure the unsupported struct_ops prog cannot be loadedtools/testing/selftests/bpf/bpf_testmod/bpf_testmod.h tools/testing/selftests/bpf/prog_tests/test_struct_ops_module.c tools/testing/selftests/bpf/progs/unsupported_ops.c+25 -00 repliesApplied

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 bpf-next 0/3] bpf: Retire the unsupported_ops usage in struct_ops

From: Martin KaFai Lau <[email protected]>

This series retires the unsupported_ops usage and depends on the null-ness check on the cfi_stubs instead.

Please see individual patches for details.

v2:
- Fixed a gcc compiler warning on Patch 1.

Martin KaFai Lau (3):
bpf: Check unsupported ops from the bpf_struct_ops's cfi_stubs selftests/bpf: Fix the missing tramp_1 to tramp_40 ops in cfi_stubs selftests/bpf: Ensure the unsupported struct_ops prog cannot be loaded

 include/linux/bpf.h                           |  5 ++++
 kernel/bpf/bpf_struct_ops.c                   |  7 +++++
 kernel/bpf/verifier.c                         | 10 ++++++-
 net/ipv4/bpf_tcp_ca.c                         | 26 -------------------
 .../selftests/bpf/bpf_testmod/bpf_testmod.c   | 14 ++++++++++
 .../selftests/bpf/bpf_testmod/bpf_testmod.h   |  1 +
 .../bpf/prog_tests/test_struct_ops_module.c   |  2 ++
 .../selftests/bpf/progs/unsupported_ops.c     | 22 ++++++++++++++++
 8 files changed, 60 insertions(+), 27 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/unsupported_ops.c
Signature · 1 line
2.43.0