From patchwork Tue Mar 15 16:19:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 12781631 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 3D7C7C4332F for ; Tue, 15 Mar 2022 16:19:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350004AbiCOQVA (ORCPT ); Tue, 15 Mar 2022 12:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345289AbiCOQU6 (ORCPT ); Tue, 15 Mar 2022 12:20:58 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BA8315A0A; Tue, 15 Mar 2022 09:19:45 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CCA3621110; Tue, 15 Mar 2022 16:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1647361183; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6eKQGYnW1BIJ6/xGHQJXa3jiy9pawegcsZstuDrKNiQ=; b=WSvMmUvEL4iDt2qZViFSkVXDo9RrXX8EENrgOMjxvnZtBGcX/Z6O2LIxxYV8Piu4BodXX2 sbxC2WbibDXEQagheDZ7uSUCV0o0p5BjziZ1Demhmipb4SYv44GV/WEoXI+EARkQgOIGGn Lf7b6Dw6FEvvTl3FUcBghY9pHbPpsNw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1647361183; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6eKQGYnW1BIJ6/xGHQJXa3jiy9pawegcsZstuDrKNiQ=; b=9vPyWGV7xqZEhVteX/JvCtSqc94JOG42/5MQhdpL2s8x7cQVhHW8rkUZfRS15P2b7KeCvG ZaYhc7K9sBF1++Dw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6438F13B4E; Tue, 15 Mar 2022 16:19:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id DXd/FZ+8MGIKPQAAMHmgww (envelope-from ); Tue, 15 Mar 2022 16:19:43 +0000 Received: from localhost (brahms.olymp [local]) by brahms.olymp (OpenSMTPD) with ESMTPA id 3031f704; Tue, 15 Mar 2022 16:20:01 +0000 (UTC) From: =?utf-8?q?Lu=C3=ADs_Henriques?= To: Jeff Layton , Xiubo Li , Ilya Dryomov Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Lu?= =?utf-8?q?=C3=ADs_Henriques?= Subject: [RFC PATCH v2 0/3] ceph: add support for snapshot names encryption Date: Tue, 15 Mar 2022 16:19:56 +0000 Message-Id: <20220315161959.19453-1-lhenriques@suse.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Hi! A couple of changes since v1: - Dropped the dentry->d_flags change in ceph_mkdir(). Thanks to Xiubo suggestion, patch 0001 now skips calling ceph_fscrypt_prepare_context() if we're handling a snapshot. - Added error handling to ceph_get_snapdir() in patch 0001 (Jeff had already pointed that out but I forgot to include that change in previous revision). - Rebased patch 0002 to the latest wip-fscrypt branch. - Added some documentation regarding snapshots naming restrictions. As before, in order to test this code the following PRs are required: mds: add protection from clients without fscrypt support #45073 mds: use the whole string as the snapshot long name #45192 mds: support alternate names for snapshots #45224 mds: limit the snapshot names to 240 characters #45312 Luís Henriques (3): ceph: add support for encrypted snapshot names ceph: add support for handling encrypted snapshot names ceph: update documentation regarding snapshot naming limitations Documentation/filesystems/ceph.rst | 10 ++ fs/ceph/crypto.c | 158 +++++++++++++++++++++++++---- fs/ceph/crypto.h | 11 +- fs/ceph/inode.c | 31 +++++- 4 files changed, 182 insertions(+), 28 deletions(-)