Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1866917pxm; Fri, 4 Mar 2022 05:13:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwn6xjwPTshY4cixeunzgY/w5DUiXIE9wHCP62oImyTQaUG+GO6i9Os9OgZbNNCEnrQDcuT X-Received: by 2002:a17:907:da6:b0:6d6:f8ce:e03 with SMTP id go38-20020a1709070da600b006d6f8ce0e03mr13897759ejc.516.1646399630809; Fri, 04 Mar 2022 05:13:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646399630; cv=none; d=google.com; s=arc-20160816; b=csiy7hzge621KS4k3aYsl3z2gj/5JP/AWD7kkZbr2ElACjpGBsIu/7Y7zJ91P+52Y5 Ms6eyrH9ujbMrc/7v3tQet4h2bks8YOFp8rnvcxYVO3P4ZBCM+CWHXfzbYM5ScnvfgYc SITduIRnyeWBD1kwpKx63Ev9UhmcpZSW3Y1LMmFujkONv8N7nVKOQ1twHbUMhlvBxAnj EVLK3nqptVIjinzynDCLbYNAhtEKwXYLBBeMGyRapuJzGQqcSeunVTCS1Q8TO3vniku5 hfmpAPLkqu1Se/l0vIvEvF8H98AitSMc13ap+h2U8VMAsk5qfNPbZO0iI0/eSqlNpvL0 b8vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/6Asc1kuXCqlyUyBpJVWR3WYcUaPQlxeHwanFGxnWUA=; b=rXb8FEIfEM3cDHnIE8anY4F4vEsed8j3glySjYmGgjrc6k/KZuHa2uCb9j/ace6fg/ m0qwuNTYi+ulIvDaPrE9AW0hTtT7AWLFAF16sepLAoAhrvy4Ja82Hpa3kIUDBAjRMb/W u4eM6zGJSj59oa9VvwCodSBQ4doaPBlHJBr7bcUX+3PApnL4YMxQ1gAEMdsHPzWDZ624 9yommxU490zZmVf+WXLyARQXMtlqfzoOtgsVvaCIEiZXl2yMqnnETSHQQ13vycUHeeZN +TC8PLuDJr+1dKZ74+W2ZYmBagZMWaTYpYq9ArvvPl0+btJMb1+GYhqTxWsJ0QtXVzCK boPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=pwc7auhd; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb37-20020a1709071ca500b006d879078330si4072943ejc.246.2022.03.04.05.13.27; Fri, 04 Mar 2022 05:13:50 -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=@infradead.org header.s=bombadil.20210309 header.b=pwc7auhd; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237371AbiCDAY1 (ORCPT + 99 others); Thu, 3 Mar 2022 19:24:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbiCDAY0 (ORCPT ); Thu, 3 Mar 2022 19:24:26 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D52F10529C; Thu, 3 Mar 2022 16:23:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/6Asc1kuXCqlyUyBpJVWR3WYcUaPQlxeHwanFGxnWUA=; b=pwc7auhdwTjfEryudBhNUHhadZ j817TFuFaVCkRG4K02eM6NN3V9hpbDyxLiKmcnKqcLWmnGZT8/+sfsZ3qXVga3V/hixH0FwwN1QmA rjpJao3Slt8sVmFtSttFGEmk5ww+zx4r7pcfcwe05wBFOTYJEVQid6TaQoxWV5qfWNYzufIJAthME yZaLJIUPToWR3f8LiTcfZbADAGZIEYRfRKJRDZy2/jfkgJj4yc2hfIuawzldgw/SrnZdzfpsnlC7r M6rMZEdN61VHcgpJePGd+HuVt6VTAAJEVUYtkjwA49AgjGLJQiMnrFKSCPBBjuoeI3Zd0hTJcMEDM r4TXb6LQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPvjC-0089dk-PG; Fri, 04 Mar 2022 00:23:26 +0000 Date: Thu, 3 Mar 2022 16:23:26 -0800 From: Luis Chamberlain To: Daniel Borkmann Cc: Yan Zhu , andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, john.fastabend@gmail.com, kafai@fb.com, keescook@chromium.org, kpsingh@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, liucheng32@huawei.com, netdev@vger.kernel.org, nixiaoming@huawei.com, songliubraving@fb.com, xiechengliang1@huawei.com, yhs@fb.com, yzaikin@google.com, zengweilin@huawei.com Subject: Re: [PATCH v3 sysctl-next] bpf: move bpf sysctls from kernel/sysctl.c to bpf module Message-ID: References: <20220302020412.128772-1-zhuyan34@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, Mar 04, 2022 at 12:44:48AM +0100, Daniel Borkmann wrote: > On 3/2/22 9:39 PM, Luis Chamberlain wrote: > > On Wed, Mar 02, 2022 at 10:04:12AM +0800, Yan Zhu wrote: > > > We're moving sysctls out of kernel/sysctl.c as its a mess. We > > > already moved all filesystem sysctls out. And with time the goal is > > > to move all sysctls out to their own susbsystem/actual user. > > > > > > kernel/sysctl.c has grown to an insane mess and its easy to run > > > into conflicts with it. The effort to move them out is part of this. > > > > > > Signed-off-by: Yan Zhu > > > > Daniel, let me know if this makes more sense now, and if so I can > > offer take it through sysctl-next to avoid conflicts more sysctl knobs > > get moved out from kernel/sysctl.c. > > If this is a whole ongoing effort rather than drive-by patch, It is ongoing effort, but it will take many releases before we tidy this whole thing up. > then it's > fine with me. OK great. Thanks for understanding the mess. > Btw, the patch itself should also drop the linux/bpf.h > include from kernel/sysctl.c since nothing else is using it after the > patch. I'll let Yan deal with that. > Btw, related to cleanups.. historically, we have a bunch of other knobs > for BPF under net (in net_core_table), that is: > > /proc/sys/net/core/bpf_jit_enable > /proc/sys/net/core/bpf_jit_harden > /proc/sys/net/core/bpf_jit_kallsyms > /proc/sys/net/core/bpf_jit_limit > > Would be nice to consolidate all under e.g. /proc/sys/kernel/bpf_* for Oh the actual "name" / directory location is not changing. What changes is just where in code you declare them. > future going forward, and technically, they should be usable also w/o > net configured into kernel. That's up to you, and just consider if you have scrupts using these already. You may need backward compatibility. You don't need networking to create the net directory for sysctls too. The first sysctl to create the directory creates it, if its not created, it will be created. > Is there infra to point the sysctl knobs > e.g. under net/core/ to kernel/, or best way would be to have single > struct ctl_table and register for both? Try proc_symlink(). Luis