Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9591358rwd; Wed, 21 Jun 2023 09:13:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4upeuOqPgLFtAf3RIn3qVfi3JOWNvFRR58fjjDfy4RZY2OINQXltoeJszQMQeu7yL+VcTA X-Received: by 2002:a05:6a21:6811:b0:121:ca90:df01 with SMTP id wr17-20020a056a21681100b00121ca90df01mr6632079pzb.40.1687364012849; Wed, 21 Jun 2023 09:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687364012; cv=none; d=google.com; s=arc-20160816; b=gwsoICa3/dnLarkvwtQuwFcI46j6Zz42W2ETM7iBOdLZWt3cxZ1KkbOo1wgUG103j3 ol6tZHwVWdaYVPb1P1USl0fkICtYBN3N0/aU9b9i9+4/NfXOqUAj0Ma1Og9X75gmxVix 1P1pUEpq+PW2C7CixLTvhfi5a23pj839R6gHR0DkTaF0a05ryW+BQAaIsvv+tcUq78zj lFNnVA6cjHh00jclZE17BtA7IsBjiQaqFOjSoTsDLKhOT0jZWFd3Y5vnwpTwV1TuMawE GZPf1TZQ/ZOOIrq8nEOwP7qh0pioG+UbHL4GrweJd5+KHKnSOFGZKhxwrUA2+BNznVC6 o2xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=4dY3siBIy5sZCkWLAJsADYQ9gjCB2XGjCqHI/EnrzWw=; b=H06s8UIe9LCz/YCZaZ76e5Qlr/TD1zNaRRDB6Boz1QkHdSoAUgLCmASg1tC+cwDyFR 6O077fqRqxY3b0LTYDp9SBoGFxoJRIdVGJWR3K7W5XTqUD2OHCrkOivNy7rfE69PywNM 2Hfok0ltWYRCzRSbgQqBAwe5CI30FaKYwoAA7Twl7scyQRXck+MBxoWydJbooYAIzUEt qE9j4Ev5QpiLfLKgkr6l99hGAv2fwRKvyWzeiU/jWXhDdziZ1zZHg1FdZm/G36G5PtPw BCpFobT7fhhPAa17EOEnlaCdq2Er/VEMKS9X9/AAJDqsgcRfB1hl5DTR737b/dw3AASe /xNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=pGdGnasd; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p25-20020a637f59000000b005429248576asi984504pgn.128.2023.06.21.09.13.17; Wed, 21 Jun 2023 09:13:32 -0700 (PDT) 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=@samsung.com header.s=mail20170921 header.b=pGdGnasd; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233433AbjFUPar (ORCPT + 99 others); Wed, 21 Jun 2023 11:30:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233387AbjFUPa3 (ORCPT ); Wed, 21 Jun 2023 11:30:29 -0400 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 257D21BD3; Wed, 21 Jun 2023 08:30:16 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230621153011euoutp01192645862d3e0a543891af4b47de94a9~qtkOS32Qw0899308993euoutp01Q; Wed, 21 Jun 2023 15:30:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230621153011euoutp01192645862d3e0a543891af4b47de94a9~qtkOS32Qw0899308993euoutp01Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1687361411; bh=4dY3siBIy5sZCkWLAJsADYQ9gjCB2XGjCqHI/EnrzWw=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=pGdGnasdyQVz6DZY4mANhkND5Xrt681cqBfJfy97xUPZInu3VuYDlHeCfy1G2/D4c 18D/HuBWkadD4OUgQpv80ELCjEHDj40bQ2D16FPNPCKO+6rUNXV2/eSnsXtYqBWKtu F5+bvWY/pNIsls2QPTAqoHMPbQjcqWCwFBMbgLgY= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230621153011eucas1p2787595ff5b934c65ea1727b5d5deb74f~qtkN_c_kP1922119221eucas1p26; Wed, 21 Jun 2023 15:30:11 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 3D.E0.11320.38713946; Wed, 21 Jun 2023 16:30:11 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230621153010eucas1p25fabdc546fa653beb103f6f68f4da531~qtkNVQ-cl3128231282eucas1p2P; Wed, 21 Jun 2023 15:30:10 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230621153010eusmtrp230e48834a7a1b40e208c6136e69457d4~qtkNTp7dV2052520525eusmtrp2q; Wed, 21 Jun 2023 15:30:10 +0000 (GMT) X-AuditID: cbfec7f4-97dff70000022c38-1a-6493178345d8 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 53.6C.10549.28713946; Wed, 21 Jun 2023 16:30:10 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230621153010eusmtip231fdedfd7d7cff792547031f714e18c9~qtkM_OVY70222902229eusmtip2f; Wed, 21 Jun 2023 15:30:10 +0000 (GMT) Received: from localhost (106.210.248.248) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Jun 2023 16:30:09 +0100 Date: Wed, 21 Jun 2023 17:30:08 +0200 From: Joel Granados To: Petr Mladek CC: , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , Theodore Ts'o , "Jason A. Donenfeld" , Greg Kroah-Hartman , Jiri Slaby , Juergen Gross , Stefano Stabellini , Benjamin LaHaise , Alexander Viro , Christian Brauner , Jeff Layton , Chuck Lever , Jan Kara , Kees Cook , Iurii Zaikin , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Balbir Singh , Eric Biederman , "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Masami Hiramatsu , Peter Zijlstra , Will Deacon , Sergey Senozhatsky , Juri Lelli , Vincent Guittot , Steven Rostedt , Andrew Morton , Mike Kravetz , Muchun Song , Naoya Horiguchi , "Matthew Wilcox (Oracle)" , David Howells , Jarkko Sakkinen , Paul Moore , James Morris , "Serge E. Hallyn" , "H. Peter Anvin" , Oleksandr Tyshchenko , Amir Goldstein , John Fastabend , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Waiman Long , Boqun Feng , John Ogness , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Andy Lutomirski , Will Drewry , Mark Rutland , Miaohe Lin , , , , , , , , , , Subject: Re: [PATCH 08/11] sysctl: Add size to register_sysctl_init Message-ID: <20230621153008.lpxi5gh6fzvammg5@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="6xqmlcamfjbvcfp2" Content-Disposition: inline In-Reply-To: X-Originating-IP: [106.210.248.248] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2WTfVBUVRjG59x79t4Fg67gyBEtbTEnP0CxtNfS1NS6QTOVzTTlVEayifGh syt+N8GyJpIoLAi1LAGufC6CIOywLK66Mi6oJKAIiksIqCCIinytjLuxXpyc6b/f+7zvM+d5 /jhi2kMt9hZvidgulUUEhUkYV6y/YPvbN8YrKXhRkX4SaIoLGagv0iEYGUujwdjdimHQ1spC nL0MQ2FZNAVPTtoZeFJtYaD3/ACCxs4mBlJ7ojFoei6z4LDeo0CbNUxD98kDCDRXlBj6FWMY 7iSU0+DQK1mI0RYzYLacYSGlxAvSUmMoUNkSELQ3eYPmxmLoT58BtpwCFoqKtRQoKvIo0F/L QFCdrKbBeuQohsu/h4Px0hAF5bcUDNwzxVNwcCQbQ3KKAkHV6VoMVys1DLQVOkTw6FAHA9XF dRguXajBoDsRJYLs5gYKCg/mi6Al4Q6CpP67CLS5c+DxmS+h8WwmBTmG2xgaos8i0CU/Y2F0 bEwErapUDJb4sxQ4OodEYIptp6BxtBeDseQYs+ozfmT/Ycz/0/cM84V/FSI+LaoB82X5Nyj+ VrYB8Ykx/SxvUFtZXmm6yfKZpZH8deM3vLL6gYg/lTeP11b1UHxcSyPNlxYcZD5/a4Pr8mBp 2JYdUtnCD35wDfkj/wTeluK1K6HyCB2FTnnGIRcx4d4hw9XZVBxyFXtweYgM1wxNDIOIPDyX hpxXHtwTRMx9s184OowVIuEoF5GG9mJGGMaPRhuPT2zKEYlPP0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soxurvDeL+brnu7sWL9oTfp4Mjfw6V11qST65deqgyrdix/bT2y5+kFA3Grb 6aQXBPveMGJ7DX6jLRulQ/2UNbCzWTtVHZVV8yAg1/F1d++ty4n72m35o9dT9p5nlUbOnxte NS3fcTMgz1db1NX+ZktL3Nx0psTex8Hf+vy5TP9du8Pt+eJq40zniLhKb8bq6msrFtpnuYRS IuQH4gql8B/pJ17rxwQAAA== X-CMS-MailID: 20230621153010eucas1p25fabdc546fa653beb103f6f68f4da531 X-Msg-Generator: CA X-RootMTR: 20230621091037eucas1p188e11d8064526a5a0549217d5a419647 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230621091037eucas1p188e11d8064526a5a0549217d5a419647 References: <20230621091000.424843-1-j.granados@samsung.com> <20230621091000.424843-9-j.granados@samsung.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 --6xqmlcamfjbvcfp2 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 21, 2023 at 01:36:46PM +0200, Petr Mladek wrote: > On Wed 2023-06-21 11:09:57, Joel Granados wrote: > > In order to remove the end element from the ctl_table struct arrays, we > > explicitly define the size when registering the targes. We add a size > > argument to the register_sysctl_init call and pass an ARRAY_SIZE for all > > the callers. >=20 > This does not explain the motivatin why the end element is removed. I also see that the cover letter also lacks this. Let me clarify in my V2. >=20 > I agree with Jiri that saving 9k is a questionable gain. According to > the cover letter it saved 0,00%. It is because it saved 9k with allyes > config which produces huge kernel. IMHO, the 9k might be interesting > only for a tiny kernel. But I guess that it would safe much less > bytes there. I put the 9K as a upper bound kind of value. To get an idea of exactly how much we are talking about. A lower bound with tiny config and sysctl enabled is a good idea to give a range. >=20 > And the code with the added ARRAY_SIZE() parameter looks worse than befor= e. This might not even be an issue in V2. After analysing Greg's feedback, these might just go away. >=20 > > diff --git a/kernel/printk/sysctl.c b/kernel/printk/sysctl.c > > index c228343eeb97..28f37b86414e 100644 > > --- a/kernel/printk/sysctl.c > > +++ b/kernel/printk/sysctl.c > > @@ -81,5 +81,6 @@ static struct ctl_table printk_sysctls[] =3D { > > =20 > > void __init printk_sysctl_init(void) > > { > > - register_sysctl_init("kernel", printk_sysctls); > > + register_sysctl_init("kernel", printk_sysctls, > > + ARRAY_SIZE(printk_sysctls)); > > } >=20 > Is register_sysctl_init() still ready to handle the last empty element, nope, after all the patch set, this functionality would be gone. > please? I am not in Cc on the related patches. Not sure what happened there. Should I just add you for the next batch? >=20 > Best Regards, > Petr Thx for the feedback Best --=20 Joel Granados --6xqmlcamfjbvcfp2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmSTF34ACgkQupfNUreW QU8CgQv/WDyYibe7/IonBVPexXNQGTVuyKh61uOYtHRK+2k13K3RLUk48Z0C+Q5+ vfTq/uCCkVwy/eYrMqn1RFGRzZ2NY6UkXXd7X6g8UVGLIiTCl2TEA235HjpPCxuh /RcNXUoYsrzVCc6s4XtIScbySNGho9BtuXw1vInVQy08FiO21l2apZYCWtOqRzdA GFUepViYRcMqGClksHNZKDND+JZWRjB1sqPr5UfLVo89RxrSGbDqZFP2DCU3ehNx vbSg+kcYu3PBOZQuhA9Eu4h1ErwKlk6PQJhJ04lpMwJU3eSR8+t6A/9iKE305ufv lulowZS/J4q8c+8IDMZR/g9Ire50DzZ0MzEENUn43oqh7EVc+C5XgG28Gxyb7P+l aXq/uiZNg8e1cD54e+l01DjFU8aEVz1KN3YE4NF2VW/EDUyiOJU3a+mkBSPSIt7C MSeQHeJvDOffcGjCWsyGwiiplObWKHl4WApjE/sA0UtkNFCc0178hmKbFf9ayZvv J2+uWQKH =taMy -----END PGP SIGNATURE----- --6xqmlcamfjbvcfp2--