Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1408287lqj; Mon, 3 Jun 2024 23:49:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMWA7KDNF0WYZZxjYBxPD4jTaNjiAkx3dbDkv4TdUsJjfAte0rm0P1YAlZiFUr5ZdWd7lmpt7r15umzad77pwr5/WjlaYeyxPDtKqIPA== X-Google-Smtp-Source: AGHT+IEKbqLkGY4KCFlhbIa3f8m67Xh2JVeUbTM66gMfQwcW9vBMALSzEGl4JwowOQ+Z3vcaE7Hp X-Received: by 2002:a50:d4d2:0:b0:56e:99e:1fac with SMTP id 4fb4d7f45d1cf-57a365a0b9cmr7941910a12.39.1717483751643; Mon, 03 Jun 2024 23:49:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717483751; cv=pass; d=google.com; s=arc-20160816; b=ZweRwSGU1ee4/aScbkbR+xPKgdmwxyEW4Npr5EgTPCBBDPC2QJdtq4bKjA9DehqAR3 hCgymbGZ23nZnM8wUKC5iQRe62QQSmKiJa2l9Nz+o93U0bzDP5VvEUZVfvwuciVb+K8a M88DSVRKmZzh6USVztzF+jdGvrrkrir8fX+wQ8e3Iv4NMSkYratLwSm9PJ4mRNAGtctc QLNy+n/RcCJUP/iZ0AuoPuU/qSOIVqiP1fcTRLAQngHKfVBG1foc7NRKTgyztltI4U4T Im2kpXHnznRaOiEyMLqvAMlpDgCo+Bsehj2GurKKPhszs9fw95jNU3J7e0Uqeh2NGCxG qVlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:cms-type:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id :subject:cc:to:from:date:dkim-signature:dkim-filter; bh=QbTrIPhFImjlKnd/ohqIcW3b/iR9Pfpr+J0VPVe1xtU=; fh=E4LEb0t4M3Mohcm1GtfdSvNuz8DjbhIrTfnhWXXkPdM=; b=uiAZe+hqjZ0sNK6xu/KHB+4FlRJt8HDWO5nChlQFLm9hM2T3sp5IaHon/LgbfOfZEf CIzQqe48EYA4+fAcZFpkTZMKaxiCYSQbEUFB+b/wuJU6UXCte0xVJWKrqR/dwP7ChvLT rf3dUo6V/bv7VG5c147tKrQlbKQTBe7JUmS+rNnyRMundtizFm+I0cJa91dSCZW513kJ VddXAdBJdA7XmIrL/hw2WFczTmRcj/Y595mEh1oDB6zC4SoPPAJRjMgPteKouovS7j2v TeLDFygmHHM039xtv/3IE0SXyNKnhrZuQoQwkwiG3774E1a8A/64guSzk5wl1IC8QtO0 jlnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KiJcuOEp; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-200123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31b81699si4604044a12.25.2024.06.03.23.49.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 23:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KiJcuOEp; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-200123-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 32D7B1F2589E for ; Tue, 4 Jun 2024 06:49:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3632E14036A; Tue, 4 Jun 2024 06:48:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="KiJcuOEp" Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 EF83013E04D for ; Tue, 4 Jun 2024 06:48:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717483738; cv=none; b=jCDyTsDrsUTE4hRKTTKipHTOrfPY4zSaKyS7hW21M2V6DY613up//41e4SaJSWRREZfn1TMwoxxo8eCVIJ5DnzmhcrIWv5WK0fzX7cdBg3XRSf+IvDtG3tR4xXn4fkbsT77uQQbb40s2OcXTOKPr6jVv4FajRVzi7pSPRfg+tVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717483738; c=relaxed/simple; bh=O1UfMaKD/hmWFcGVX0dHXqkE0XTi/7iwjX0Urne5AX0=; h=Date:From:To:CC:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:References; b=KT1EFQVN+5d1XUAa3MWvrSbWer+tF7+Ai3BD3Y0Kd1KODsjtCjeOTpYuJvJMowsuIMkAaNp5RD1LVthsiygEtVFg9yykrPEwlzv6ZMAw28vgK8YjMB/KMBZxZI/vwCq9hczE2sXB+buzLq9ZuM2Y7HjLLE/a1v1DhODkFzIXd30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=KiJcuOEp; arc=none smtp.client-ip=210.118.77.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240604064853euoutp02ccf8bb280b348f96e46d889ffa7e1932~VulsRJ6nJ1624716247euoutp02L for ; Tue, 4 Jun 2024 06:48:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240604064853euoutp02ccf8bb280b348f96e46d889ffa7e1932~VulsRJ6nJ1624716247euoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1717483733; bh=QbTrIPhFImjlKnd/ohqIcW3b/iR9Pfpr+J0VPVe1xtU=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=KiJcuOEp0bmxzmLWz26L/CKL9Uy1Jrkh2EThm1VuZfJKp/W5MYRnq8MC6Y4QqDQz4 S+gBnPR7KqdRUcFuAx1RehG0Ue2fsvKxjMnA62wYwIBPE8cyDwnzyjP4IHKZGYEdaw 9Vxmz12NHonqKK0YOlJz2FwJOYsBbPEknfqGyC5U= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20240604064852eucas1p1d00075de5770a5fa8593c734aef9db91~Vulr3Drz81683916839eucas1p1C; Tue, 4 Jun 2024 06:48:52 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id F8.C4.09875.4D8BE566; Tue, 4 Jun 2024 07:48:52 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240604064852eucas1p2db69f8d2d13b82887fbb3a4dd535c024~Vulra1_of1670216702eucas1p2K; Tue, 4 Jun 2024 06:48:52 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240604064852eusmtrp1071da7d58997076776fcc54baf4f28c8~VulrZuwRy1417014170eusmtrp1I; Tue, 4 Jun 2024 06:48:52 +0000 (GMT) X-AuditID: cbfec7f4-131ff70000002693-87-665eb8d42702 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 7E.87.08810.4D8BE566; Tue, 4 Jun 2024 07:48:52 +0100 (BST) Received: from CAMSVWEXC01.scsc.local (unknown [106.1.227.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240604064852eusmtip1d292ba451e2cc73f72b5fe4a618458fc~VulrNK7321516115161eusmtip1R; Tue, 4 Jun 2024 06:48:52 +0000 (GMT) Received: from localhost (106.210.248.71) by CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 4 Jun 2024 07:48:51 +0100 Date: Tue, 4 Jun 2024 08:48:47 +0200 From: Joel Granados To: Jakub Kicinski , Paolo Abeni , Eric Dumazet , "David S. Miller" CC: Luis Chamberlain , Kees Cook , , , , Subject: Re: [PATCH 3/8] sysctl: Remove check for sentinel element in ctl_table arrays Message-ID: <20240604064847.4os2h42bj3cg6ptl@joelS2.panther.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240604-jag-sysctl_remset-v1-3-2df7ecdba0bd@samsung.com> X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) X-Brightmail-Tracker: H4sIAAAAAAAAA02SaUwTURSF8zoz7VAtmRa0N6AgdYuoKEpw4orGZaJiNMbdII0MSwQ0U4u7 4o6tEqAgSpVUolbLEjMS4oq2xDaIYdEacWviGlQUShVxSbV0cPn33XfPefeel0diigoihEzL 3Mxymep0lViK19i/NY11XklIHu/yjqJPNR3A6Tf2lxL6nj6Dbq7JJegbN+tx+sG1U2LaVfGL oFvz3iDabhpIdze0ozgpY8xuwZnqi49FjInXMrzliJjhuwokTEftQzHj4cMWS1ZLpyax6WlZ LDdueqI0lbfUiTd5pFu7PDlYNmogdSiABCoGeMtxiQ5JSQV1AUFpURESis8IblV1E0LhQbDv V4/oj8Ww14gLDTMCy7sq9Ff1pPasWCguI2gzvyB6LTg1DD7xd/12MTUGmtqfYb2iYKoQgfN5 qX8IRt1GcMLl8quCqJVgtRr8LKPiQFdhxASWQ/3J13gvY76bTNe7fONIH4eC2euPFEDNgzNf jH27qsDa0oELvAsq7ff8UYE6HACFukpCaMyGvOzDmMBB8N5RLRF4EDQYjuKCweB7Dm9nn7sc wfm9X/pGTIEDztd9jplwOqdO1LsRUIHQ+lEuLBoIBTXFmHAsg5xDCkE9Aspd7XgeGlryX7SS /6KV/ItmQpgFKVmtJiOF1UzIZLdEadQZGm1mStT6jRk88n2oBq/j8xVkfu+OsiERiWwISEwV LMvdvSZZIUtSb9vOchvXcdp0VmNDoSSuUsqGJ4WzCipFvZndwLKbWO5PV0QGhGSLipWdr/Al nZfSTEvpujTP4MZIjyQ2CVIjrOvuFC6zL3iI5kdY7Q+S14Zt6dBONoSX6XpWrl44qYy7vqGt bH+W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PxN493l8Lgo9 +9K0zGZx31UV6wchCoHrJ/2VEOTyerjs55k5C2IXXe892Ro9Z+NyppU3th2b4ij++4HYpDkz omNexexbeibkl6RIwXHOefdYlxR72J6crzzxdqXFld0TmXSbYzfyHV74K9vslIHJu8Cqz0Xz libnrRDv2i0t+OzUulPJGTeOXeEoNeB2S6+fXqF0Iz5tluWdSQ4vWIVcL7tYl/w/XtgitK/p +rqjYV5fZhz65tG/7qnZ11gHBpbfL7RLWCJapXpdN7Htj3T4tOzkcsbtSizFGYmGWsxFxYkA DqYi+FsDAAA= X-CMS-MailID: 20240604064852eucas1p2db69f8d2d13b82887fbb3a4dd535c024 X-Msg-Generator: CA X-RootMTR: 20240604063005eucas1p2a0ea8cbe2d925b1e63f0854f719d0b01 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240604063005eucas1p2a0ea8cbe2d925b1e63f0854f719d0b01 References: <20240604-jag-sysctl_remset-v1-0-2df7ecdba0bd@samsung.com> <20240604-jag-sysctl_remset-v1-3-2df7ecdba0bd@samsung.com> On Tue, Jun 04, 2024 at 08:29:21AM +0200, Joel Granados via B4 Relay wrote: > From: Joel Granados > --- a/net/sysctl_net.c > +++ b/net/sysctl_net.c > @@ -127,7 +127,7 @@ static void ensure_safe_net_sysctl(struct net *net, const char *path, > > pr_debug("Registering net sysctl (net %p): %s\n", net, path); > ent = table; > - for (size_t i = 0; i < table_size && ent->procname; ent++, i++) { > + for (size_t i = 0; i < table_size; ent++, i++) { > unsigned long addr; > const char *where; > > @@ -165,17 +165,10 @@ struct ctl_table_header *register_net_sysctl_sz(struct net *net, > struct ctl_table *table, > size_t table_size) > { > - int count; > - struct ctl_table *entry; > - > if (!net_eq(net, &init_net)) > ensure_safe_net_sysctl(net, path, table, table_size); > > - entry = table; > - for (count = 0 ; count < table_size && entry->procname; entry++, count++) > - ; > - > - return __register_sysctl_table(&net->sysctls, path, table, count); > + return __register_sysctl_table(&net->sysctls, path, table, table_size); > } > EXPORT_SYMBOL_GPL(register_net_sysctl_sz); > Given that this is a very small network related patch, I'm queueing this in through the sysctl-next branch. Please let me know if you would rather take it through the networking workflow. Best -- Joel Granados