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 3B339C433F5 for ; Thu, 19 May 2022 20:56:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239760AbiESU4b (ORCPT ); Thu, 19 May 2022 16:56:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244935AbiESU4N (ORCPT ); Thu, 19 May 2022 16:56:13 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33F0859BB0; Thu, 19 May 2022 13:56:11 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id 98FC71F45F77 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1652993769; bh=6q8ppakx2OLJ492VVGe2mKKo6sKvvEbdlNxvarzehx0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jtvFkbzLZbLw3d/1nWM2lRi8vLH4axjUG3mYYmdR5vh/IIluywymCnr/nIwgVe9eh cxlPJDsYc6fsWXS6jTMq0Ry23BZctZ74CP686IkyV1ffmySXArz25RU8HEe6VPfJUn GlkDaw9S6224ZvtOojs7lTysa9WdJ4fjwc0qD7j2h1LEB8kVvAn40b9scBPksxhfY0 mWkLohNxxkvrDVvFl6DPtPs4IgOQQYG4bMd68EQ8GKpcSqqqix9aeshgiM1/kKYECb SWsor9R/C8ObYeuWT0uCmWJig5o4B2rLqkCdOGa+xkunQzBlf2JtOb4VfVVdzpWUH3 NnQztpLCDUudQ== From: Gabriel Krisman Bertazi To: Eric Biggers Cc: linux-ext4@vger.kernel.org, Theodore Ts'o , linux-fscrypt@vger.kernel.org Subject: Re: [PATCH v4] ext4: only allow test_dummy_encryption when supported Organization: Collabora References: <20220519204437.61645-1-ebiggers@kernel.org> Date: Thu, 19 May 2022 16:56:06 -0400 In-Reply-To: <20220519204437.61645-1-ebiggers@kernel.org> (Eric Biggers's message of "Thu, 19 May 2022 13:44:37 -0700") Message-ID: <877d6hnswp.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org Eric Biggers writes: > From: Eric Biggers > > Make the test_dummy_encryption mount option require that the encrypt > feature flag be already enabled on the filesystem, rather than > automatically enabling it. Practically, this means that "-O encrypt" > will need to be included in MKFS_OPTIONS when running xfstests with the > test_dummy_encryption mount option. (ext4/053 also needs an update.) > > Moreover, as long as the preconditions for test_dummy_encryption are > being tightened anyway, take the opportunity to start rejecting it when > !CONFIG_FS_ENCRYPTION rather than ignoring it. > > The motivation for requiring the encrypt feature flag is that: > > - Having the filesystem auto-enable feature flags is problematic, as it > bypasses the usual sanity checks. The specific issue which came up > recently is that in kernel versions where ext4 supports casefold but > not encrypt+casefold (v5.1 through v5.10), the kernel will happily add > the encrypt flag to a filesystem that has the casefold flag, making it > unmountable -- but only for subsequent mounts, not the initial one. > This confused the casefold support detection in xfstests, causing > generic/556 to fail rather than be skipped. > > - The xfstests-bld test runners (kvm-xfstests et al.) already use the > required mkfs flag, so they will not be affected by this change. Only > users of test_dummy_encryption alone will be affected. But, this > option has always been for testing only, so it should be fine to > require that the few users of this option update their test scripts. > > - f2fs already requires it (for its equivalent feature flag). > > Signed-off-by: Eric Biggers Makes sense to me and code looks good. Please add: Reviewed-by: Gabriel Krisman Bertazi -- Gabriel Krisman Bertazi