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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 BD29EC4361B for ; Fri, 18 Dec 2020 06:42:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6FA4323A52 for ; Fri, 18 Dec 2020 06:42:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732796AbgLRGmR (ORCPT ); Fri, 18 Dec 2020 01:42:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732678AbgLRGmR (ORCPT ); Fri, 18 Dec 2020 01:42:17 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 365FEC0617A7 for ; Thu, 17 Dec 2020 22:41:37 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id s2so875079plr.9 for ; Thu, 17 Dec 2020 22:41:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uIQfDC/Ph2Mj0AwvwcwaxZ4M1p4iwfh+sd2KyYnMW3k=; b=LjjpzATQOmCAs83P1DO8IQmmLQ5KfH54zPhW0XNB0isZ4eUiwadcvt8X3V8jxVEgVq 3JzF6nFC3ReDYjOEBB5iFgXVEr4nMpkPl9CFNjmOcHmbHFBM3NvAqmQoH55V8sgOvL52 77B666yUzB7g5USJEIGnXtlvJdjPMr0mUpF4jAPctgkoTODoszFVebj/xtX/wiS/wlb0 JmwAY54BqJdKEx+yspPGrf07gT0KqMLqzwmjZ4QRhwvCYMyzogLYYbaHbmi0+wP3roe2 qzRqr4DSoWX4JWdhkLXdTWsxnAeB6kF/xND7JvK2p9tL47XxD7yIGtJ0yCLIvgTPNVT4 k97w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uIQfDC/Ph2Mj0AwvwcwaxZ4M1p4iwfh+sd2KyYnMW3k=; b=MPTEU9xCJTnW7PYnxgSW8HlhrkWakUa2peuQxk603AUZ7ICaOQCV9BlaGFSP+Nw+P3 IQL4U55MgMhm5iwk/OGnduU9q8YSmxna+3qO9UBJj56mXqNdwdcTiIQlbi/Wx//b+zv6 Op25Q2PutRD/B1k+zIMzFzhIfcF5SmQm7KOvvETb/Wr1FiXxd0zqtJQo62tJIrvOUsyT TVfudUIvQamRwMZbo8/dMLN7kqvEVK40lzXDY1U00jy2MJ+w4VVEbryE80T0V8hk5oHs qiRL3ryx44YLKw3LjSEmAS9J96CLcsMb+r3BtE5WHligJsEUg8c5rHOrIzrIWxxSzU3c i8Xw== X-Gm-Message-State: AOAM530G2acb2/Q3xuizDj/O/N+OsrEtWaI7/+5iMqk8N04DYaLc6Ufa 7vwYPgdXPKhwCCZvgNIuwXU4qA== X-Google-Smtp-Source: ABdhPJwAoMU/wCqmbRu4OtB/oMycvpD9J5EH+p7/2JXTxgvdDwDS9PQssUbTb+zDVZBBLi1ozOovgQ== X-Received: by 2002:a17:902:8bc5:b029:dc:1e79:e746 with SMTP id r5-20020a1709028bc5b02900dc1e79e746mr2649165plo.77.1608273696432; Thu, 17 Dec 2020 22:41:36 -0800 (PST) Received: from google.com (139.60.82.34.bc.googleusercontent.com. [34.82.60.139]) by smtp.gmail.com with ESMTPSA id bg20sm6666431pjb.6.2020.12.17.22.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 22:41:35 -0800 (PST) Date: Fri, 18 Dec 2020 06:41:32 +0000 From: Satya Tangirala To: Jaegeuk Kim Cc: Eric Biggers , linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org Subject: Re: [PATCH 0/1] userspace support for F2FS metadata encryption Message-ID: References: <20201005074133.1958633-1-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org On Thu, Dec 17, 2020 at 08:23:18AM -0800, Jaegeuk Kim wrote: > Hi Satya, > > Could you please consider to rebase the patches on f2fs-tools/dev branch? > I've applied compression support which will have some conflicts with this > series. And, could you check this works with multi-partition support? > Sure, I'll do that! I sent out v2 of this patch series earlier today, so would you want me to send out a rebased version asap? or when I send out v3? Also, newbie question - multi-partition support is the same as multi-device support, right? > Thanks, > > On 10/05, Satya Tangirala wrote: > > The kernel patches for F2FS metadata encryption are at: > > > > https://lore.kernel.org/linux-fscrypt/20201005073606.1949772-4-satyat@google.com/ > > > > This patch implements the userspace changes required for metadata > > encryption support as implemented in the kernel changes above. All blocks > > in the filesystem are encrypted with the user provided metadata encryption > > key except for the superblock (and its redundant copy). The DUN for a block > > is its offset from the start of the filesystem. > > > > This patch introduces two new options for the userspace tools: '-A' to > > specify the encryption algorithm, and '-M' to specify the encryption key. > > mkfs.f2fs will store the encryption algorithm used for metadata encryption > > in the superblock itself, so '-A' is only applicable to mkfs.f2fs. The rest > > of the tools only take the '-M' option, and will obtain the encryption > > algorithm from the superblock of the FS. > > > > Limitations: > > Metadata encryption with sparse storage has not been implemented yet in > > this patch. > > > > This patch requires the metadata encryption key to be readable from > > userspace, and does not ensure that it is zeroed before the program exits > > for any reason. > > > > Satya Tangirala (1): > > f2fs-tools: Introduce metadata encryption support > > > > fsck/main.c | 47 ++++++- > > fsck/mount.c | 33 ++++- > > include/f2fs_fs.h | 10 +- > > include/f2fs_metadata_crypt.h | 21 ++++ > > lib/Makefile.am | 4 +- > > lib/f2fs_metadata_crypt.c | 226 ++++++++++++++++++++++++++++++++++ > > lib/libf2fs_io.c | 87 +++++++++++-- > > mkfs/f2fs_format.c | 5 +- > > mkfs/f2fs_format_main.c | 33 ++++- > > 9 files changed, 446 insertions(+), 20 deletions(-) > > create mode 100644 include/f2fs_metadata_crypt.h > > create mode 100644 lib/f2fs_metadata_crypt.c > > > > -- > > 2.28.0.806.g8561365e88-goog 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=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 B9901C4361B for ; Fri, 18 Dec 2020 06:41:53 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DD9123A52; Fri, 18 Dec 2020 06:41:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DD9123A52 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=lists.sourceforge.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:References: Message-ID:To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SIqOKV7QSwiQ0E6QMRh1uQgD1nsYvzYXwgUIuIGrM8o=; b=CXWJR3v1rMtFkJZsdIbbsHuqW KR4fnY+R3rm23Mo5ETXt8ZW4c6bbGzFdE9EtBL+e3qlb+1SP22DtaQ/yqmIr4wHocwcYQMgkqIbZ2 ojepEqz0nlkOPft3VRQXACuFCdfurQEHGbEQByjS/XQ89sc/St9K2skouV004bB72rhxQ=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kq9Sa-0007Kj-HA; Fri, 18 Dec 2020 06:41:52 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kq9SZ-0007KX-4b for linux-f2fs-devel@lists.sourceforge.net; Fri, 18 Dec 2020 06:41:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uIQfDC/Ph2Mj0AwvwcwaxZ4M1p4iwfh+sd2KyYnMW3k=; b=JPAKuJWlNeiX/165FTB/Phb/x5 qFK5xPgNwV0KbGvaztq91OhFVlRBE0kLhmmWhb6EmtkVtuXE0X5MSDhz2rf+RRUpNF+2UoDVrOYPR o7WVhJ6BFAIL9YE6PGQbunCdlrF6cK+XfC7Q/kZHq+GStEkgzB6EEUiBwfpIlEqYwO6c=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=uIQfDC/Ph2Mj0AwvwcwaxZ4M1p4iwfh+sd2KyYnMW3k=; b=FadGu5uc8Cs9f00dfMwAuNMzLb gMMKkWURsLV5tNBBq8ZjUnM84YfPKhcWWZEjomhOpdPK1sFed8zMyr1SH9+rujgn2QwvHnDHRwLgu CJOd9N4rM6RunmS3O+OWmPQbPI2I+13tUKVlCbks2qTF3KO/KY0o0fxPS/fmfKkhJtkc=; Received: from mail-pl1-f171.google.com ([209.85.214.171]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1kq9SQ-0011Gn-4k for linux-f2fs-devel@lists.sourceforge.net; Fri, 18 Dec 2020 06:41:51 +0000 Received: by mail-pl1-f171.google.com with SMTP id q4so881777plr.7 for ; Thu, 17 Dec 2020 22:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uIQfDC/Ph2Mj0AwvwcwaxZ4M1p4iwfh+sd2KyYnMW3k=; b=LjjpzATQOmCAs83P1DO8IQmmLQ5KfH54zPhW0XNB0isZ4eUiwadcvt8X3V8jxVEgVq 3JzF6nFC3ReDYjOEBB5iFgXVEr4nMpkPl9CFNjmOcHmbHFBM3NvAqmQoH55V8sgOvL52 77B666yUzB7g5USJEIGnXtlvJdjPMr0mUpF4jAPctgkoTODoszFVebj/xtX/wiS/wlb0 JmwAY54BqJdKEx+yspPGrf07gT0KqMLqzwmjZ4QRhwvCYMyzogLYYbaHbmi0+wP3roe2 qzRqr4DSoWX4JWdhkLXdTWsxnAeB6kF/xND7JvK2p9tL47XxD7yIGtJ0yCLIvgTPNVT4 k97w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uIQfDC/Ph2Mj0AwvwcwaxZ4M1p4iwfh+sd2KyYnMW3k=; b=Jwx2NO6285WbSWdTwM8VCXvN6i3gA3QAQkDvGfgOJoRQkDAr/PLc5ljxO+tVO82loA 2nrvazqDEKe4a8U/PwPVxPfjAWhGLZ5K7kFFsaVIqVhKpwZ1FdyBMUFUXaP9mjpeYtV1 03el+KMa1FMX9UpxfK1dmRRzdNaGOqtROCRKxpuHLrEHgXVD+C2RFhBK0ZmBG10p9ibx 98coyYk6vhfO7RHRwU+4DTtB6X//xka+Wzq+alzOVF7bQVjd/iP2OiUVTocC656RZGHn XVtakldQKuIEUAeJT4dff1vwffqVR+16z+LHkzZVylBL8Ay2HzGH17zQSCymvn/7jwNl 8N2Q== X-Gm-Message-State: AOAM533T9vK7Uprn1afbllV7PJBYRApOnkvwuGfm+8j0ahF7Kitnb8OQ KYjGjAjQZlbL7Omz3Zp1hQiJRA== X-Google-Smtp-Source: ABdhPJwAoMU/wCqmbRu4OtB/oMycvpD9J5EH+p7/2JXTxgvdDwDS9PQssUbTb+zDVZBBLi1ozOovgQ== X-Received: by 2002:a17:902:8bc5:b029:dc:1e79:e746 with SMTP id r5-20020a1709028bc5b02900dc1e79e746mr2649165plo.77.1608273696432; Thu, 17 Dec 2020 22:41:36 -0800 (PST) Received: from google.com (139.60.82.34.bc.googleusercontent.com. [34.82.60.139]) by smtp.gmail.com with ESMTPSA id bg20sm6666431pjb.6.2020.12.17.22.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Dec 2020 22:41:35 -0800 (PST) Date: Fri, 18 Dec 2020 06:41:32 +0000 To: Jaegeuk Kim Message-ID: References: <20201005074133.1958633-1-satyat@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1kq9SQ-0011Gn-4k Subject: Re: [f2fs-dev] [PATCH 0/1] userspace support for F2FS metadata encryption X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Satya Tangirala via Linux-f2fs-devel Reply-To: Satya Tangirala Cc: Eric Biggers , linux-fscrypt@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Thu, Dec 17, 2020 at 08:23:18AM -0800, Jaegeuk Kim wrote: > Hi Satya, > > Could you please consider to rebase the patches on f2fs-tools/dev branch? > I've applied compression support which will have some conflicts with this > series. And, could you check this works with multi-partition support? > Sure, I'll do that! I sent out v2 of this patch series earlier today, so would you want me to send out a rebased version asap? or when I send out v3? Also, newbie question - multi-partition support is the same as multi-device support, right? > Thanks, > > On 10/05, Satya Tangirala wrote: > > The kernel patches for F2FS metadata encryption are at: > > > > https://lore.kernel.org/linux-fscrypt/20201005073606.1949772-4-satyat@google.com/ > > > > This patch implements the userspace changes required for metadata > > encryption support as implemented in the kernel changes above. All blocks > > in the filesystem are encrypted with the user provided metadata encryption > > key except for the superblock (and its redundant copy). The DUN for a block > > is its offset from the start of the filesystem. > > > > This patch introduces two new options for the userspace tools: '-A' to > > specify the encryption algorithm, and '-M' to specify the encryption key. > > mkfs.f2fs will store the encryption algorithm used for metadata encryption > > in the superblock itself, so '-A' is only applicable to mkfs.f2fs. The rest > > of the tools only take the '-M' option, and will obtain the encryption > > algorithm from the superblock of the FS. > > > > Limitations: > > Metadata encryption with sparse storage has not been implemented yet in > > this patch. > > > > This patch requires the metadata encryption key to be readable from > > userspace, and does not ensure that it is zeroed before the program exits > > for any reason. > > > > Satya Tangirala (1): > > f2fs-tools: Introduce metadata encryption support > > > > fsck/main.c | 47 ++++++- > > fsck/mount.c | 33 ++++- > > include/f2fs_fs.h | 10 +- > > include/f2fs_metadata_crypt.h | 21 ++++ > > lib/Makefile.am | 4 +- > > lib/f2fs_metadata_crypt.c | 226 ++++++++++++++++++++++++++++++++++ > > lib/libf2fs_io.c | 87 +++++++++++-- > > mkfs/f2fs_format.c | 5 +- > > mkfs/f2fs_format_main.c | 33 ++++- > > 9 files changed, 446 insertions(+), 20 deletions(-) > > create mode 100644 include/f2fs_metadata_crypt.h > > create mode 100644 lib/f2fs_metadata_crypt.c > > > > -- > > 2.28.0.806.g8561365e88-goog _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel