From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [207.211.30.44]) (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 5B2BE12DDB0 for ; Wed, 1 May 2024 13:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=207.211.30.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714569378; cv=none; b=AqXGZVESS31rqFkXLVz+m93XsvqgrXMfuQvvlcBoGNPW+3BMKlXl5cXPDXOt/hLfN9jN8Nrjqz9tlOGzckv9pmqPNdA8pTB+eGnKeOBjkJODDRnmEmbRig5Q7w8CD9fFnN5GDmRm/8YkBXA8es69tjp5ARF4mbLneyOZWycgI/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714569378; c=relaxed/simple; bh=E4JD48EzrcbVz6QbQEs6xRmajMOwhFuIhzhkDGkLnNg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: In-Reply-To:Content-Type:Content-Disposition; b=X6oBWUoTuH4s7cOlLRKhuOhkxEXOv8F/631vvT+b2FhTJsphDoxcAtnePf3ebUaXNjTdhugIf0jJW1wakHtyjjyV0Fyzr8kBAsz1MaMoXZbsXtGwv132C0TRRrV2EXrRoPLvtKPeKHYjKCUe2+DwtY3jWc7TajUA2vpPzIPEMzU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=queasysnail.net; spf=none smtp.mailfrom=queasysnail.net; arc=none smtp.client-ip=207.211.30.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=queasysnail.net Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=queasysnail.net Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-569-7VD2Mx-0MruFMXPFfcU4hA-1; Wed, 01 May 2024 09:16:06 -0400 X-MC-Unique: 7VD2Mx-0MruFMXPFfcU4hA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 085AE81F317; Wed, 1 May 2024 13:16:06 +0000 (UTC) Received: from hog (unknown [10.39.193.137]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0FC61C271A4; Wed, 1 May 2024 13:15:55 +0000 (UTC) Date: Wed, 1 May 2024 15:15:54 +0200 From: Sabrina Dubroca To: j.granados@samsung.com 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 , 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 , Julian Anastasov , 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 net-next v6 8/8] ax.25: x.25: Remove the now superfluous sentinel elements from ctl_table array Message-ID: References: <20240501-jag-sysctl_remset_net-v6-0-370b702b6b4a@samsung.com> <20240501-jag-sysctl_remset_net-v6-8-370b702b6b4a@samsung.com> Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240501-jag-sysctl_remset_net-v6-8-370b702b6b4a@samsung.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: queasysnail.net Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 2024-05-01, 11:29:32 +0200, Joel Granados via B4 Relay wrote: > From: Joel Granados >=20 > 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/) >=20 > Avoid a buffer overflow when traversing the ctl_table by ensuring that > AX25_MAX_VALUES is the same as the size of ax25_param_table. This is > done with a BUILD_BUG_ON where ax25_param_table is defined and a > CONFIG_AX25_DAMA_SLAVE guard in the unnamed enum definition as well as > in the ax25_dev_device_up and ax25_ds_set_timer functions. ^^ nit: not anymore ;) (but not worth a repost IMO) > diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c > index c4f8adbf8144..c50a58d9e368 100644 > --- a/net/ax25/ax25_ds_timer.c > +++ b/net/ax25/ax25_ds_timer.c > @@ -55,6 +55,7 @@ void ax25_ds_set_timer(ax25_dev *ax25_dev) > =09ax25_dev->dama.slave_timeout =3D > =09=09msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10; > =09mod_timer(&ax25_dev->dama.slave_timer, jiffies + HZ); > +=09return; nit: return not needed here since we're already at the bottom of the function, but probably not worth a repost of the series. > } --=20 Sabrina