Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp972940iob; Fri, 13 May 2022 18:11:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo8jAYR3UBttK3Br0S59/6xusNVO11wLkga+qJiRQ6HDARknp8ovHX4Ct09UhX/4RbOvap X-Received: by 2002:a7b:cd97:0:b0:38f:f785:ff8 with SMTP id y23-20020a7bcd97000000b0038ff7850ff8mr16945142wmj.44.1652490717763; Fri, 13 May 2022 18:11:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652490717; cv=none; d=google.com; s=arc-20160816; b=vrFEVMBYds9O6U8bHoZhcKWUQ6jDfpBiW5rpa2cvmbraQk5QlrPmYH5kUh7ZblU0Wo z6H3f4p34Lw3Z3TtQ3J0TOxD6B7BM3Nu7bvbpv2qiVc+7p3XN/MTWb3KYYgFjQlkV4S+ upmbpKVZHv0ZJpLLE+I9v6YcU7Ls+7CL/uweXE0SD7aYhiH6ynf8DBw3+J3MhMFRo1RV cT7e7mCssH9W4yAhi+8H5U8Xnf6BBcP4gxh2b3ZDMyaI24hoXxGl0898syb5UNgc1Zfm Wp0Yk2m1qGs8fNZuFZej/5H/MttztxfTa0ZyZvt+yvK3ilGz/v5Z23gmSlOED3i6B7rE r9NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kBGZe23og3tuPkyPlZIYCKerjwwMq/7LVdJGiLj5N80=; b=J86CDO13S7ZGY5tuy2hlV8doTdzpyFh2bdAS2MDkmNezard9JgVb6y1OsWOSDpwB3v Atlt2VvwRGU832ERrgxxqUMcyyx+bb7NHJyvIAZ1cT6/Qcdtw4MP9erelggYgDszFEH9 Lkq3kaCLISjbttvmDNYj3WYJaT89jRrp4HUXx1YqJK1V+wV2OZ0qmp1YSEDzQI5y6Z7j XeEcryOaf7yhNUpVP7J1SSburTrfGmK1hAzhE0EYdzEjGuHmYeOMkyLFOBUcEBUSAxY5 CS+0HsZM+KMK9GXyZDV7L3zTfxaXAq9L5bSDiZkbtLGG0eb2J/TdeI2FpIoD8QdN9lwo 4dVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ly2SkEjs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m8-20020a7bcb88000000b0039401d739f8si6493554wmi.208.2022.05.13.18.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ly2SkEjs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4134439B6E6; Fri, 13 May 2022 16:43:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234427AbiEMTnL (ORCPT + 99 others); Fri, 13 May 2022 15:43:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231138AbiEMTnK (ORCPT ); Fri, 13 May 2022 15:43:10 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CE20A1BA; Fri, 13 May 2022 12:43:09 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id z126so7880369qkb.2; Fri, 13 May 2022 12:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kBGZe23og3tuPkyPlZIYCKerjwwMq/7LVdJGiLj5N80=; b=Ly2SkEjsVdSoQYd3sFewyPe6Iyi2XDe1w5f7QAs2D25JvktaDIwyyVof/XTgLGA8oX UhAHMY/kIvlUmoPMTmZrDojbnqEsNaL9fXwJm3osv64ZaxJllE1cnW78kNaAuNfblR5+ T1vYUF+rmGIgl0xXlSq0MvAlZPeB3jD13fI/3oReqIFGyTXl/wVeiB0+wYKcsVSboi7M JDhqTPMpnPv3gDGY/i6i9Hvah8ORTw56cj5aGnh/hv2LYwC1LdKJfsCAGrdjrifIHc/X mYJqMzZHn9sL2Xe7Q/6Rp13gICSuct9fiDLMtb0qja3+19z21e2TSJx+Z9c7jYSQG3HD HH6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kBGZe23og3tuPkyPlZIYCKerjwwMq/7LVdJGiLj5N80=; b=Rtbb8LLThN4/1f1xQ6SPayTgH68bLBjgamTDZSJcwm0KSzI2bhNITcpaJSylSL9OPM 8qjrWk6fHkImKwFV4AHg7MkMHoL5m/T6EGDv5MtG0KahDYabFTH3DnRfcplOmgake4sD A5Jdx1pIv1xuG2lwsaaabzYhzGNpolZi/J0Gs7jv2uZZlDH63uPJcdUFBKHwIh1gkUbP 4Ykl0HxUugGuvQ46ihMWq60I9Kqc/++Yw70K6/ASFFw5d4rmY4Sn1qTBrEcWHlkGo4EO ppl71Ya+/cZNvkkS0h8BHCw8PtvAklLFXdaJtsgNKvroWqTnGHv/Hp6l4ZSYqM50Bpsr JS7A== X-Gm-Message-State: AOAM530OfRzNnJ/im+turF5bGpccF8AL+Pr7UHmaG+lHQUDlL5+mAK/M NoIMGNwakZCI5YjjoxBuPrg5uJjaHL06KVYYc/4= X-Received: by 2002:a05:620a:28c7:b0:6a0:5de3:e6 with SMTP id l7-20020a05620a28c700b006a05de300e6mr5036681qkp.464.1652470988079; Fri, 13 May 2022 12:43:08 -0700 (PDT) MIME-Version: 1.0 References: <20220421140740.459558-1-benjamin.tissoires@redhat.com> <20220426040314.ez3cdpv2w45vbgkk@MBP-98dd607d3435.dhcp.thefacebook.com> <20220512042327.vla3j7rjqrmjporp@MBP-98dd607d3435.dhcp.thefacebook.com> In-Reply-To: From: Alexei Starovoitov Date: Fri, 13 May 2022 12:42:57 -0700 Message-ID: Subject: Re: [RFC bpf-next v4 0/7] Introduce eBPF support for HID devices (new attempt) To: Benjamin Tissoires Cc: Greg KH , Jiri Kosina , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Tero Kristo , lkml , "open list:HID CORE LAYER" , bpf Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Fri, May 13, 2022 at 10:02 AM Benjamin Tissoires wrote: > > On Thu, May 12, 2022 at 6:23 AM Alexei Starovoitov > wrote: > > > > On Sat, Apr 30, 2022 at 09:12:09AM +0200, Benjamin Tissoires wrote: > > > > > > Also, I wonder if we should not have some way to namespace kfuncs. > > > Ideally, I would like to prevent the usage of those kfuncs outside of > > > some helpers that I define in HID so I don't have to worry too much > > > about other trace programs fuzzing and segfaulting the kernel. > > > > That would be a great feature to have. Other folks expressed the same interest. > > Just grouping them by prog type is not flexible enough. > > It feels kfuncs could be scoped by (prog_type, attach_btf_id or attach_hook) pair. > > What are your thoughts? > > > > Scoping by attach_btf_id is very appealing to me (attach_hook less TBH): > I have internal functions I do not want normal users to use, and also > it would also restrict who can call what in the more general case. > > However, I don't think I'll put that effort in v5. It is a nice to > have feature IMO, but not really required ATM. Great. Looking forward to it.