All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Jiri Kosina <jikos@kernel.org>,
	Florent Revest <revest@chromium.org>,
	Jon Hunter <jonathanh@nvidia.com>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>
Subject: [PATCH HID for-next v3 0/5] HID: bpf: remove the need for ALLOW_ERROR_INJECTION and Kconfig fixes
Date: Tue,  6 Dec 2022 15:59:31 +0100	[thread overview]
Message-ID: <20221206145936.922196-1-benjamin.tissoires@redhat.com> (raw)

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/20221121104403.1545f9b5@gandalf.local.home/
[1] https://lore.kernel.org/r/CABRcYmKyRchQhabi1Vd9RcMQFCcb=EtWyEbFDFRTc-L-U8WhgA@mail.gmail.com
[3] https://lore.kernel.org/all/202212060216.a6X8Py5H-lkp@intel.com/

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(-)

-- 
2.38.1


             reply	other threads:[~2022-12-06 15:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 14:59 Benjamin Tissoires [this message]
2022-12-06 14:59 ` [PATCH HID for-next v3 1/5] bpf: do not rely on ALLOW_ERROR_INJECTION for fmod_ret Benjamin Tissoires
2022-12-06 20:47   ` Alexei Starovoitov
2022-12-07 14:57     ` Benjamin Tissoires
2022-12-07 21:58       ` Alexei Starovoitov
2022-12-06 14:59 ` [PATCH HID for-next v3 2/5] HID: bpf: do not rely on ALLOW_ERROR_INJECTION Benjamin Tissoires
2022-12-06 14:59 ` [PATCH HID for-next v3 3/5] HID: bpf: enforce HID_BPF dependencies Benjamin Tissoires
2022-12-07 14:58   ` Benjamin Tissoires
2022-12-07 15:11     ` Florent Revest
2022-12-06 14:59 ` [PATCH HID for-next v3 4/5] selftests: hid: ensures we have the proper requirements in config Benjamin Tissoires
2022-12-06 14:59 ` [PATCH HID for-next v3 5/5] kselftests: hid: fix missing headers_install step Benjamin Tissoires
2022-12-07 22:00 ` [PATCH HID for-next v3 0/5] HID: bpf: remove the need for ALLOW_ERROR_INJECTION and Kconfig fixes patchwork-bot+netdevbpf
2022-12-10  9:07 ` Jiri Kosina
2022-12-10  9:43   ` Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221206145936.922196-1-benjamin.tissoires@redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jikos@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=revest@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.