Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp697907lqt; Fri, 19 Apr 2024 07:56:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfVQ9hBYxnx+IWmik3lvYzaGJ9Z1fJHoRUBW7HJQbD5sI5r6005Dq5QP3WteiaaSScoqet2ITejgdNMwFbzX/qIKlo2HkxbHy75ZHvew== X-Google-Smtp-Source: AGHT+IHCuuoxG68uSddtknmV82cpiP4mEbWH1TqLOy9Om7Od4ur/A+FQZl2iJCoGQbyOCx/vRZ9f X-Received: by 2002:a05:6a00:2da0:b0:6ec:ea4b:f077 with SMTP id fb32-20020a056a002da000b006ecea4bf077mr2876855pfb.16.1713538616932; Fri, 19 Apr 2024 07:56:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713538616; cv=pass; d=google.com; s=arc-20160816; b=IfCkzJ0pDbOAMENNgOFa55sq6geBiaamFOI8voq8NCdny6pNJJdb4TuHvFVPQzFygj r/6w2tOC1t0CqTJ5GeRhzmsTy1zE2xUCvhBpATZkmmS343v0fSZylZ32c25d4+BL4WYA HZEPVEbOkvTdh45+LnXe5i6VupFj3QdwGxPGMR/ZPiUN1V/HJt2Oz/f5cCICjDIBq4Rv m07OmGk30GzBmBjMu88YmPdIjo4Bu1vxbjXuLqjf46NA6qqBiEvqmfqYeUIPywe1bFmS QSGSKtvKMGYY32vnNqh9brER07AKz1gbV0+oFkgkSCYx1Pnn4bJlj1yvc2Hyadff6/A3 wMCQ== 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=/6DXtAQ/bNmeeqYSKsXIFwtkSQDgTgK3zTwc4dRtWfo=; fh=ECceH2dayNfnvmqOepwt3462Sc1jlGs79NtdtkTNamk=; b=UXj5D8eIxvG7j5XSYPF8wf+sLIBSf/19OJSJse+PSLntTlmY2rK/g97o13niF5Ty94 oZL7dfiV5RK7qKzbWz9EDCmZXrnQivPQe58V+nTt/dJdG6Xe3Gu9XqySuxfKdzpXRp5M XpyVzAkw4pdI/yc3HFydOI1Q6Vxley8My2bFfJ42uGn2QuqNZU2/DAk2gCeCfTa9+a0s 4N7r82E9YcmN0gZ+KYjBIpPEFy4EwA+eAJgti2pu8s3anjE2+LVbOt9rDRbXO9fYdFLT FD3QtvB5rAGP5cqUSWl7ZR6qCgO1ptzOBiinm9dRkOfRN973MbeIItdeumzZ+aC5WLQP ZFsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oATss3xu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151601-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s22-20020a056a00195600b006edced072bdsi3548414pfk.58.2024.04.19.07.56.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 07:56:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oATss3xu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151601-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151601-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DCF94B22CD1 for ; Fri, 19 Apr 2024 14:48:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48CD912F37B; Fri, 19 Apr 2024 14:48:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oATss3xu" 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 68D4A7BAF7; Fri, 19 Apr 2024 14:47: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=1713538079; cv=none; b=jGyd5omjLLuRvJ2ZpHbZ+NLd3mcwd3QUA0gTagOP8LgcLhYON7xU3boMqFDLT0nUK5eq0fTOp/fWxD6TYqTu6Sgi4IIfnG30qLJeLdYf5s7e4yBos4WW4NdXLM7diZAmvcpARHtVqwOq0PDfw9ytNrATxpskuoidx706ScYSdwk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713538079; c=relaxed/simple; bh=Vmc6uljHRntJBts9DEApBMq9kJrVnjN559MuPl/JPvY=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=sSJ8KxG8MHYuB10xuWEFVMN+R/ZdC6H1Q3gVECK8JFky9+sE1jj70LG7OqQb8ZMIxrDIfQx4J/pCkZotNpwzGsbYbcqtaPcjnsULRx3X3v3CedJtuy4UfBJ2Qer6DskaqJwJeaHmGCXal5PW4HHrABfvFqkj8r7Cpang3nLKmPc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oATss3xu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE23FC072AA; Fri, 19 Apr 2024 14:47:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713538078; bh=Vmc6uljHRntJBts9DEApBMq9kJrVnjN559MuPl/JPvY=; h=From:Subject:Date:To:Cc:From; b=oATss3xunmgNT0u+8ornpkeuTAS/jWOhja5fjOtkoDuudOlKwTYa1K/3CPo14wWCY Re72jJhjB7BR/3RqdSFBBLmZ46OLn8iuFIwvc/qAZ361fwKoanDawnLuOOiB8Ax88U WuPIudjokUNlVVYPYnE/Jv9ew7crTZtmvkM6zYrMx9ELJLgcYQ9f6Lq9MaPhID2DMQ wQ3rKamAevyBk1ed2gcR/n7m8RU0bgnFNawwsqG77HYYXu5KQoBUWH5CN85/gpTePf k0f6o36ZiG7W6PHioQlVh8HQTmtFCPqTDo9ewtbuLc0uUQfadOMYCz3v98ivArFSuy BuMljNR3kUcZw== From: Benjamin Tissoires Subject: [PATCH 0/3] HID: bpf: some fixes for pre-loading HID-BPF Date: Fri, 19 Apr 2024 16:47:50 +0200 Message-Id: <20240419-hid_bpf_lazy_skel-v1-0-9210bcd4b61c@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=H4sIABaEImYC/x3MTQqAIBBA4avErBMspLCrRIg/Yw5FhUJU0t2Tl t/ivQwJI2GCocoQ8aRE+1bQ1BXYoLcZGbliaHkruGgkC+SUObxa9XOrtODKtOGu64U1Qhoo3RH R0/U/x+l9P3XeqdFjAAAA To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires , stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1713538077; l=1241; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=Vmc6uljHRntJBts9DEApBMq9kJrVnjN559MuPl/JPvY=; b=dH+Tb8LcFr6PErY4tmh5SeDIfBbGra62JhiR8cw22cbSx/zh8+1beYHqxpoQkMieF9/GIO7zs WJYH006XLlrArLWrJuwQyMLdqxxkAVQ99cOyptgpNM6OzA3rH44PK1E X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= As I am working on the next functionalities of HID-BPF, I realized that I had a few issues while preloading the skeleton at boot. None of the errors are terrible as they are not inducing a kernel crash, so it's not super urgent IMO. Regarding the last one, I'm not sure what makes RHEL behave slightly different than upstream. But I am not sure also that the code matches upstream everywhere, so lazy loading it seems like a sensible idea. Furthermore, that also means that the code will not be available until requested by user space, which fits well in the whole idea of HID-BPF: if the user doesn't want it, then it shouldn't be it. Signed-off-by: Benjamin Tissoires --- Benjamin Tissoires (3): HID: bpf: fix a comment in a define HID: bpf: fix return value of entrypoints_*__attach() HID: bpf: lazy load the hid_tail_call entrypoint drivers/hid/bpf/hid_bpf_dispatch.c | 6 ------ drivers/hid/bpf/hid_bpf_jmp_table.c | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 11 deletions(-) --- base-commit: b912cf042072e12e93faa874265b30cc0aa521b9 change-id: 20240419-hid_bpf_lazy_skel-ab0d674cb49b Best regards, -- Benjamin Tissoires