Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp222693lqg; Thu, 11 Apr 2024 00:06:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU90e1YdQC9DlhjYhvsiRr3fELUYbdMYu7vYJHcm9PvLqzsXJIF1vauzcosDIT/pujWapqWbYVB7NlFOgLulUe5BzfVDoSSDCMY9W8a0g== X-Google-Smtp-Source: AGHT+IFzvUXgF95Oq2e3gFkiaxyWjanhw4na/eHUE1598DN5be0EhTRzy8DXpOUZc/g5n1ySUQ+t X-Received: by 2002:a17:90a:e28f:b0:2a5:6753:98e0 with SMTP id d15-20020a17090ae28f00b002a5675398e0mr2562894pjz.0.1712819173103; Thu, 11 Apr 2024 00:06:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712819173; cv=pass; d=google.com; s=arc-20160816; b=qcpA/EtEE49ydLEPun++NijmNDIQOWeaZYqEZgYjV3BnJ+lN1bZb4V92nNKBSairLI bqx+/NAxKissTPbtN7MyPOwgcwz6hdXMG7SvwoeiLZsEWLZ/Ulmah7ER9z18IPog7kDi bP3EYO6pdskV3Tgipn2gWn/X7eWRJKNgDG0rXaehJbQAcyHPdfGX3WD6uxZsOFymcWgz h01FaGk0Lq4dFC0Am4dQNpBxtvSztt6jTP4DTsvgJznWbUG10bNJQ8oRGwOgv9dxuLqo YJ0+CJzvy6F22uYpgPPC1G7Jzy4kECSPQ2zlEJ9XjOjl237zzF3VVdd5oFXPHbPxUm9I yCOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=OHhJehyJLYpuX5KediN7zA0e7ZDOYC67SPdU4eVxs10=; fh=QImD/RMTxOrapcIMtpC4mRgFUYwbm3D40BesFkvEkTg=; b=Wx+0fouuUqjPdsLpzb5peYdyivka1Yckbb6OgpKncZjz689+QaPg39PZ712TFQSZSi DJY7M/wKepGCVMSoqcC2nqp/RUl1M1GdZ3h4OV+fVGDXwwkx5r49KHrnl3jx0BbwQDLW UWk0kULwQoXwb9no2a3jb7FiyOANLGZhVut/FZdg+37VeqtdQ6wEqmDo1CYi92CrHi27 aahBWXV1z21N4R4WiPQSzNVnOTIintRSOMnHrXaanFbZVU47RpcbsppMK2zuTIL1MMDA WOgnvDzrA6NAkRZEUlNQ4ZgDcy8qdLDCEisyoPO13vC5dppfYy37JKcowwprKUn7OuNP 7s1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qiu8HGyu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139914-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139914-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u8-20020a17090a0c4800b0029b80d93d0asi861375pje.128.2024.04.11.00.06.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 00:06:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139914-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qiu8HGyu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139914-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139914-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BD58C282A24 for ; Thu, 11 Apr 2024 07:06:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1E6213DDB3; Thu, 11 Apr 2024 07:06:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Qiu8HGyu" 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 01D9713CAB3; Thu, 11 Apr 2024 07:06:05 +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=1712819166; cv=none; b=odZv3LkCeRmM1sbe/X+yvGXU+0rM4zVHv1oA0NJI8Rt0SSzU/ucsDelpBy8CFGOKXTtxK/DcIS+CXsQOCiNdYEwm7hRpp7b4Ld65g+/2Rd3h4UKDFzKb+oRAANH0RitHdexsgANo6/UHYnY6ddIrUJUE+cWAyKYCPFLp9UaIqvg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712819166; c=relaxed/simple; bh=Ms7MWhYSgoVLEWFhl7RcDsGUnMu4a3jpqyQRCc+1JyY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=pvsQirx0KDYcGRSUUOKu1gYjTs3oXCMOwXmiLB22H06ojOyAy/bow2vSkIFeWiG50YqHcGm7m6jarj57pMULBj6ZGwvB75dscwes41mJHhVRZNPBZLNkyZBNAfbBaMh6x+Y7kuiR1gsWfMv88YbfLqSUDU0HIQORYfCxhErVXz8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qiu8HGyu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA075C433F1; Thu, 11 Apr 2024 07:06:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712819165; bh=Ms7MWhYSgoVLEWFhl7RcDsGUnMu4a3jpqyQRCc+1JyY=; h=From:Date:Subject:To:Cc:From; b=Qiu8HGyuTMrzRYWC4zn1orwGBCW2MIpxyIuhmWW0E2KHCxu88kduNIZn9AHWMhbLM 1rtMlBldX8rH2qJ2DwGchWjArr1tNrrH+9fJaV92hIM1vHUn1LMNjBJ3itBdWCoEgZ YL2i/Jfq1UABuZx4SxntZUBKAceTozQfGOY9pzC4lQPOZ3PWnFn8vSwV+kCVBsaLQK ZTFSYdo3SjiBita1Iz58OUJYtZu1YkRXqzt3byR1Hx3+0U4Y2nl6/4M5QxbWr6LBPM 7ly0xVltPjVQGezwtWTP/aQ6Px4ULZTCwEiDPgYJZnh43u43nxW/zyBxrDccj8c6sT +stP4P7ToFjTw== From: Benjamin Tissoires Date: Thu, 11 Apr 2024 09:05:56 +0200 Subject: [PATCH] HID: bpf: fix hid_bpf_input_report() when hid-core is not ready 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 Message-Id: <20240411-fix-hid-bpf-v1-1-4ae913031a8c@kernel.org> X-B4-Tracking: v=1; b=H4sIANOLF2YC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDE0ND3bTMCt2MzBTdpII03bQkM3OgWGKymamBElBHQVEqUBpsWnRsbS0 ANYJovl0AAAA= To: Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1712819164; l=1376; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=Ms7MWhYSgoVLEWFhl7RcDsGUnMu4a3jpqyQRCc+1JyY=; b=tLc066LRWOxZye4PVz2dESDMT6CmvYLPRXg7AV5V7wdt1ZyReiZsy3iLPsDz+F2G0j3jgiNP3 XyO3H/qDj6oA1L6putW3JnjQdIq6EextwtUn48ibUFZ5B0T8aYira7q X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= Reported by linux-next: After merging the hid tree, today's linux-next build (x86_64 allmodconfig) failed like this: x86_64-linux-gnu-ld: vmlinux.o: in function `hid_bpf_input_report': (.text+0x1c75181): undefined reference to `hid_input_report' Caused by commit 9be50ac30a83 ("HID: bpf: allow to inject HID event from BPF") I just forgot to put the indirection in place. Link: https://lore.kernel.org/linux-kernel/20240411105131.7830f966@canb.auug.org.au/ Signed-off-by: Benjamin Tissoires --- Seems like an overlook in my patch. --- drivers/hid/bpf/hid_bpf_dispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/bpf/hid_bpf_dispatch.c b/drivers/hid/bpf/hid_bpf_dispatch.c index 79ece3d1b9e2..10289f44d0cc 100644 --- a/drivers/hid/bpf/hid_bpf_dispatch.c +++ b/drivers/hid/bpf/hid_bpf_dispatch.c @@ -534,7 +534,7 @@ hid_bpf_input_report(struct hid_bpf_ctx *ctx, enum hid_report_type type, u8 *buf hdev = (struct hid_device *)ctx->hid; /* discard const */ - return hid_input_report(hdev, type, buf, size, 0); + return hid_bpf_ops->hid_input_report(hdev, type, buf, size, 0); } __bpf_kfunc_end_defs(); --- base-commit: 685dadafbde29dc3d6b7a13be284d684b06d4d4f change-id: 20240411-fix-hid-bpf-fb67411ac650 Best regards, -- Benjamin Tissoires