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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61953C4167B for ; Wed, 13 Dec 2023 18:18:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442146AbjLMSSI convert rfc822-to-8bit (ORCPT ); Wed, 13 Dec 2023 13:18:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233481AbjLMSSG (ORCPT ); Wed, 13 Dec 2023 13:18:06 -0500 Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C435AF; Wed, 13 Dec 2023 10:18:12 -0800 (PST) Received: from in01.mta.xmission.com ([166.70.13.51]:55092) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1rDToA-000YZK-3k; Wed, 13 Dec 2023 11:18:10 -0700 Received: from ip68-227-168-167.om.om.cox.net ([68.227.168.167]:53124 helo=email.froward.int.ebiederm.org.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1rDTo9-007oxM-1R; Wed, 13 Dec 2023 11:18:09 -0700 From: "Eric W. Biederman" To: Luis Chamberlain Cc: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Joel Granados , Kees Cook , "Gustavo A. R. Silva" , Iurii Zaikin , Greg Kroah-Hartman , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> <20231207104357.kndqvzkhxqkwkkjo@localhost> <20231208095926.aavsjrtqbb5rygmb@localhost> <8509a36b-ac23-4fcd-b797-f8915662d5e1@t-8ch.de> Date: Wed, 13 Dec 2023 12:18:00 -0600 In-Reply-To: (Luis Chamberlain's message of "Tue, 12 Dec 2023 23:47:28 -0800") Message-ID: <87v8927yqv.fsf@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-XM-SPF: eid=1rDTo9-007oxM-1R;;;mid=<87v8927yqv.fsf@email.froward.int.ebiederm.org>;;;hst=in01.mta.xmission.com;;;ip=68.227.168.167;;;frm=ebiederm@xmission.com;;;spf=pass X-XM-AID: U2FsdGVkX19i6qfGdObJtlqwV73cM5HlVuthNRxr54M= X-SA-Exim-Connect-IP: 68.227.168.167 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH v2 00/18] sysctl: constify sysctl ctl_tables X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Luis Chamberlain writes: > On Mon, Dec 11, 2023 at 12:25:10PM +0100, Thomas Weißschuh wrote: >> Before sending it I'd like to get feedback on the internal rework of the >> is_empty detection from you and/or Luis. >> >> https://git.sr.ht/~t-8ch/linux/commit/ea27507070f3c47be6febebe451bbb88f6ea707e >> or the attached patch. > > Please send as a new patch as RFC and please ensure on the To field is > first "Eric W. Biederman" with a bit more > elaborate commit log as suggested from my review below. If there are > any hidden things me and Joel could probably miss I'm sure Eric will > be easily able to spot it. > >> From ea27507070f3c47be6febebe451bbb88f6ea707e Mon Sep 17 00:00:00 2001 >> From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= >> Date: Sun, 3 Dec 2023 21:56:46 +0100 >> Subject: [PATCH] sysctl: move permanently empty flag to ctl_dir >> MIME-Version: 1.0 >> Content-Type: text/plain; charset=UTF-8 >> Content-Transfer-Encoding: 8bit >> >> Simplify the logic by always keeping the permanently_empty flag on the >> ctl_dir. >> The previous logic kept the flag in the leaf ctl_table and from there >> transferred it to the ctl_table from the directory. >> >> This also removes the need to have a mutable ctl_table and will allow >> the constification of those structs. > Please elaborate a bit more on this here in your next RFC. > It's a pretty aggressive cleanup, specially with the new hipster guard() > call but I'd love Eric's eyeballs on a proper v2. I will look at a v2 time permitting. My sense is that changing the locking probably make sense as a separate patch. Eric