Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6818873rdb; Fri, 15 Dec 2023 09:05:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4hcvtWumyZ08hONN4fV6pQPx1dNNuig3NnlNsgQDEjoqhcdA6OWWwMz0s5JH3a2X0nZLE X-Received: by 2002:a9d:7d84:0:b0:6d8:7ee8:29b8 with SMTP id j4-20020a9d7d84000000b006d87ee829b8mr12285787otn.8.1702659951595; Fri, 15 Dec 2023 09:05:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702659951; cv=none; d=google.com; s=arc-20160816; b=KM4E4Hnm7muNjSHhry+OanhtjkXHe7sistAV3HitpqjGo2R++l5n3aGEQyfrLFzvmV 6+0NcWFGwOrMR9um9ettQ6hXbIBS40LnuSKdqaYjwKOZBNMNOHlNSimp8Ye3A40etf6U 7eSPnIEKotZMv9g3lHhHgHPEnrNObixUfIkVpNjttHPChB4QuqDrTcoUo5/G0DWuWehD 1tDhBRsq97v6I1WS0HzlHTPlcJfWvVKxM96bSjzMntiGjZAAN7Dw6+m0UTdeDJdR2Tqs 8jCnt6zpycmYn5fzR+4byFYEtQgI7Pq3qyN+US+3K5hvBsaI4k7+P+dSOCmxdIFn0ocv 5a4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=b1r61txkB9I8VrHQEVInIZpLPckdP0rJJDvEIPWqnEc=; fh=si7LyJ0fexl1/nm7Wp7tJk92qkB/YdqjqNHj5NlGhhI=; b=vmmLcL1o+nuUy8cCmmhpYuaWYO0qrYEyj2N26GXSZwqJ30e5y/mVOP6t8yOjUZAv9G /iwzlQGhk9VwPKDZDGAATDkgcLKDxcjoskD/Mgo1iad6/+EMNtk/H2PNSewFXzOi1UC8 HAteQrB9LbmWJf32NU/GgK9S5lf0mt+cKBKbRvO5rntz3e3kDv+zq+I8kfqFsu3LqaqM 4xPW9Ohuuit0t6skN94uNCPlne9m7zsAjHgW5nF/gRAzCgd9myfPd/l0zKDE7pvKDuXZ wd07BzVwUy6Kz1ZcLFM6KcW2mda0CqkaQbxUj5RPIQoKlQChU3oYpJF21QZHQa8Mv1IW 74Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=LOQXWakv; spf=pass (google.com: domain of linux-kernel+bounces-1352-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c1-20020ab06941000000b007cb5492de72si1456119uas.113.2023.12.15.09.05.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 09:05:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1352-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=LOQXWakv; spf=pass (google.com: domain of linux-kernel+bounces-1352-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1352-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 778311C2414A for ; Fri, 15 Dec 2023 17:05:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C8E73FB0F; Fri, 15 Dec 2023 17:05:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b="LOQXWakv" X-Original-To: linux-kernel@vger.kernel.org Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (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 96C993FB30; Fri, 15 Dec 2023 17:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=b1r61txkB9I8VrHQEVInIZpLPckdP0rJJDvEIPWqnEc=; b=LOQXWakvBy71xew3ASNMm74HJhXhtZmGAWww6FCy4WhqGrbYOkvEXM4a jhWMjanSBJoz+2nppCXYM5oKMZWx0CGF5sk8M8F3MSacN05AhGcRBx45+ Y2rLF835GG08AE8+Sep1xKrSZSpyMR0LZlDFp4clPo2WHVVS3kpcLkE0h c=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.04,279,1695679200"; d="scan'208";a="74574559" Received: from dt-lawall.paris.inria.fr ([128.93.67.65]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 18:05:04 +0100 Date: Fri, 15 Dec 2023 18:05:02 +0100 (CET) From: Julia Lawall To: =?ISO-8859-15?Q?Thomas_Wei=DFschuh?= cc: Luis Chamberlain , Joel Granados , Dan Carpenter , Julia Lawall , 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 Subject: Re: [PATCH v2 00/18] sysctl: constify sysctl ctl_tables In-Reply-To: <46d68741-0ac8-47cc-a28f-bf43575e68a1@t-8ch.de> Message-ID: <10ea8782-5eea-879-e31e-278bb2fe73a5@inria.fr> References: <20231204-const-sysctl-v2-0-7a5060b11447@weissschuh.net> <20231207104357.kndqvzkhxqkwkkjo@localhost> <20231208095926.aavsjrtqbb5rygmb@localhost> <8509a36b-ac23-4fcd-b797-f8915662d5e1@t-8ch.de> <20231212090930.y4omk62wenxgo5by@localhost> <46d68741-0ac8-47cc-a28f-bf43575e68a1@t-8ch.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1238573808-1702659903=:10294" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1238573808-1702659903=:10294 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Fri, 15 Dec 2023, Thomas Wei?schuh wrote: > On 2023-12-12 23:51:30-0800, Luis Chamberlain wrote: > > On Tue, Dec 12, 2023 at 10:09:30AM +0100, Joel Granados wrote: > > > My idea was to do something similar to your originl RFC, where you have > > > an temporary proc_handler something like proc_hdlr_const (we would need > > > to work on the name) and move each subsystem to the new handler while > > > the others stay with the non-const one. At the end, the old proc_handler > > > function name would disapear and would be completely replaced by the new > > > proc_hdlr_const. > > > > > > This is of course extra work and might not be worth it if you don't get > > > negative feedback related to tree-wide changes. Therefore I stick to my > > > previous suggestion. Send the big tree-wide patches and only explore > > > this option if someone screams. > > > > I think we can do better, can't we just increase confidence in that we > > don't *need* muttable ctl_cables with something like smatch or > > coccinelle so that we can just make them const? > > The fact that the code compiles should be enough, no? > Any funky casting that would trick the compiler to accept it would > probably also confuse any other tool. I don't know the context, but the fact that a particular file compiles doesn't mean that all of the lines in the file have been subjected to the compiler, due to ifdefs. julia > > > Seems like a noble endeavor for us to generalize. > > > > Then we just breeze through by first fixing those that *are* using > > mutable tables by having it just de-register and then re-register > > new tables if they need to be changed, and then a new series is sent > > once we fix all those muttable tables. > > Ack. But I think the actual constification should really only be started > after the first series for the infrastructure is in. > > Thomas > --8323329-1238573808-1702659903=:10294--