Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp69749rdb; Wed, 20 Dec 2023 06:35:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGtmhW846JSAKxa8ksZoKlZqSIG1/Sz2iIo2Jo3j1A/PzLReX6f3mNXe1gIX6H0SKSARLc X-Received: by 2002:aa7:870f:0:b0:6d8:53f7:e2d9 with SMTP id b15-20020aa7870f000000b006d853f7e2d9mr4429994pfo.12.1703082908740; Wed, 20 Dec 2023 06:35:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703082908; cv=none; d=google.com; s=arc-20160816; b=GiXewcoK3Eu7w/navMzL4oPC0b4NIL0wpszfB67aj+ckGRnt1fMZ9yDI9ntKFNNVmz jHx882da6C4FSI04CoFpDfCp49xGT8vs2iynvSmgrWwf4vFIDtSXC7nSSRLhUgse8LO+ 82dU3obQv6ShcrGfY0N8m/dHCRJzeLYdauwOkYmmxDcswLumm9gOGrZeFqO5k0gEz5iw R45cIhEWyAqZ4qDZ6RYEChw74X7a75CzXHLxwFcy3llLZe9yfr9c/g4YQSxdetBxH76W BQ2o+bJQXs6c/DuC6PRDt1JRIn8stuIL3JHwZzj9YqYx91iXHhwwJb1CDsTWyOhuJYCz yO6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=KxkjqpiRhDDXCtVOxBcLzEwoOuA/MLwLsDAq8dy0YWY=; fh=S+eOhpqTqkHAKjvvZ7rz7D9uWWrAXszYcKDmphbolqE=; b=wAJKdTo33WwXQKnj72PAKNLZkRDWcUbr7vpzm1HiXTsxyfSqpJQ34MOjRp03qUp7ox uXgSuy2EPEcJrNqPFMmv/AQFd27C2WgX+tDzgbxlFX9IH2I8/0fVX9Gox0BnwtuCnBW1 ys05xEM3YDvaLduKJOevul5lm8IwIxc3hud3+t58EQqmlEYwhoq3tOO5sdurYyNxKERf CL0gdpnZUNCy2oeNfdL6WLszGaTTS6PIi7Wxw7ymBqXaYKjHl7FSlI+KufnVTHQtrL3/ FmDpbVjI3mrh2HhNJ6aB9ny6miJCwiVLkUggXqp+3FO0DUPr3QgewERH2/7XZDA20lRw pEFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=BHF2GqHW; spf=pass (google.com: domain of linux-kernel+bounces-7067-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n16-20020aa78a50000000b006d53ff1f8cfsi6700271pfa.382.2023.12.20.06.35.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 06:35:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7067-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=BHF2GqHW; spf=pass (google.com: domain of linux-kernel+bounces-7067-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D5F3C286A2E for ; Wed, 20 Dec 2023 14:35:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2D3C3B7B1; Wed, 20 Dec 2023 14:34:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="BHF2GqHW" X-Original-To: linux-kernel@vger.kernel.org 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 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-kernel@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