From mboxrd@z Thu Jan 1 00:00:00 1970 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.subspace.kernel.org (Postfix) with ESMTPS id F244D3B2A7; Wed, 20 Dec 2023 14:34:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BHF2GqHW" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KxkjqpiRhDDXCtVOxBcLzEwoOuA/MLwLsDAq8dy0YWY=; b=BHF2GqHWuAnU1Twu9UvJy9agEU h4yAoWEeR2Hw1DpM5opy5WX4q6fw++idDTVF1sB4CAeT4yznSiudWA4EpjCe3E9EZ0TiIp1LEAngB K4yZ/HEWpv8vTDgAvoDY/N2MkXNEW+qxNYw00E/7p1EQvhFF7U9/GT/z8qWE20A9SoAMVpqTuM0ZU bOgbjq5bxutfk98c8NCtJt6nMHGFlYVAcpUPWgjzsc4yneh8yC4isK1X2E2teOsVvdHYaraQjNYp7 g9rHmoB6tgPmd8u34US9uEqD1xqEZSP2wCO0NBNraq3r/4czSlfwFdwrhpIBxW3sZsIyrmdQ4U7bs mh4fyu2w==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1rFxen-0006FK-1M; Wed, 20 Dec 2023 14:34:45 +0000 Date: Wed, 20 Dec 2023 06:34:45 -0800 From: Luis Chamberlain To: Julia Lawall Cc: Thomas =?iso-8859-1?Q?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 Message-ID: References: <20231212090930.y4omk62wenxgo5by@localhost> <20231217120201.z4gr3ksjd4ai2nlk@localhost> <908dc370-7cf6-4b2b-b7c9-066779bc48eb@t-8ch.de> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain On Wed, Dec 20, 2023 at 08:39:20AM +0100, Julia Lawall wrote: > > > 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. Fantastic thanks! > > > 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? We'll consider that too, good idea! Luis