Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6176816rwb; Mon, 5 Dec 2022 08:54:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf7brqoQRCYOX4WgEaKNmR/3xMZOl4+0HRrrNp35UsV9ii+I9FhhYz5mJAzJjUJvIq2o+GY8 X-Received: by 2002:a17:906:9f09:b0:7bc:db1b:206f with SMTP id fy9-20020a1709069f0900b007bcdb1b206fmr6431646ejc.719.1670259285320; Mon, 05 Dec 2022 08:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670259285; cv=none; d=google.com; s=arc-20160816; b=HBrfbOjG9WubUSz7WZWboGI8LVsl4hoJj/KDlKGdHi+giBEjnJcj3FCCek1ch1mb9l qIuBtTJMKjWJWy9umZHKOKVDIIMfqWneBHiiYgCVECkptDRFvAsJu6rgYBxdwy4MbXYA QQq9mWjMx3TIJkSkYkHP/0MY0gSKACYy/aujSpM033eXfYDjrUj/lZOssY+AQ4OB4aI0 WuXGmGCS55aRxWrwFZeuA6y/gFDjpoU5/8i85s4VEmTpKo7gXC7F0jGdATEa7RIPfyXk WQAPC068Ix27ctSPz92Hjh925RZ4Gc0H4KN/FbMuQoWYZBqIMb1+fFHDc+1qMD2Tnwkn BR4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/we/TY9X/UjbEuq3HgYT/C/G2oJ1wSnJ8iPzmf0TirQ=; b=gQK1C2/rPoyiHf+Xeg2cDUk7XsGq0i1hNckQIaD8cq09S6DdosKSbySQXJafUZUUnU wDapIpfzJ3HpQIKENRyrE+cEkLCKZgpVtao/745VPlOnDjYIQcRTFMAjETqEpoMy160f rOgXpNyVfg+VytkjUOff0Ir3XpXqapH+LGLK7T3Di7/o1QM3m+S5XjgiuoYMJ6RyuHVI WQRK0VG+uY+W3byHxeV9eYoBVyAoBfPyKrKkH5Yxo6NySkvJKjzlZYKh/ZpGHIq4rQyU aVXRu5m2Bxd62A1h/SmI4SkJHaQEtyP1s7bi/0LzScotFU82fqJz07DVr5WZKUGVDicV nVRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ec5wz5t/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs14-20020a170906dc8e00b007c100ed5071si975728ejc.710.2022.12.05.08.54.23; Mon, 05 Dec 2022 08:54:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ec5wz5t/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbiLEQwS (ORCPT + 81 others); Mon, 5 Dec 2022 11:52:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233221AbiLEQvP (ORCPT ); Mon, 5 Dec 2022 11:51:15 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58900D2E1 for ; Mon, 5 Dec 2022 08:49:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670258954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/we/TY9X/UjbEuq3HgYT/C/G2oJ1wSnJ8iPzmf0TirQ=; b=Ec5wz5t/bXlrKxYvx1gRC8hKypSO6u0Q2Zts8jqpDY3cymOQFm2AKDPVvDLMlaCj4sb7FI ZRMTv+cE59W3gzzutLDKLUQPgSCKO8EdttOrv0TXGA9RDU7lAFjqYNm7FYX9+Vbn4CAe7P 17RGdq7UzJoC3inNkcGrLkc1aJP3IyA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-351-rezvupzTNJOOL9Gm4IAPAw-1; Mon, 05 Dec 2022 11:49:09 -0500 X-MC-Unique: rezvupzTNJOOL9Gm4IAPAw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B2A7785A5A6; Mon, 5 Dec 2022 16:49:08 +0000 (UTC) Received: from plouf.redhat.com (unknown [10.39.194.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1BCE2141511A; Mon, 5 Dec 2022 16:49:06 +0000 (UTC) From: Benjamin Tissoires To: Jiri Kosina , Florent Revest , Jon Hunter , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires Subject: [PATCH HID for-next v2 3/4] HID: bpf: enforce HID_BPF dependencies Date: Mon, 5 Dec 2022 17:48:55 +0100 Message-Id: <20221205164856.705656-4-benjamin.tissoires@redhat.com> In-Reply-To: <20221205164856.705656-1-benjamin.tissoires@redhat.com> References: <20221205164856.705656-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As mentioned in the link below, having JIT and BPF is not enough to have fentry/fexit/fmod_ret APIs. This resolves the error that happens on a system without tracing enabled when hid-bpf tries to load itself. Link: https://lore.kernel.org/r/CABRcYmKyRchQhabi1Vd9RcMQFCcb=EtWyEbFDFRTc-L-U8WhgA@mail.gmail.com Fixes: f5c27da4e3c8 ("HID: initial BPF implementation") Signed-off-by: Benjamin Tissoires --- drivers/hid/bpf/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/bpf/Kconfig b/drivers/hid/bpf/Kconfig index 298634fc3335..03f52145b83b 100644 --- a/drivers/hid/bpf/Kconfig +++ b/drivers/hid/bpf/Kconfig @@ -4,7 +4,8 @@ menu "HID-BPF support" config HID_BPF bool "HID-BPF support" default HID_SUPPORT - depends on BPF && BPF_SYSCALL + depends on BPF && BPF_SYSCALL && \ + DYNAMIC_FTRACE_WITH_DIRECT_CALLS help This option allows to support eBPF programs on the HID subsystem. eBPF programs can fix HID devices in a lighter way than a full -- 2.38.1