Skip to content

HID: bpf: remove the need for ALLOW_ERROR_INJECTION and Kconfig fixes

Benjamin Tissoires bpf linux-input lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 7 repliesIn review 1 of 5 applied
  2. v24 patches 1 replySuperseded

Patches in v3 1 of 5 applied

#Subject and filesSizeRepliesApplied
1/5bpf: do not rely on ALLOW_ERROR_INJECTION for fmod_retinclude/linux/btf.h kernel/bpf/btf.c kernel/bpf/verifier.c +1 more+53 -103 repliesApplied
2/5HID: bpf: do not rely on ALLOW_ERROR_INJECTIONdrivers/hid/bpf/hid_bpf_dispatch.c drivers/hid/bpf/hid_bpf_jmp_table.c+18 -30 replies
3/5HID: bpf: enforce HID_BPF dependenciesdrivers/hid/bpf/Kconfig+2 -12 replies
4/5selftests: hid: ensures we have the proper requirements in configtools/testing/selftests/hid/config+1 -00 replies
5/5kselftests: hid: fix missing headers_install steptools/testing/selftests/hid/Makefile+12 -140 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlexei StarovoitovFlorent RevestJiri Kosina
SeriesR-b
1/5A-b
2/5
3/5R-b
4/5
5/5

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

Read the v3 thread

Cover letter [PATCH HID for-next v3 0/5] HID: bpf: remove the need for ALLOW_ERROR_INJECTION and Kconfig fixes

Hi,

This is a new version of the ALLOW_ERROR_INJECTION hack removal.

Compared to v2, I followed the review from Alexei which cleaned up the code a little bit.

I also got a kbuild test bot complaining[3] so add a fix for that too.

For reference, here is the previous cover letter:

So this patch series aims at solving both [0] and [1].

The first one is bpf related and concerns the ALLOW_ERROR_INJECTION API. It is considered as a hack to begin with, so introduce a proper kernel API to declare when a BPF hook can have its return value changed.

The second one is related to the fact that DYNAMIC_FTRACE_WITH_DIRECT_CALLS is currently not enabled on arm64, and that means that the current HID-BPF implementation doesn't work there for now.

The first patch actually touches the bpf core code, but it would be easier if we could merge it through the hid tree in the for-6.2/hid-bpf branch once we get the proper acks.

Cheers,
Benjamin

[0] https://lore.kernel.org/all/[email protected]/
[1] https://lore.kernel.org/r/CABRcYmKyRchQhabi1Vd9RcMQFCcb=EtWyEbFDFRTc-L-U8WhgA@mail.gmail.com
[3] https://lore.kernel.org/all/[email protected]/

Benjamin Tissoires (5):
bpf: do not rely on ALLOW_ERROR_INJECTION for fmod_ret
HID: bpf: do not rely on ALLOW_ERROR_INJECTION
HID: bpf: enforce HID_BPF dependencies
selftests: hid: ensures we have the proper requirements in config
kselftests: hid: fix missing headers_install step

 drivers/hid/bpf/Kconfig              |  3 ++-
 drivers/hid/bpf/hid_bpf_dispatch.c   | 20 +++++++++++++++++--
 drivers/hid/bpf/hid_bpf_jmp_table.c  |  1 -
 include/linux/btf.h                  |  2 ++
 kernel/bpf/btf.c                     | 30 +++++++++++++++++++++++-----
 kernel/bpf/verifier.c                | 17 ++++++++++++++--
 net/bpf/test_run.c                   | 14 ++++++++++---
 tools/testing/selftests/hid/Makefile | 26 +++++++++++-------------
 tools/testing/selftests/hid/config   |  1 +
 9 files changed, 86 insertions(+), 28 deletions(-)
Signature · 1 line
2.38.1