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 X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03253C433E2 for ; Tue, 15 Sep 2020 01:37:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B48F720731 for ; Tue, 15 Sep 2020 01:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600133855; bh=aquA0ONaSO3MOJXHCF+s9Vfsa3mVU5Vn5warTyxSUG8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=i2cKhnabhCaoZ5VAlr7AE8L6TPf87WN60uLSl3DZS2AEaFWA2FLPirIF1qt8emIJx bYPaoOO4vWLJNPiUnRFUMG2jT9aNPtbTXy0qCIh3R4WBNUexZ+YIpgrC2fOnxAAS+v 2UCu+CjWWWlTvPf+NYl+yqvLStqGZH+2YSaF308g= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726100AbgIOBhc (ORCPT ); Mon, 14 Sep 2020 21:37:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:53976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbgIOBh0 (ORCPT ); Mon, 14 Sep 2020 21:37:26 -0400 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F2FC720731; Tue, 15 Sep 2020 01:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600133846; bh=aquA0ONaSO3MOJXHCF+s9Vfsa3mVU5Vn5warTyxSUG8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hdJuUCujC8Y+ZKRU/ZdDVArRdXk13apsWY7XnL6GhNaxfR9OyehmEV0QsdBsPQ55Y PU82Fmu6A8JONPDytniFS2QMhG4725S5CMFilKLX7JqPG+ib9X+Jxz4U3grjkALy7I 0vtaQDWWeJ09bnBevN8CjMumffnyD9L2Za/Dvcxs= Date: Mon, 14 Sep 2020 18:37:24 -0700 From: Eric Biggers To: Jeff Layton Cc: ceph-devel@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH v3 10/16] ceph: add routine to create context prior to RPC Message-ID: <20200915013724.GJ899@sol.localdomain> References: <20200914191707.380444-1-jlayton@kernel.org> <20200914191707.380444-11-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200914191707.380444-11-jlayton@kernel.org> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Sep 14, 2020 at 03:17:01PM -0400, Jeff Layton wrote: > diff --git a/fs/ceph/crypto.h b/fs/ceph/crypto.h > index b5f38ee80553..c1b6ec4b2961 100644 > --- a/fs/ceph/crypto.h > +++ b/fs/ceph/crypto.h > @@ -11,6 +11,8 @@ > #define CEPH_XATTR_NAME_ENCRYPTION_CONTEXT "encryption.ctx" > > void ceph_fscrypt_set_ops(struct super_block *sb); > +int ceph_fscrypt_prepare_context(struct inode *dir, struct inode *inode, > + struct ceph_acl_sec_ctx *as); > > #else /* CONFIG_FS_ENCRYPTION */ > > @@ -19,6 +21,12 @@ static inline int ceph_fscrypt_set_ops(struct super_block *sb) > return 0; > } > > +static inline int ceph_fscrypt_prepare_context(struct inode *dir, struct inode *inode, > + struct ceph_acl_sec_ctx *as) > +{ > + return 0; > +} > + > #endif /* CONFIG_FS_ENCRYPTION */ Seems there should at least be something that prevents you from creating a file in an encrypted directory when !CONFIG_FS_ENCRYPTION. The other filesystems use fscrypt_prepare_new_inode() for this; it returns EOPNOTSUPP when IS_ENCRYPTED(dir). - Eric