From patchwork Tue Sep 6 00:01:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sweet Tea Dorminy X-Patchwork-Id: 12966633 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 0D258ECAAA1 for ; Tue, 6 Sep 2022 00:01:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232355AbiIFABV (ORCPT ); Mon, 5 Sep 2022 20:01:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231154AbiIFABU (ORCPT ); Mon, 5 Sep 2022 20:01:20 -0400 Received: from box.fidei.email (box.fidei.email [IPv6:2605:2700:0:2:a800:ff:feba:dc44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47A4E52E47 for ; Mon, 5 Sep 2022 17:01:19 -0700 (PDT) Received: from authenticated-user (box.fidei.email [71.19.144.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.fidei.email (Postfix) with ESMTPSA id C116080C62; Mon, 5 Sep 2022 20:01:16 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dorminy.me; s=mail; t=1662422479; bh=5/icVUmunebx+lIioksEmlm6zOChW2iPY+PWq6mpLJs=; h=From:To:Cc:Subject:Date:From; b=hEJSX0GxYY7VNyxuBkQecTRSoSR55D2D9QKRg9AfdoNJa8sdqD67bdMD+Giy+fIef 4EnULlgnqxviluZ8IqMcwFJpgwRD0bdqkEzLx63JNFei/D9LmewPRIvSqEKA1lg6Kj LgnM7d1MToo3JKgpf2UXEwnTppeGKXhPuMLE/CXm6xCoahzY1XzX7WcJp0dKEhVePZ cTo2/pfFIzRiS4+fKWYo2xhJZvLhb0hTvFqE55scpk1tyQZPRtgov7goYY0xtRPfSQ 3WKDIghymqEA+W1ZGKlBqQ93VCsowQxLN8FYAr3gO+TttNMftKKiT+7rB8S0mA0nhb jBQ+cuKgBSACA== From: Sweet Tea Dorminy To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Cc: Sweet Tea Dorminy Subject: [PATCH 0/6] btrfs-progs: add encryption support Date: Mon, 5 Sep 2022 20:01:01 -0400 Message-Id: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org This changeset is a minimal set of changes to adapt to the kernel-side changes for encryption in [1]. While the kernel-shared files could be updated to use fscrypt_names in closer analogue to the kernel versions of the files, that is planned as a followup. [1] https://lore.kernel.org/linux-btrfs/cover.1662420176.git.sweettea-kernel@dorminy.me Changelog: v2: - updated to match kernel changeset's fscrypt extent contexts and changed format storing encrypted context length. v1: - https://lore.kernel.org/linux-btrfs/cover.1660729916.git.sweettea-kernel@dorminy.me Sweet Tea Dorminy (6): btrfs-progs: add fscrypt support to mkfs. btrfs-progs: update to match renamed dir_type btrfs-progs: interpret encrypted file extents. btrfs-progs: handle fscrypt context items btrfs-progs: escape unprintable characters in names btrfs-progs: check: update inline extent length checking check/main.c | 32 ++++++++++--------- check/mode-common.c | 4 +-- check/mode-lowmem.c | 6 ++-- cmds/restore.c | 2 +- common/fsfeatures.c | 10 ++++++ kernel-shared/ctree.h | 51 +++++++++++++++++++++++++++--- kernel-shared/dir-item.c | 8 ++--- kernel-shared/fscrypt.h | 27 ++++++++++++++++ kernel-shared/inode.c | 4 ++- kernel-shared/print-tree.c | 64 +++++++++++++++++++++++++++++++++++--- libbtrfsutil/btrfs.h | 2 ++ libbtrfsutil/btrfs_tree.h | 3 ++ 12 files changed, 178 insertions(+), 35 deletions(-) create mode 100644 kernel-shared/fscrypt.h