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 39678C433EF for ; Thu, 31 Mar 2022 20:16:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241325AbiCaUSR (ORCPT ); Thu, 31 Mar 2022 16:18:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241403AbiCaUSD (ORCPT ); Thu, 31 Mar 2022 16:18:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 344902414D9; Thu, 31 Mar 2022 13:16:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CE15E61ADE; Thu, 31 Mar 2022 20:16:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CD50C340F0; Thu, 31 Mar 2022 20:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648757775; bh=ZAkVgKG4bsXkZcZ9X3iUl6n68H+bEWI6NUCYM+8C9Ew=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DXTq+MxTn0nYJLYfkh9JGS5DkTpZ3yi6iPeGnEeOQ0JhSlnLtYBhXuNMLqw/jOXsO d0+PxxiSbexzgxH9BytQvUSiwizjAkWk8iFLbaza+MLczJQO3ArteipT4E/CdA6XVO HWP/HtwpxVQL7y7kFSXDPUhv42kzIVqAWanWEElNY2G6yE0sZBwdZhp2GR3XAnFbkU vDAOS8aXY8mEq8EAJN+n3SLzqPuI+d6scwfACROIBpba+si/7rvXmatZ1imYKnoDnV gcNgB9VPwOM2fM2MtlZfvl9RccAtQhQXYxKUVgud3+HA8juqQrnSDJ7Jl/ypS6czSF c0erk0RWUj7Bg== Date: Thu, 31 Mar 2022 20:16:13 +0000 From: Eric Biggers To: Jeff Layton Cc: ceph-devel@vger.kernel.org, xiubli@redhat.com, idryomov@gmail.com, lhenriques@suse.de, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v12 07/54] ceph: support legacy v1 encryption policy keysetup Message-ID: References: <20220331153130.41287-1-jlayton@kernel.org> <20220331153130.41287-8-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220331153130.41287-8-jlayton@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 31, 2022 at 11:30:43AM -0400, Jeff Layton wrote: > From: Luís Henriques > > fstests make use of legacy keysetup where the key description uses a > filesystem-specific prefix. Add this ceph-specific prefix to the > fscrypt_operations data structure. > > Signed-off-by: Luís Henriques > Signed-off-by: Jeff Layton > --- > fs/ceph/crypto.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ceph/crypto.c b/fs/ceph/crypto.c > index a513ff373b13..d1a6595a810f 100644 > --- a/fs/ceph/crypto.c > +++ b/fs/ceph/crypto.c > @@ -65,6 +65,7 @@ static bool ceph_crypt_empty_dir(struct inode *inode) > } > > static struct fscrypt_operations ceph_fscrypt_ops = { > + .key_prefix = "ceph:", > .get_context = ceph_crypt_get_context, > .set_context = ceph_crypt_set_context, > .empty_dir = ceph_crypt_empty_dir, > -- > 2.35.1 > As I mentioned before (https://lore.kernel.org/r/20200908042925.GI68127@sol.localdomain), I don't think you should do this, given that the filesystem-specific key description prefixes are deprecated. In fact, they're sort of doubly deprecated, since first they were superseded by "fscrypt:", and then "login" keys were superseded by FS_IOC_ADD_ENCRYPTION_KEY. How about updating fstests to use "fscrypt:" instead of "$FSTYP:" if $FSTYP is not ext4 or f2fs? Or maybe fstests should just use "fscrypt:" unconditionally, given that this has been supported by ext4 and f2fs since 4.8, and 4.9 is now the oldest supported LTS kernel. - Eric