Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3827419rdb; Mon, 11 Dec 2023 00:34:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHltfonSukQ58eA4rSbC6Wf48n3dkSDKHwiWpEFxWNY9OIVE3KrLTUlapcdxrnwtZ9NW1X X-Received: by 2002:a05:6a21:18d:b0:190:8491:ac38 with SMTP id le13-20020a056a21018d00b001908491ac38mr5520540pzb.106.1702283687588; Mon, 11 Dec 2023 00:34:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702283687; cv=none; d=google.com; s=arc-20160816; b=MnPh17CjBN1RCNkn9D9+YyoWO/oPe+h0itF3gTfF3se9TX4d03ruOL/HoODfYHFd/o s9OvvfhaK72AJQ4AlFDGAPXwerZBMPa+qGhUAlQiAByIKdJdcmYNBT9wpXp3vtbZGO4f dFtmje418p6KU05kjHuEVhxdCPnsBfBf1C7xVANXzxuELMKNogAsoLxKMVNbnf/hptnD d9g1SXVwBZyhenuWQnPCwxASM1JyQCwJpUX7dtCxNnfo8sdvdFqG+JUyWiMMfN8URtuk EfXgMob7Q4RgLUsYO9OrwKhUeNSx748cRHFLVS5N+n78hMFgRaB1TPIRW2f9ag/CSGul 0Qvg== 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=P29krkBAQBqnkKdOFl3EL3UyYbzgflEhF00VK7ufnuM=; fh=F+seLicu2+0lodrWqq1yOikAPCIvf0PgOELkKn9NRr4=; b=lGqaDdRoudus3TvMnAq8whJKkKC14o18ugruAwcu/2RMle3uHzk0j3Ly0CMytzZOfN clJKXr0vgaCFxeFekxCZYO9vf+q2JR7ZKOdSDuzhlZHpt4Sm7rPfbp2gnTTVIjOrnhb9 FnJlfz9Khvi9OxkUsyAPRlhQcauJO0vxXtowAzm01/HeVO95vzkgm9GcSlvo9rBf/SI4 4QYT7sniLT6pNRfbB35YFkgvrNCBicbIf0doSoqSatHsAzjis/JibTkA8oRI5vV3bKHL amkrShX7wwy0ogAltNUFGFFnxAIPHCD6zrx3gyOPyv0/442RQfWhnHDN3/ZYJF1XjjVN 6gqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=uzUzlNey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id fh3-20020a056a00390300b006ce010d03d1si5685507pfb.295.2023.12.11.00.34.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 00:34:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=uzUzlNey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E54CA805149E; Mon, 11 Dec 2023 00:34:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233934AbjLKIeW (ORCPT + 99 others); Mon, 11 Dec 2023 03:34:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbjLKIeV (ORCPT ); Mon, 11 Dec 2023 03:34:21 -0500 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C41BFB7; Mon, 11 Dec 2023 00:34:26 -0800 (PST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20231211083423euoutp02d7a9f17e13c99f10e7c77aa6c360e767~fufkmg7CC3271332713euoutp026; Mon, 11 Dec 2023 08:34:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20231211083423euoutp02d7a9f17e13c99f10e7c77aa6c360e767~fufkmg7CC3271332713euoutp026 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1702283663; bh=P29krkBAQBqnkKdOFl3EL3UyYbzgflEhF00VK7ufnuM=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=uzUzlNeyBw9G+WkxzlsmJV7laWBEf5QvdxoGfuR+fIDKVJNVVkYgLI8c7eIk6f72x JxXeQYZw2Rv5w2aiTI0gc1mIf0xfcvnAPs3uWqKtVmm2zMTTn7rqQFtwlGlei4MhJZ 7abzVXfB93iemPbQOAC24SRYXqhcqzdgWuyKHqy4= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20231211083423eucas1p299da08b36c59c3686e93af53df3983f1~fufkJmrSf1581415814eucas1p20; Mon, 11 Dec 2023 08:34:23 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 22.E4.09814.F89C6756; Mon, 11 Dec 2023 08:34:23 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20231211083423eucas1p273a157b7e673f588d396d5c2e75e3cc1~fufjyA_v51581515815eucas1p2s; Mon, 11 Dec 2023 08:34:23 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231211083423eusmtrp17aef497af7333a7357f90d125c118c13~fufjw2pMD0981409814eusmtrp1b; Mon, 11 Dec 2023 08:34:23 +0000 (GMT) X-AuditID: cbfec7f4-711ff70000002656-b9-6576c98f87a9 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 5D.F5.09274.E89C6756; Mon, 11 Dec 2023 08:34:22 +0000 (GMT) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20231211083422eusmtip12475ee422a03dbfe874e6401921d8ec9~fufjhYrFT1823418234eusmtip1w; Mon, 11 Dec 2023 08:34:22 +0000 (GMT) Received: from localhost (106.110.32.133) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 11 Dec 2023 08:34:22 +0000 Date: Fri, 8 Dec 2023 10:59:26 +0100 From: Joel Granados To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= CC: Kees Cook , "Gustavo A. R. Silva" , Luis Chamberlain , Iurii Zaikin , Greg Kroah-Hartman , , , Subject: Re: [PATCH v2 00/18] sysctl: constify sysctl ctl_tables Message-ID: <20231208095926.aavsjrtqbb5rygmb@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="tkudj6zge43ee23g" Content-Disposition: inline In-Reply-To: X-Originating-IP: [106.110.32.133] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFKsWRmVeSWpSXmKPExsWy7djP87r9J8tSDdqXi1k0L17PZvHr4jRW izPdu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9HlJ40mu3XbrZAInCH6p/20k1VMlm32AKa/2zDT+otmJDoc/O7r9 OMhZ/nWFyopXa04qsRRnJBpqMRcVJwIA0IeB34cDAAA= X-CMS-MailID: 20231211083423eucas1p273a157b7e673f588d396d5c2e75e3cc1 X-Msg-Generator: CA X-RootMTR: 20231204075237eucas1p27966f7e7da014b5992d3eef89a8fde25 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231204075237eucas1p27966f7e7da014b5992d3eef89a8fde25 References: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> <20231207104357.kndqvzkhxqkwkkjo@localhost> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 11 Dec 2023 00:34:45 -0800 (PST) --tkudj6zge43ee23g Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 07, 2023 at 08:19:43PM +0100, Thomas Wei=DFschuh wrote: > On 2023-12-07 11:43:57+0100, Joel Granados wrote: > > Hey Thomas > >=20 > > You have a couple of test bot issues for your 12/18 patch. Can you > > please address those for your next version. >=20 > I have these fixed locally, I assumed Luis would also pick them up > directly until I have a proper v2, properly should have communicated > that. >=20 > > On Mon, Dec 04, 2023 at 08:52:13AM +0100, Thomas Wei=DFschuh wrote: > > > Problem description: > > >=20 > > > The kernel contains a lot of struct ctl_table throught the tree. > > > These are very often 'static' definitions. > > > It would be good to make the tables unmodifiable by marking them "con= st" > > Here I would remove "It would be good to". Just state it: "Make the > > tables unmodifiable...." >=20 > Ack. >=20 > >=20 > > > to avoid accidental or malicious modifications. > > > This is in line with a general effort to move as much data as possible > > > into .rodata. (See for example[0] and [1]) >=20 > > If you could find more examples, it would make a better case. >=20 > I'll look for some. So far my constifications went in without them :-) >=20 > > >=20 > > > Unfortunately the tables can not be made const right now because the > > > core registration functions expect mutable tables. > > >=20 > > > This is for two main reasons: > > >=20 > > > 1) sysctl_{set,clear}_perm_empty_ctl_header in the sysctl core modify > > > the table. > > > 2) The table is passed to the handler function as a non-const pointer. > > >=20 > > > This series migrates the core and all handlers. >=20 > > awesome! > >=20 > > >=20 > > > Structure of the series: > > >=20 > > > Patch 1-3: Cleanup patches > > > Patch 4-7: Non-logic preparation patches > > > Patch 8: Preparation patch changing a bit of logic > > > Patch 9-12: Treewide changes to handler function signature > > > Patch 13-14: Adaption of the sysctl core implementation > > > Patch 15: Adaption of the sysctl core interface > > > Patch 16: New entry for checkpatch > > > Patch 17-18: Constification of existing "struct ctl_table"s > > >=20 > > > Tested by booting and with the sysctl selftests on x86. > > >=20 > > > Note: > > >=20 > > > This is intentionally sent only to a small number of people as I'd li= ke > > > to get some more sysctl core-maintainer feedback before sending this = to > > > essentially everybody. >=20 > > When you do send it to the broader audience, you should chunk up your b= ig > > patches (12/18 and 11/18) and this is why: > > 1. To avoid mail rejections from lists: > > You have to tell a lot of people about the changes in one mail. That > > will make mail header too big for some lists and it will be rejected. > > This happened to me with [3] > > 2. Avoid being rejected for the wrong reasons :) > > Maintainers are busy ppl and sending them a set with so many files > > may elicit a rejection on the grounds that it involves too many > > subsystems at the same time. > > I suggest you chunk it up with directories in mind. Something similar to > > what I did for [4] where I divided stuff that when for fs/*, kernel/*, > > net/*, arch/* and drivers/*. That will complicate your patch a tad > > because you have to ensure that the tree can be compiled/run for every > > commit. But it will pay off once you push it to the broader public. >=20 > This will break bisections. All function signatures need to be switched I was suggesting a solution without breaking bisections of course. I can think of a couple of ways to do this in chunks but it might be premature. You can send it and if you get push back because of this then we can deal with chunking it down. I'm still concerned about the header size for those mails. How does the mail look like when you run the get maintainers script on it? > in one step. I would strongly like to avoid introducing broken commits. >=20 > The fact that these big commits have no functional changes at all makes > me hope it can work. --=20 Joel Granados --tkudj6zge43ee23g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmVy6PQACgkQupfNUreW QU/kqwwAl4AzqtXuQrIiZVZuxbjC/B9vxdgnwDjJnHVbQ9QuNz4y3ZJq60tFYYib uwYwA72xqqXdZFiWG5RXuqFrqMxZRVxJUKhm4NfEDW+ol0cP+fXMFE4t806KCEQF cu+JQVXYWVhmscjWZE6zm79A1xtMLUa9wbaVnzyp6SFr0Q0B8ReM/7/xYIgHi72s qj5rd3sj5Ss3t5l5iskdEZ4ncDU75M1fIehCRDlf5bQZSbmifuTpA5q72qTiux5W 83w3d9rTjo5f4Y9YZMG8dn06MG0CHWSBK919IS+RaiBZ9dWimNRxLgOxlstHxfMX Dmm8zUQNl7RMPJEAkYxNoPRmZMSDR2a2mYILLTwCc/w7vUsselS8ngK+L4JdKbbA Gl2aet6SwpjP3c/32vq+pCM9iFm6Hh4JYto4Bcqfncsa5bIvOnyiLDBvNe1hoQ0q 2vV0aY5/IOvW61UnR4p+AkQBFWPs6fln4vM2l7wIzC8pcsdEoqdmdaiyN3OdVKxF OCQuggkL =xR5S -----END PGP SIGNATURE----- --tkudj6zge43ee23g--