Skip to content

bpf: classify block device hooks and add selftests

Christian Brauner bpf lkml 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] change-id 20260220-work-bpf-bdev-ff2c82143d05

Versions newest first

  1. v2 Latest2 patches 0 repliesApplied 2/2
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: classify block device hooks appropriatelykernel/bpf/bpf_lsm.c+4 -00 repliesApplied
2/2selftests/bpf: add block device management selfteststools/testing/selftests/bpf/prog_tests/lsm_bdev.c tools/testing/selftests/bpf/progs/lsm_bdev.c+317 -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 RESEND v2 0/2] bpf: classify block device hooks and add selftests

A bunch of new hooks for managing block devices were added a while ago but they weren't appropriately classified. Classify them and add a test program so we catch regressions.

Note that for whatever reason building the bpf selftests locally seems to fail for all kinds of arcane reasons for me. That might just be my fault. I added a pr against the ci to have the selftests run but to test this meaningfully it needs veritysetup and dmverity support. I'm not sure if that's available already.

---
Changes in v2:
- No changes.
- Link to v1: https://patch.msgid.link/[email protected]

---
Christian Brauner (2):
bpf: classify block device hooks appropriately selftests/bpf: add block device management selftests

 kernel/bpf/bpf_lsm.c                              |   4 +
 tools/testing/selftests/bpf/prog_tests/lsm_bdev.c | 221 ++++++++++++++++++++++
 tools/testing/selftests/bpf/progs/lsm_bdev.c      |  96 ++++++++++
 3 files changed, 321 insertions(+)

---
base-commit: 400ff899c336c24bf4d34479f98cef2fd2d3482a
change-id: 20260220-work-bpf-bdev-ff2c82143d05