From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 119FAC19F4F for ; Wed, 8 May 2024 11:40:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: References:In-Reply-To:MIME-Version:Message-ID:Subject:CC:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1Kji/dHaaZEe7yP1jgKVaB3xSoFEyb+zdyk16BJ6z/4=; b=RqTHJ7LfdFRrjHbucnOoyACenE GYXGGxIvU5NL8mY7w1pdXpiq7D5fBvo/MnH+rqU9DFxT5ziTECFwULN9rwcvWbIAo0m+tgHi7ktAM xCXdzb5D4GQN8EIPFvgoMzj8WKfN/GLvkOrUq1kXWcFDotE08btR1R8wvtQmJqliKEAk6vGsU8YjG p272pdIquolPZm5taJ66sWAcPLck6SWSXJSlPSk0PMWtp38c7vfD5iXQSmAhX11N0I7Uw5nHxyA/y rATkSGZR+CACrDOnmlA6L5vNk/3/ZXe9dR2v0HGb10/xglmiUffqhRrbu5nZnHdHsSuLqe/TcNX+j jspLsH6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4ffJ-0000000FIIt-0kfe; Wed, 08 May 2024 11:40:53 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4ffE-0000000FIEY-3guH; Wed, 08 May 2024 11:40:50 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240508114046euoutp01c37f593f2a27b20f7d0fd2731027a54b~NgJ1CqoWY2038520385euoutp01U; Wed, 8 May 2024 11:40:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240508114046euoutp01c37f593f2a27b20f7d0fd2731027a54b~NgJ1CqoWY2038520385euoutp01U DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1715168446; bh=gtbGdnHi+Sywm4GJEWUqxx3nEyjlhODfQVe10fNojck=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=ARf9yrybjupqwXRiQSE0Q+Tc1VlSDD++6M71TuY+w8UkpabWpt+Bd8asmIwK5/S1b p9DuAfcc4CfOwakhdbcNO5XJRUC3eEs2nIyv98AaKJUjgJCQxVPiTUPHlm8FXtoUrm DraRLqHwAMzxsVBDEVDoUEvhrhA8MTbEvMJRkiJc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240508114045eucas1p2008b107d5bc84df1055d3c8f6f665522~NgJ00-QmY1758717587eucas1p26; Wed, 8 May 2024 11:40:45 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id DE.2B.09875.DB46B366; Wed, 8 May 2024 12:40:45 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240508114044eucas1p1bafa4ded49711d101a6ec02ee4cb497d~NgJ0CfQx03085530855eucas1p1l; Wed, 8 May 2024 11:40:44 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240508114044eusmtrp12f636116d09000caf814157fd2f0936e~NgJ0BWWL81100011000eusmtrp10; Wed, 8 May 2024 11:40:44 +0000 (GMT) X-AuditID: cbfec7f4-11bff70000002693-36-663b64bda894 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 77.0C.09010.CB46B366; Wed, 8 May 2024 12:40:44 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240508114044eusmtip2fa7284d181f2b50d0064e9cbaa2aaf8d~NgJz0FG2t1990419904eusmtip2H; Wed, 8 May 2024 11:40:44 +0000 (GMT) Received: from localhost (106.110.32.44) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 May 2024 12:40:43 +0100 Date: Wed, 8 May 2024 13:40:38 +0200 From: Joel Granados To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= CC: Luis Chamberlain , Kees Cook , Eric Dumazet , Dave Chinner , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v3 00/11] sysctl: treewide: constify ctl_table argument of sysctl handlers Message-ID: <20240508114038.vnx2hchpxeimuqz2@joelS2.panther.com> MIME-Version: 1.0 In-Reply-To: <4cda5d2d-dd92-44ef-9e7b-7b780ec795ab@t-8ch.de> X-Originating-IP: [106.110.32.44] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA2WSfUxTVxjGc+5XS7fipYiegGAoaNzcyocyTsSBRJ03/rEsBjMDy2wdF3RC q21RtuisgeH4UgQNFgwrVMBJC1hqBTajI1CkTMCprNsQAhTcBCNSOkZAWJuLm8n++z3PeZ43 75scPi56TPnzD8nVrFIuSxNTAsJinet591ZyTEp4lVaMTl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jn2fWSxz8eWOETlWmeVlS8tYVf+Nit5JO3/DZ8eZ1p wL9ll9gp72/TxZadjf8Q6X4wj72pTP3U0QuKj22vGZdy5t2+u39/zELOi0c+71pYJ3fzgkSf xoYtlaF1vi+uN2xeUSC5xfKMf59VVu+jrc63e8KbbRZwc0q+Ttgvs9qupyNmTjO/Wfzu6m3T 59doib3buXTm0yfX9k4Km7HwS+HHA1ukpEyileXTGEwnnZxq+/zqsvUGHNb/kzcxGW85cDaI 592LvTUOP1ymHSq8V8strvt6W9vL2k0iMsX7vk491H1GY0ZMh4vPk9il685ccExSYinOSDTU Yi4qTgQA//bFNQ4EAAA= X-CMS-MailID: 20240508114044eucas1p1bafa4ded49711d101a6ec02ee4cb497d X-Msg-Generator: CA X-RootMTR: 20240423075608eucas1p265e7c90f3efd6995cb240b3d2688b803 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240423075608eucas1p265e7c90f3efd6995cb240b3d2688b803 References: <20240423-sysctl-const-handler-v3-0-e0beccb836e2@weissschuh.net> <20240503090332.irkiwn73dgznjflz@joelS2.panther.com> <4cda5d2d-dd92-44ef-9e7b-7b780ec795ab@t-8ch.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240508_044049_340764_CCFCC140 X-CRM114-Status: GOOD ( 24.06 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1648431548968271140==" Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org --===============1648431548968271140== Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="t6g7ogcm2uwc3jep" Content-Disposition: inline --t6g7ogcm2uwc3jep Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 03, 2024 at 04:09:40PM +0200, Thomas Wei=DFschuh wrote: > Hey Joel, >=20 =2E.. > > # Motivation > > As I read it, the motivation for these constification efforts are: > > 1. It provides increased safety: Having things in .rodata section reduc= es the > > attack surface. This is especially relevant for structures that have= function > > pointers (like ctl_table); having these in .rodata means that these = pointers > > always point to the "intended" function and cannot be changed. > > 2. Compiler optimizations: This was just a comment in the patchsets tha= t I have > > mentioned ([3,4,5]). Do you know what optimizations specifically? Do= es it > > have to do with enhancing locality for the data in .rodata? Do you h= ave other > > specific optimizations in mind? >=20 > I don't know about anything that would make it faster. > It's more about safety and transmission of intent to API users, > especially callback implementers. Noted. =2E.. > > # Show the move > > I created [8] because there is no easy way to validate which objects ma= de it > > into .rodata. I ran [8] for your Dec 2nd patcheset [7] and there are le= ss in > > .rodata than I expected (the results are in [9]) Why is that? Is it som= ething > > that has not been posted to the lists yet?=20 >=20 > Constifying the APIs only *allows* the actual table to be constified > themselves. > Then each table definition will have to be touched and "const" added. That is what I thought. thx for clarifying. >=20 > See patches 17 and 18 in [7] for two examples. >=20 > Some tables in net/ are already "const" as the static definitions are > never registered themselves but only their copies are. >=20 =2E.. best --=20 Joel Granados --t6g7ogcm2uwc3jep Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmY7ZLUACgkQupfNUreW QU8gUgv+JUZin5OAF3NMj7s3DmErLOcek/iw2Q4tXtrCSrstF9AEp1KJR4h7cMPe Nh/NrY7roszof3ADLw9QcvijqtC2/YxQqtu+PqVfRYn15Tv7/eFIYRElCTK3Xdxj xMkZb9Afo5tMvUqCXLuy7hsa5GxNrpk5wLv3OEQnaOQPriuI0fAdMxQEFZXtRFst ZNvVqOVbGzH5fZhv6YS21SHWAIbki2fKfu9etPSftEhi5TQ60KT0GfnNLhonPMES 3q2s+Ox+m8zkKdpI8YZK/KYO7u7qM2aEGCcKQejM4cdJs8Ii0VVQT5lwyEipveYM 5d+sAYm/dF/FfZ6ocaC7REDrCC2P3+IxskN73CNRhwkkiUBSzXu52QdTzaAUF09Z azXiYxq/FpInFPHbBRWHRoeLkknyIlNmKUvVW+H6EHoMxgio7Pn2ERgGo4on6m8Z DX/ExB4ksH+M9m8Mw5niW9tzCilWV1c6EvwQ+9FlNY0szADvScD0Ocv3M0FVfvcx BVIXt1UD =UpYq -----END PGP SIGNATURE----- --t6g7ogcm2uwc3jep-- --===============1648431548968271140== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec --===============1648431548968271140==--