[PATCH RFC HID 0/7] Use the new __s_async for HID-BPF

Benjamin Tissoires posted 7 patches 1 year, 7 months ago
drivers/hid/bpf/entrypoints/Makefile               |  93 --------
drivers/hid/bpf/entrypoints/README                 |   4 -
drivers/hid/bpf/entrypoints/entrypoints.bpf.c      |  25 --
drivers/hid/bpf/entrypoints/entrypoints.lskel.h    | 248 --------------------
drivers/hid/bpf/hid_bpf_dispatch.c                 | 252 +++++++++++----------
drivers/hid/bpf/hid_bpf_dispatch.h                 |  12 +-
drivers/hid/bpf/hid_bpf_jmp_table.c                | 199 ++++------------
drivers/hid/hid-core.c                             |  91 +++++---
drivers/hid/hidraw.c                               |  10 +-
include/linux/hid.h                                |   6 +
include/linux/hid_bpf.h                            |  33 ++-
tools/testing/selftests/hid/hid_bpf.c              |  61 ++++-
tools/testing/selftests/hid/progs/hid.c            |  91 +++++---
.../testing/selftests/hid/progs/hid_bpf_helpers.h  |  60 ++++-
14 files changed, 449 insertions(+), 736 deletions(-)
[PATCH RFC HID 0/7] Use the new __s_async for HID-BPF
Posted by Benjamin Tissoires 1 year, 7 months ago
This is not meant to be applied as of now.

This is just to show what I meant for [0].

And of course, this doesn't even compile because you need [0] to be
applied and the branch for-6.10/hid-bpf on the hid tree.

The purpose is to remove the bpf_tail_call from the preloaded bpf at
boot time.

Cheers,
Benjamin

[0] https://lore.kernel.org/bpf/20240507-bpf_async-v1-0-b4df966096d8@kernel.org/v

Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
---
Benjamin Tissoires (7):
      HID: bpf: change the prog run logic
      selftests/hid: fix bpf programs for the new attachment logic
      HID: bpf: allow for sleepable bpf hooks
      HID: add source argument to HID low level functions
      WIP: add HID-BPF hooks for hid_hw_raw_requests
      WIP: selftests/hid: add tests for hid_hw_raw_request HID-BPF hooks
      HID: bpf: prevent infinite recursions with hid_hw_raw_requests hooks

 drivers/hid/bpf/entrypoints/Makefile               |  93 --------
 drivers/hid/bpf/entrypoints/README                 |   4 -
 drivers/hid/bpf/entrypoints/entrypoints.bpf.c      |  25 --
 drivers/hid/bpf/entrypoints/entrypoints.lskel.h    | 248 --------------------
 drivers/hid/bpf/hid_bpf_dispatch.c                 | 252 +++++++++++----------
 drivers/hid/bpf/hid_bpf_dispatch.h                 |  12 +-
 drivers/hid/bpf/hid_bpf_jmp_table.c                | 199 ++++------------
 drivers/hid/hid-core.c                             |  91 +++++---
 drivers/hid/hidraw.c                               |  10 +-
 include/linux/hid.h                                |   6 +
 include/linux/hid_bpf.h                            |  33 ++-
 tools/testing/selftests/hid/hid_bpf.c              |  61 ++++-
 tools/testing/selftests/hid/progs/hid.c            |  91 +++++---
 .../testing/selftests/hid/progs/hid_bpf_helpers.h  |  60 ++++-
 14 files changed, 449 insertions(+), 736 deletions(-)
---
base-commit: 89ea968a9d759f71ac7b8d50949a8e5e5bcb1111
change-id: 20240508-hid_bpf_async_fun-25a8b97b5352

Best regards,
-- 
Benjamin Tissoires <bentiss@kernel.org>