Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp402136lqo; Wed, 8 May 2024 03:27:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5Z1doDHIo6DksAj3T2XBbq7Hw5lm6uCoSu3k9KfHR2M46RHLuLSo62eeRDfm+NJ/peEW2AByuK+2/Bes5mqSJoI63YTAez4xav8m9Tw== X-Google-Smtp-Source: AGHT+IFMfaHMQJVQGhUmzKvUICYreIokcH6HSZziLpRJhc95hwb4i8hyyZ26eavcqXQRjYlaBuNM X-Received: by 2002:a05:6830:10cc:b0:6f0:7813:debb with SMTP id 46e09a7af769-6f0b7eb450emr2486415a34.35.1715164054877; Wed, 08 May 2024 03:27:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715164054; cv=pass; d=google.com; s=arc-20160816; b=jCr1DGedzWWJ8SPvYBD+dtjgyHkTItkxZqkJb2TH3DiV3hvljcse3Zy6NfikzRVu2N EepftZK1nvWBp1f7KR6pHOOmUidsFx5vrh4kXHTpUj390wUn7rYqngLp0ZV150dX0L20 EGcgaj+KcDYfHjP0hVrq37dC0Z2r/oyhXjfAkqHXrf+uC1LVWsvWBblvBmI9s01YSXlc dgNACL1WMBrKD6UInMVYXXXT9DNXAz4yzuvhrVqTVOkXOlPYZDpd+3HSfckOgTGv4dKC HsRJWp8t2prTkd0yRCVtdQfGjQvvBae/CexMT5eRRSjOuflTRBoA9PPtGouOfAiJfjxy wFOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=/kSY0H92awU0qSAV8otpqQiw6PdnsLFhYmc60Xeask4=; fh=2Qfsg0WOtJrwq8299N4MaGAPw9hpNnc5g4i36eCtx0s=; b=Jf2CiMxqTIkRVXB/9n3fWItPfN8+dr3ugCkeHb0+y2hjdIowtUeMz/mC7BY22Wb/Ok F2pLUvpx1YriwZii3E7e+hWeZgcCVEJVFo+34bdm5wJWwjewlpW5SQus9gi6wGeQX+kS 1v7buMHtp12OEgoshaqZJClMv5NCOxSFF56NoFZUeac56bS0o3m/zf8Yv62HyxC/YyPt Azu77GUrsoNxrMdELhcqVOppjHnFthlyRYYlelHd0aDeSPf8qqGXd9xGBSSwkFrRgrUF xPmC2u6U2LlBC3EkrFyy4Smg/LdBRnbYuzhJ2SOfNHHNvEtKIWZKS5qzmgcGmmrplIpl c5pA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p+S+UYBj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173057-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173057-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l3-20020a37f503000000b0078eeb70f535si12692645qkk.383.2024.05.08.03.27.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 03:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173057-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p+S+UYBj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173057-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173057-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2F5231C212E1 for ; Wed, 8 May 2024 10:27:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5E1F7D07F; Wed, 8 May 2024 10:27:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p+S+UYBj" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D656A2575A; Wed, 8 May 2024 10:26:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715164020; cv=none; b=WCZ9Vgu8exbAh9frplYzt05GKOWShXYAASZmCO1GyENGq4Y/0cRR/o00FN2Pv6AYiKv+nJjCpc8wC6BYk7SpZiDQDRXIGznLEOufjhHjYofz/CJwDprzRLOUmwk2fQJxJunbHHMlt7/RVSz452a+qp/+1cq9wwPnCbXETsHLm88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715164020; c=relaxed/simple; bh=TDjcRvvAfwwjF7nDIlrDZmJd8qCh0KeSglQB1DiOab8=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=BjhRLQq+DKMklJr41OBDtVW6/sPJzDn7Cm54PZ073hbuKK8tLP/yASMRg2rchKK6ejN1tjPo9yrl+OopiaG4PKUuIiBmVjD9pPHsmWSDGnqkbmNQ2eTE7OURoY08RYjH0I2Lo6doMEz3dGSvpCBBKDf8H2+1KgOwUukl3CG/AXE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p+S+UYBj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81DC7C113CC; Wed, 8 May 2024 10:26:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715164019; bh=TDjcRvvAfwwjF7nDIlrDZmJd8qCh0KeSglQB1DiOab8=; h=From:Subject:Date:To:Cc:From; b=p+S+UYBj0vyhNBr2JGrtR3vISEggONWqaZnfbY6Um6zWEtcXnXQqIkBmTCQyQ7fA6 mJg6/uUW7jNf4Y723UYTXYbTsmwOXg9087wXYnae7YxahNdoS4Aa69qbIQH9kMwfYz A2tYdS2HM1q0jvtK0BK61xXmezs/KcQkvTrqJxjdI1sL2mU41hkxUjHK0p2p9QC4PB cV8tuPBlTvDZ+UfTRfI2+pev7DtaL5CIm5nzPiZvzMthOE3eWa2MGpA7baSWY4blx1 E1rFQ3Cv6cOmZkW+shbkRjOj0SAMM0+MLSphl0xuiPp/fXGsikMRKUjDnfRCkGTIoo 8VTmJmE4H3/EQ== From: Benjamin Tissoires Subject: [PATCH RFC HID 0/7] Use the new __s_async for HID-BPF Date: Wed, 08 May 2024 12:26:35 +0200 Message-Id: <20240508-hid_bpf_async_fun-v1-0-558375a25657@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAFtTO2YC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDUwML3YzMlPikgrT4xOLKvOT4tNI8XSPTRIskS/MkU2NTIyWgvoKi1LT MCrCZ0UpBbs4KHp4uSrG1tQDRfoztbAAAAA== To: Benjamin Tissoires Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, bpf@vger.kernel.org, Benjamin Tissoires X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1715164017; l=2093; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=TDjcRvvAfwwjF7nDIlrDZmJd8qCh0KeSglQB1DiOab8=; b=PUIB8qS1sxw4D6ki+B5ZdIu5R3yjVUMPLnLrLl7kfEhIR/xZHUkd2Kw93x21KsIw4Cxe8ISh9 eJEJJkLt2OyC5SQ+hGbmL3pIZQIj1g0Vd1S8eAaFBUdfwsnHKcJ/CBp X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= 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 --- 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