Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp400535rdb; Tue, 19 Dec 2023 23:40:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlbsYuFS2Eww118RLx1Aoki5Ltc/QnVmVNocrEhjZ4m4Pz3S7U8qTb6vmTz5odhujYQvF1 X-Received: by 2002:a50:d494:0:b0:553:812e:416e with SMTP id s20-20020a50d494000000b00553812e416emr1055828edi.103.1703058031117; Tue, 19 Dec 2023 23:40:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703058031; cv=none; d=google.com; s=arc-20160816; b=meJnOsb5Z80kvhLun+1gpFmYSDJbsGeh5v/810Nh3D8BMx4IEbgvkZuvffUI4R7b/0 XSliy159DvoUbo9ByWPC006/oH7u+lJpnT45hvoqqFPBtkqlUE+GLLCR+IuDHBbxmc6e R9P7ecq8h77qMkFXC5Q/kenoqJ2FGziZHxXY2s5WFjQ/fg91fJgYG6lwJZpfXEIT8Gax OmlssfQvCti9IKhaA1ZDSKFFjq1imrUkd3W3+Ui73ZaNPzTkfCBH2j2qREmXAF4T+idw MZuLT+9sRAt7IYNaQhPseCb1xg6bOHyQmTghI7bwD2AG+0ODC+Ru0n8KpGOqhT6FYywC msaQ== 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 :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature; bh=ngYO8w4xEMeyVxDuDZMJoLOL2uVoOjZGaa0n4KABU6c=; fh=CWk8ZVsA59SIorltGHRseujImeLRfPyKoeOWLp7IR0A=; b=biL5bgk0Nf7WhYuQUrCfsRXIlZsf+Ray3d8qXmSjUkRU1kFgWBQiV1TyMi6w7VWu+C nu3geEA6q9A8lDazZLmps8+Z5cm6JBBazSL9gLahz+l2wlYgmVwRQR9NJafPZu+Z6+uq YXJn9xKPs9MvvdcDBGgvmvp5r9LkT3flcIo8AR0gmu7ms6k7KHH31/P6A/czDrhxvyS3 7R8EKp/ccSTCDD+DQmiYaEZTTRrk3pEVqItSpIhY/Hh8TH5i+RoMidqw1oH7kg6KUO2v WoKJNsI/26RlW2H1XHDtyoaGX0IOE4Es2x16N973IDo5r7mLHQelqvMn0y38oksGK03r 968Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=qy7Cmt9O; spf=pass (google.com: domain of linux-kernel+bounces-6505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6505-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b8-20020a056402350800b0054cae753509si11578633edd.412.2023.12.19.23.40.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 23:40:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=qy7Cmt9O; spf=pass (google.com: domain of linux-kernel+bounces-6505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6505-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 am.mirrors.kernel.org (Postfix) with ESMTPS id D0E231F2596C for ; Wed, 20 Dec 2023 07:40:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2238168D8; Wed, 20 Dec 2023 07:39:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b="qy7Cmt9O" X-Original-To: linux-kernel@vger.kernel.org Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (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 434032135D; Wed, 20 Dec 2023 07:39:22 +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=ngYO8w4xEMeyVxDuDZMJoLOL2uVoOjZGaa0n4KABU6c=; b=qy7Cmt9O1QYf0vjHyuwJw3P+qhTDMvpEMzlir3AJxAjLzUS2dre6bV9D SzXdnvC/AVxnoHe79EsDsNHOfRgtEIjsJCg2Cbd8U8QT47ADsw1iNBcN4 rE24mYdFEJWM2YJPk50LyiwQUxEfo4eQqGPTVIJmQ5lC/2z/GHC4+PKPd 8=; Authentication-Results: mail2-relais-roc.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,290,1695679200"; d="scan'208";a="143245362" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2023 08:39:20 +0100 Date: Wed, 20 Dec 2023 08:39:20 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Luis Chamberlain cc: =?ISO-8859-15?Q?Thomas_Wei=DFschuh?= , Joel Granados , Dan Carpenter , 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: Message-ID: References: <20231208095926.aavsjrtqbb5rygmb@localhost> <8509a36b-ac23-4fcd-b797-f8915662d5e1@t-8ch.de> <20231212090930.y4omk62wenxgo5by@localhost> <20231217120201.z4gr3ksjd4ai2nlk@localhost> <908dc370-7cf6-4b2b-b7c9-066779bc48eb@t-8ch.de> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Tue, 19 Dec 2023, Luis Chamberlain wrote: > On Tue, Dec 19, 2023 at 10:21:25PM +0100, Julia Lawall wrote: > > > As I noted, I think this is a generically neat endeavor and so I think > > > it would be nice to shorthand *any* member of the struct. ctl->any. > > > Julia, is that possible? > > > > What do you mean by *any* member? > > I meant when any code tries to assign a new variable to any of the > members of the struct ctl_table *foo, so any foo->*any* Declaring any to be an identifier metavariable would be sufficient. > > > If any is an identifier typed > > metavariable then that would get any immediate member. But maybe you want > > something like > > > > <+...ctl->any...+> > > > > that will match anything that has ctl->any as a subexpression? > > If as just an expression, then no, we really want this to be tied to > the data struture in question we want to modify. What about foo->a.b? Or maybe that doesn't occur in your structure? julia