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=-11.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=no 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 16E1FC433DF for ; Wed, 17 Jun 2020 07:57:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1D3721475 for ; Wed, 17 Jun 2020 07:57:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iFNqldV2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725773AbgFQH5i (ORCPT ); Wed, 17 Jun 2020 03:57:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725964AbgFQH5i (ORCPT ); Wed, 17 Jun 2020 03:57:38 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB052C061573 for ; Wed, 17 Jun 2020 00:57:37 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id y3so1680861ybf.4 for ; Wed, 17 Jun 2020 00:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=YrGLoue5k9cA5koD7/PO4iQoD6IjWXOUupBIS3VbDWk=; b=iFNqldV2E0w+7bBQ385IjyHcqfjU9mHdgYgoOylqrDwynqv0FkaVUtzHYnx9jORWBx nqLhO71PXhAxR/dettLy3H8elFoRNQ1xrwhbvwSjSMpTnH6Z3jQ1IJTsOZv7+sTTeATu ewCeVTcWVzetIlVH5/jaGuMBKUpHxMpGioqjOhAzRFBPHmVm36fnLoOaHDgjrTe4Vq5W WkrYAx7DiBNschMNjM2VxKdeL1pAKB/MwZJao3YSAovK798PHpRlhrY11GWKavUHDcr7 aypJl1ncfu6qAqOj9ec3P89dwmhW89iV6fJz4PAYy3IWXtr9brGu8umUFOvmmF5C0398 MWGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=YrGLoue5k9cA5koD7/PO4iQoD6IjWXOUupBIS3VbDWk=; b=JYk1IhuQk/wN9Ue14jk969YmMHhZDtqEfH6eaOCH9wAAF4fZpPNtIOsWeEByz+ygsL axFHKZee3nM/N5w+CaB5mKENofqydpA8RfhgFDA6VOJ2THDQl1pK9HAfqJRZPFOIK+Bj cCp4NRHs+HGHU+jMtpzyGh+uNhQxTVGSeYz/AQpyP5Xx0sX4urVb8u46C1e2TxGo8Yu3 p79cDQVcXU3g5vdp2kQT3BCIH9KAO+Hnc+KmjgqeoQj9Gh4UhkTPOYSTAI4IgMdOETSK XStqcK2hHM84ygZ/WVn0C9uwMG1/OgkEgWJSq0lda5uNiHSMapiX9+Wr817IslKrbtLF Bogg== X-Gm-Message-State: AOAM532WbMAUq1cBGkiWTh/Ns2pCCyLrCJxWOsbaezGETDIkaue12OfU 0mxCkpVAumlRMJYgw0CTldk0Ie1Y334= X-Google-Smtp-Source: ABdhPJyi+r7Mo3g9hSD3snev85cZk7qSVEtvV2RBZ+GdzakmAaT064tsDCrF7yalJdTdipPDsMh0KpvnBYc= X-Received: by 2002:a25:cbcc:: with SMTP id b195mr10932034ybg.91.1592380656942; Wed, 17 Jun 2020 00:57:36 -0700 (PDT) Date: Wed, 17 Jun 2020 07:57:28 +0000 Message-Id: <20200617075732.213198-1-satyat@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.27.0.290.gba653c62da-goog Subject: [PATCH 0/4] Inline Encryption Support for fscrypt From: Satya Tangirala To: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org Cc: Satya Tangirala Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This patch series adds support for Inline Encryption to fscrypt, f2fs and ext4. It builds on the inline encryption support now present in the block layer, and has been rebased on v5.8-rc1. Patch 1 introduces the SB_INLINECRYPT sb options, which filesystems should set if they want to use blk-crypto for file content en/decryption. Patch 2 adds inline encryption support to fscrypt. To use inline encryption with fscrypt, the filesystem must set the above mentioned SB_INLINECRYPT sb option. When this option is set, the contents of encrypted files will be en/decrypted using blk-crypto. Patches 3 and 4 wire up f2fs and ext4 respectively to fscrypt support for inline encryption, and e.g ensure that bios are submitted with blocks that not only are contiguous, but also have contiguous DUNs. Eric Biggers (1): ext4: add inline encryption support Satya Tangirala (3): fs: introduce SB_INLINECRYPT fscrypt: add inline encryption support f2fs: add inline encryption support Documentation/admin-guide/ext4.rst | 6 + Documentation/filesystems/f2fs.rst | 7 +- fs/buffer.c | 7 +- fs/crypto/Kconfig | 6 + fs/crypto/Makefile | 1 + fs/crypto/bio.c | 50 +++++ fs/crypto/crypto.c | 2 +- fs/crypto/fname.c | 4 +- fs/crypto/fscrypt_private.h | 118 +++++++++- fs/crypto/inline_crypt.c | 349 +++++++++++++++++++++++++++++ fs/crypto/keyring.c | 6 +- fs/crypto/keysetup.c | 68 ++++-- fs/crypto/keysetup_v1.c | 16 +- fs/ext4/inode.c | 4 +- fs/ext4/page-io.c | 6 +- fs/ext4/readpage.c | 11 +- fs/ext4/super.c | 9 + fs/f2fs/compress.c | 2 +- fs/f2fs/data.c | 81 +++++-- fs/f2fs/super.c | 32 +++ fs/proc_namespace.c | 1 + include/linux/fs.h | 1 + include/linux/fscrypt.h | 82 +++++++ 23 files changed, 794 insertions(+), 75 deletions(-) create mode 100644 fs/crypto/inline_crypt.c -- 2.27.0.290.gba653c62da-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=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no 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 197C1C433DF for ; Wed, 17 Jun 2020 07:57:57 +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 DF49021475; Wed, 17 Jun 2020 07:57:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=lists.sourceforge.net header.i=@lists.sourceforge.net header.b="UF83CKvh"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="ZqxYcMGW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="enDyGJcP"; dkim=neutral (0-bit key) header.d=google.com header.i=@google.com header.b="iFNqldV2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF49021475 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:To:Mime-Version:Message-Id:Date:Sender: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=H/fXE1TLoTZU3tRmoOSuBZn24slklrcBictzsHv5mkI=; b=UF83CKvht9CMNSt+G8YQFRX8Pc v0fIFY0X1dhGtSZTX/CPvd0q6i4Jc0RT6cvjXQM236cN/kqYIhKfrSibjfn4sNEkuUGtbpez8FKgg NhVi4d/5fpJxuQoe+QfWs63Y/skWcF37U8V7uQIFd5mnxGJt6pK3o7uWc6TbnnocaqDc=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jlSxI-0007Fe-K4; Wed, 17 Jun 2020 07:57:56 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from <38MzpXgYKAC8dLejLeRZZRWP.NZX@flex--satyat.bounces.google.com>) id 1jlSxG-0007FR-On for linux-f2fs-devel@lists.sourceforge.net; Wed, 17 Jun 2020 07:57:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Cc:To:From:Subject:Mime-Version: Message-Id:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YrGLoue5k9cA5koD7/PO4iQoD6IjWXOUupBIS3VbDWk=; b=ZqxYcMGWTjScay/RvAII9UBZIa 2aFaBg2StWcVlI5blaj/XNUpLTarQEu6gAGmwuxfWbPpm0hG6wUWAtuEEdCcqdwuRZmjnnMFr4Pdi mKixLt2rW+Z1yYEJ/wx1OmaHFAfoi4qnCVXZcstnxfO4aaaNaq8ZDRvje3oN1VWtRRgQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Cc:To:From:Subject:Mime-Version:Message-Id:Date:Sender: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=YrGLoue5k9cA5koD7/PO4iQoD6IjWXOUupBIS3VbDWk=; b=e nDyGJcP8BhC68Yd6uNcXf3IWxj5vO6Ne2YfzBCm2W7jsbIsfMnj8GoBSTo7IUE/+kAPzcAe9Qr/pr dWqJ3L8IWBrKFosTsJN1B6DlCfZ2Z/x/qtoUC3kX7OIjfLIxy2j3td1kg8pbOC6ouUIathBOTO0XO gp2UkCpG33rxbt/U=; Received: from mail-yb1-f202.google.com ([209.85.219.202]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jlSxB-0094B3-UN for linux-f2fs-devel@lists.sourceforge.net; Wed, 17 Jun 2020 07:57:54 +0000 Received: by mail-yb1-f202.google.com with SMTP id p22so1574100ybg.21 for ; Wed, 17 Jun 2020 00:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=YrGLoue5k9cA5koD7/PO4iQoD6IjWXOUupBIS3VbDWk=; b=iFNqldV2E0w+7bBQ385IjyHcqfjU9mHdgYgoOylqrDwynqv0FkaVUtzHYnx9jORWBx nqLhO71PXhAxR/dettLy3H8elFoRNQ1xrwhbvwSjSMpTnH6Z3jQ1IJTsOZv7+sTTeATu ewCeVTcWVzetIlVH5/jaGuMBKUpHxMpGioqjOhAzRFBPHmVm36fnLoOaHDgjrTe4Vq5W WkrYAx7DiBNschMNjM2VxKdeL1pAKB/MwZJao3YSAovK798PHpRlhrY11GWKavUHDcr7 aypJl1ncfu6qAqOj9ec3P89dwmhW89iV6fJz4PAYy3IWXtr9brGu8umUFOvmmF5C0398 MWGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=YrGLoue5k9cA5koD7/PO4iQoD6IjWXOUupBIS3VbDWk=; b=tbMnlT7Y6a4sZcBoqyHeSWHiLOO2+4NhhO2LVtVv3Fib5Qt8YJyqI6nTCFSmfz8Vaw mGAhTmt6sGVMRZ1yLXylGSl0oTlEnRWY3JI1XYku8bMn67qYofw0dbmPlMvAlzBNbCQp PP2u9kM/ucE/Bl7+qjIEtPd/2EHtcGbND/naAa5ZTFLVA+Fu8pBJ3X8MpYp02WHn2bd8 cu54pYANk485/rhBjlzqh3B39qa4swrgzXbg/jtIvXCyko9Pgwuc5GH8VVbvSYT5zgq/ 07fgFDZWT8t8E1fF259EpSBXnNTPWBDPQOrpWD9zG1qDMpS7+Lljb+k3pddapnayBC/o bmCw== X-Gm-Message-State: AOAM533BMK5rOoEREKqIcQXb4eJjc7bORuULKuGaUK1mToFxM/I0N4TF 1IFywHsJ0uScylcBOJUReCc1UEs3Vk4= X-Google-Smtp-Source: ABdhPJyi+r7Mo3g9hSD3snev85cZk7qSVEtvV2RBZ+GdzakmAaT064tsDCrF7yalJdTdipPDsMh0KpvnBYc= X-Received: by 2002:a25:cbcc:: with SMTP id b195mr10932034ybg.91.1592380656942; Wed, 17 Jun 2020 00:57:36 -0700 (PDT) Date: Wed, 17 Jun 2020 07:57:28 +0000 Message-Id: <20200617075732.213198-1-satyat@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.27.0.290.gba653c62da-goog To: linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org X-Headers-End: 1jlSxB-0094B3-UN Subject: [f2fs-dev] [PATCH 0/4] Inline Encryption Support for fscrypt 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: Satya Tangirala Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net This patch series adds support for Inline Encryption to fscrypt, f2fs and ext4. It builds on the inline encryption support now present in the block layer, and has been rebased on v5.8-rc1. Patch 1 introduces the SB_INLINECRYPT sb options, which filesystems should set if they want to use blk-crypto for file content en/decryption. Patch 2 adds inline encryption support to fscrypt. To use inline encryption with fscrypt, the filesystem must set the above mentioned SB_INLINECRYPT sb option. When this option is set, the contents of encrypted files will be en/decrypted using blk-crypto. Patches 3 and 4 wire up f2fs and ext4 respectively to fscrypt support for inline encryption, and e.g ensure that bios are submitted with blocks that not only are contiguous, but also have contiguous DUNs. Eric Biggers (1): ext4: add inline encryption support Satya Tangirala (3): fs: introduce SB_INLINECRYPT fscrypt: add inline encryption support f2fs: add inline encryption support Documentation/admin-guide/ext4.rst | 6 + Documentation/filesystems/f2fs.rst | 7 +- fs/buffer.c | 7 +- fs/crypto/Kconfig | 6 + fs/crypto/Makefile | 1 + fs/crypto/bio.c | 50 +++++ fs/crypto/crypto.c | 2 +- fs/crypto/fname.c | 4 +- fs/crypto/fscrypt_private.h | 118 +++++++++- fs/crypto/inline_crypt.c | 349 +++++++++++++++++++++++++++++ fs/crypto/keyring.c | 6 +- fs/crypto/keysetup.c | 68 ++++-- fs/crypto/keysetup_v1.c | 16 +- fs/ext4/inode.c | 4 +- fs/ext4/page-io.c | 6 +- fs/ext4/readpage.c | 11 +- fs/ext4/super.c | 9 + fs/f2fs/compress.c | 2 +- fs/f2fs/data.c | 81 +++++-- fs/f2fs/super.c | 32 +++ fs/proc_namespace.c | 1 + include/linux/fs.h | 1 + include/linux/fscrypt.h | 82 +++++++ 23 files changed, 794 insertions(+), 75 deletions(-) create mode 100644 fs/crypto/inline_crypt.c -- 2.27.0.290.gba653c62da-goog _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel