Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp224684lqf; Fri, 26 Apr 2024 05:10:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWXMeux0obBLnGH+KHfMc2RkWJsCxQ05GJvMneD7kxmCIHw84cnlAU08WKpYU22/PrfQfJClKqQEt4QK6iCavB9sWX9vyR0hT/L0xEOsA== X-Google-Smtp-Source: AGHT+IGR7JebLnYc29UOhWDC5enCeCmCqqWrO1pTokf0RlKZm7FMD99u8/HtbvAluq5KDY0bcg29 X-Received: by 2002:a05:6a00:181a:b0:6ea:c4e5:a252 with SMTP id y26-20020a056a00181a00b006eac4e5a252mr3470300pfa.5.1714133442669; Fri, 26 Apr 2024 05:10:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714133442; cv=pass; d=google.com; s=arc-20160816; b=Yuy3TFL/1JFAU31pVeSU+gwKZO8q3VxqAwh8mj1EWtsixQjC4j120q0IoHEtsWg5jt cqme9I/Z0Z8CrI4Srm89yLolhsiZzf4htFeDnPxoSFH5PTdUReQK5XgfXD9o1tK2agVf FVsfI4ws4fVLM4HUHJnsWYmkq5YhQbYCo5pD6tMVyC85kpwSnWXMQZsrK/TIOGZSsACR S0ByVC6/x3A3seSFYhEcP1nnDcxpp4Too0IRJKBcVQOiLCliwKTtcec+8vBqmZ9IvWfA wDBYF0eh6oTe+SXbIFvoT+yQtQ91odjeSij06HLmhL5js1BxoVEP/5xaleQV1lAtwIU0 oGaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=xpOA19BGuizZPvsBcs9xOTFimN9o52W6EKpR1417fRA=; fh=lX6HJIxPU+TSZTvmV7y3QjXiWchUc2B2KhKptQ1Nw+s=; b=L1Tu7TbClNY6Z91wOoN/qbMcq/1cvsIz82t7E/jV9Pr/gDg8sebHKhk2YQi66hjoxV nkH043W8vhCucYYu73XKOOMXK8n4Mlw/SDVU5cCfLUBt5X90O5udR3zSOhigUrTiTj54 /hracgBKDtQWSZHfc4WZ/rAvQPfX7VFSlSTrIeUXQeIAKaMFx2ahyevM7xCT6H/G+DpB 2AVmnAtp3wDBEQ5OUtFxzgK5vGbxiVmVvo0u9N/Zrygv7XefvUz7TZnKWGt+32ozCwFn aBq4kF/AFlwNU4FHGYfQd5l6ww0anQ1cz/FW1VFFUXkgH6Hp4LqFSXq/zNZqy6tKapM0 94wg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ssi.bg header.s=ink header.b=Ee8l6YFJ; arc=pass (i=1 spf=pass spfdomain=ssi.bg dkim=pass dkdomain=ssi.bg dmarc=pass fromdomain=ssi.bg); spf=pass (google.com: domain of linux-nfs+bounces-3034-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3034-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ssi.bg Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z198-20020a6333cf000000b005fd0a2ebc62si10320613pgz.210.2024.04.26.05.10.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 05:10:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3034-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=@ssi.bg header.s=ink header.b=Ee8l6YFJ; arc=pass (i=1 spf=pass spfdomain=ssi.bg dkim=pass dkdomain=ssi.bg dmarc=pass fromdomain=ssi.bg); spf=pass (google.com: domain of linux-nfs+bounces-3034-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3034-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ssi.bg 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 27E9C2842E3 for ; Fri, 26 Apr 2024 12:10:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9510B145B1E; Fri, 26 Apr 2024 12:10:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ssi.bg header.i=@ssi.bg header.b="Ee8l6YFJ" X-Original-To: linux-nfs@vger.kernel.org Received: from mg.ssi.bg (mg.ssi.bg [193.238.174.37]) (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 6D35014534B; Fri, 26 Apr 2024 12:10:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.238.174.37 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714133434; cv=none; b=BscJAKSYOrRPU8Nbp4YBtlKThjyGjIDu/910362iJmMcZjOpSwlSBqUm5iORid4sqcnAv7yNA+50ynNlXcZ195cqlrpX5gPq+KUL6yVDzKNfTov0RKfCfioqbUmg+jd+rPbv+5jp/zqSufrye+b17YjiB9l7en49S3LP8hBqi3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714133434; c=relaxed/simple; bh=sk3F8kQlklKnamzgzVwKQ00rlNEpTKcd9WWMXq8UVps=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=atDnJvBvQaCpA8aIfLOVMoIyYeD7M4LxF4NM4+CaFIRHFSABwCwTV7nvASndQBgekkMJbym7CkpUL4fqyt8Y76wna3cTVEWokR5Uj2BUGinkh9dFUHO5RbtrQqfm3jq4Z7c6JjOoQE7M1MY7DyJypW31i4B8DHp1iKuPgEBdoEg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ssi.bg; spf=pass smtp.mailfrom=ssi.bg; dkim=pass (1024-bit key) header.d=ssi.bg header.i=@ssi.bg header.b=Ee8l6YFJ; arc=none smtp.client-ip=193.238.174.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ssi.bg Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ssi.bg Received: from mg.ssi.bg (localhost [127.0.0.1]) by mg.ssi.bg (Proxmox) with ESMTP id 6674A201AD; Fri, 26 Apr 2024 15:10:29 +0300 (EEST) Received: from ink.ssi.bg (ink.ssi.bg [193.238.174.40]) by mg.ssi.bg (Proxmox) with ESMTPS; Fri, 26 Apr 2024 15:10:28 +0300 (EEST) Received: from ja.ssi.bg (unknown [213.16.62.126]) by ink.ssi.bg (Postfix) with ESMTPSA id C3D63900281; Fri, 26 Apr 2024 15:09:52 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ssi.bg; s=ink; t=1714133398; bh=sk3F8kQlklKnamzgzVwKQ00rlNEpTKcd9WWMXq8UVps=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=Ee8l6YFJS7RZ24aWwUO+TQ58uAlvKg44da8bN2aXoBnCDabYnu1QZRbWM/YCvMCtm KCb/TDE1mSM/2m6jLtLrvv6haBRhIsD746J+S3tEsYMKzO87OwtlGyaijhx9Z6novF rNPRpgWaQyfc0DLkHErLzQp3U+PMcMndbKLDFZiA= Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by ja.ssi.bg (8.17.1/8.17.1) with ESMTP id 43QC9jvI068943; Fri, 26 Apr 2024 15:09:47 +0300 Date: Fri, 26 Apr 2024 15:09:45 +0300 (EEST) From: Julian Anastasov To: Joel Granados cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexander Aring , Stefan Schmidt , Miquel Raynal , David Ahern , Steffen Klassert , Herbert Xu , Matthieu Baerts , Mat Martineau , Geliang Tang , Ralf Baechle , Remi Denis-Courmont , Allison Henderson , David Howells , Marc Dionne , Marcelo Ricardo Leitner , Xin Long , Wenjia Zhang , Jan Karcher , "D. Wythe" , Tony Lu , Wen Gu , Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Jon Maloy , Ying Xue , Martin Schiller , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Roopa Prabhu , Nikolay Aleksandrov , Simon Horman , Joerg Reuter , Luis Chamberlain , Kees Cook , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dccp@vger.kernel.org, linux-wpan@vger.kernel.org, mptcp@lists.linux.dev, linux-hams@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-afs@lists.infradead.org, linux-sctp@vger.kernel.org, linux-s390@vger.kernel.org, linux-nfs@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-x25@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux.dev, lvs-devel@vger.kernel.org Subject: Re: [PATCH v5 6/8] netfilter: Remove the now superfluous sentinel elements from ctl_table array In-Reply-To: <20240426-jag-sysctl_remset_net-v5-6-e3b12f6111a6@samsung.com> Message-ID: References: <20240426-jag-sysctl_remset_net-v5-0-e3b12f6111a6@samsung.com> <20240426-jag-sysctl_remset_net-v5-6-e3b12f6111a6@samsung.com> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Hello, On Fri, 26 Apr 2024, Joel Granados via B4 Relay wrote: > From: Joel Granados > > This commit comes at the tail end of a greater effort to remove the > empty elements at the end of the ctl_table arrays (sentinels) which will > reduce the overall build time size of the kernel and run time memory > bloat by ~64 bytes per sentinel (further information Link : > https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) > > * Remove sentinel elements from ctl_table structs > * Remove instances where an array element is zeroed out to make it look > like a sentinel. This is not longer needed and is safe after commit > c899710fe7f9 ("networking: Update to register_net_sysctl_sz") added > the array size to the ctl_table registration > * Remove the need for having __NF_SYSCTL_CT_LAST_SYSCTL as the > sysctl array size is now in NF_SYSCTL_CT_LAST_SYSCTL > * Remove extra element in ctl_table arrays declarations > > Acked-by: Kees Cook # loadpin & yama > Signed-off-by: Joel Granados > --- > net/bridge/br_netfilter_hooks.c | 1 - > net/ipv6/netfilter/nf_conntrack_reasm.c | 1 - > net/netfilter/ipvs/ip_vs_ctl.c | 5 +---- > net/netfilter/ipvs/ip_vs_lblc.c | 5 +---- > net/netfilter/ipvs/ip_vs_lblcr.c | 5 +---- > net/netfilter/nf_conntrack_standalone.c | 6 +----- > net/netfilter/nf_log.c | 3 +-- > 7 files changed, 5 insertions(+), 21 deletions(-) ... > diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c > index 143a341bbc0a..50b5dbe40eb8 100644 > --- a/net/netfilter/ipvs/ip_vs_ctl.c > +++ b/net/netfilter/ipvs/ip_vs_ctl.c ... > @@ -4286,10 +4285,8 @@ static int __net_init ip_vs_control_net_init_sysctl(struct netns_ipvs *ipvs) > return -ENOMEM; > > /* Don't export sysctls to unprivileged users */ > - if (net->user_ns != &init_user_ns) { > - tbl[0].procname = NULL; > + if (net->user_ns != &init_user_ns) > ctl_table_size = 0; > - } > } else > tbl = vs_vars; > /* Initialize sysctl defaults */ We are in process of changing this code (not in trees yet): https://marc.info/?t=171345219600002&r=1&w=2 As I'm not sure which patch will win, the end result should be this single if-block/hunk to be removed. Regards -- Julian Anastasov