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 C2B99C4332F for ; Thu, 9 Nov 2023 16:08:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234482AbjKIQIh (ORCPT ); Thu, 9 Nov 2023 11:08:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234424AbjKIQIg (ORCPT ); Thu, 9 Nov 2023 11:08:36 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CB2A324A; Thu, 9 Nov 2023 08:08:34 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B540BC433BB; Thu, 9 Nov 2023 16:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699546114; bh=9jv2+syvODBbcmGY4ew2QNcGO1aZvABUK26yZSJvayg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=an4/usvbiRel89q01Pnvd+TES/B31/7WCTra21aJC2vR167RVrBTD0T4l0Np+n4v2 EbNHWbE4mRlTd5664QNTBac6vz4tQNjuUPAC3mzSXSGjwmxfFbC0EtztrMUvvPWYxz sWh1REN/5Ta35snZBzzhuRnh6NPnaQUCGtFqSS6jbo4+qkTAM968xLrAL3uV5ktTpn y3QxjKJ6GsVIlGinqAPCFIpiDBiVj/TNhytdxD8mN4Z0u36nPI2e4kHizhl+ga9hTX YcrNLvLA/u2tD3L89PolcPCLJ71qSrC12ls7rhoKQqiMWBmhKAiZSNIRpl39WLT7qF OYkbTreIzsQaA== Date: Thu, 9 Nov 2023 08:08:31 -0800 From: Eric Biggers To: Joel Granados Cc: Luis Chamberlain , willy@infradead.org, josh@joshtriplett.org, Kees Cook , David Howells , Alexander Viro , Christian Brauner , Benjamin LaHaise , Eric Biederman , Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Jan Kara , Amir Goldstein , Matthew Bobrowski , Anton Altaparmakov , Namjae Jeon , Mark Fasheh , Joel Becker , Joseph Qi , Iurii Zaikin , "Theodore Y. Ts'o" , Chandan Babu R , "Darrick J. Wong" , Jan Harkes , coda@cs.cmu.edu, linux-cachefs@redhat.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ocfs2-devel@lists.linux.dev, fsverity@lists.linux.dev, linux-xfs@vger.kernel.org, codalist@telemann.coda.cs.cmu.edu Subject: Re: [PATCH 2/4] aio: Remove the now superfluous sentinel elements from ctl_table array Message-ID: <20231109160831.GA1933@sol.localdomain> References: <20231107-jag-sysctl_remove_empty_elem_fs-v1-0-7176632fea9f@samsung.com> <20231107-jag-sysctl_remove_empty_elem_fs-v1-2-7176632fea9f@samsung.com> <20231108034231.GB2482@sol.localdomain> <20231109160040.bahkcsp44t5xu7qo@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231109160040.bahkcsp44t5xu7qo@localhost> Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org On Thu, Nov 09, 2023 at 05:00:40PM +0100, Joel Granados wrote: > > > static void __init fsverity_init_sysctl(void) > > > { > > > +#ifdef CONFIG_FS_VERITY_BUILTIN_SIGNATURES > > > fsverity_sysctl_header = register_sysctl("fs/verity", > > > fsverity_sysctl_table); > > > +#else > > > + fsverity_sysctl_header = register_sysctl_sz("fs/verity", > > > + fsverity_sysctl_table, 0); > > > +#endif > > > if (!fsverity_sysctl_header) > > > panic("fsverity sysctl registration failed"); > > > > This does not make sense, and it causes a build error when CONFIG_FS_VERITY=y > > and CONFIG_FS_VERITY_BUILTIN_SIGNATURES=n. > > > > I think all you need to do is delete the sentinel element, the same as > > everywhere else. I just tested it, and it works fine. > I found the reason why I added the CONFIG_FS_VERITY_BUILTIN_SIGNATURES > here: it is related to > https://lore.kernel.org/all/20230705212743.42180-3-ebiggers@kernel.org/ > where the directory is registered with an element only if > CONFIG_FS_VERITY_BUILTIN_SIGNATURES is defined. I had forgotten, but I > even asked for a clarification on the patch :). > > I see that that patch made it to v6.6. So the solution is not to remove > the CONFIG_FS_VERITY_BUILTIN_SIGNATURES, but for me to rebase on top of > a more up to date base. > > @Eric: Please get back to me if the patch in > https://lore.kernel.org/all/20230705212743.42180-3-ebiggers@kernel.org/ > is no longer relevant. > > Best. Yes, that patch was merged in 6.6. I don't think it really matters here though, other than the fact that it moved the code to a different file. I believe all you need to do is remove the sentinel element, the same as anywhere else: diff --git a/fs/verity/init.c b/fs/verity/init.c index a29f062f6047b..b64a76b9ac362 100644 --- a/fs/verity/init.c +++ b/fs/verity/init.c @@ -24,7 +24,6 @@ static struct ctl_table fsverity_sysctl_table[] = { .extra2 = SYSCTL_ONE, }, #endif - { } }; static void __init fsverity_init_sysctl(void)