Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1632735ybh; Thu, 16 Jul 2020 18:36:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIa2DJmsNJKX0bgXNtL295LyjwUZ0mfJ12M97F8bYow/E6BPsIkd3SVgzC5PVQLmjTLtiD X-Received: by 2002:aa7:df08:: with SMTP id c8mr6864198edy.372.1594949807642; Thu, 16 Jul 2020 18:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594949807; cv=none; d=google.com; s=arc-20160816; b=NpMBxWaMufBt8jAuc/wWIFP0gVcoOpwSMHOGCYbTCQlTutHEa93a9FnfvFPxVj8M/7 qoL1FqxlQqaC02H6jcj+xAqGGBjgUUT4sydUbH6s9TExxwirtgXfrTmdyvphqUamdX8r /CaVw7mUSWrgKFOKrShiGLFL8R6+mp0l1eHKfocqfFU0JqLumKjTHU/I8W4a1uOYwXQ9 74lYO+CMBN2V0YNMylqLcO4Dfqq5OEdLwX8qz5onmLMp6g6IkIgifThyVLLKUbjoEsXc ds/Fh81Dt9NatAh7Lufh7sLTaA6j8O9G9ZFiIqIQtsCz7B0PjNnFIXMWyXT1eXBk8nUX f9Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=M2BARCIgcttWxNELPw4zNOFpxD9+a8coXLhy2/p7EJA=; b=sxGh4xV71kEH9nqZYlylYO0wm+GIdjBGOF2cNZWA8Elca8aVaum3T14GPmm162xmbi 3/8Ac2hzdw5SoMdQPEM+AXBN/0pIrG5veTBXbqDo/MP+YubC2lAdIV6YPHKvgUD2Rgg5 L+qsjzOh4s6IuUB9fqzZciiup3Hc9mavAog+/e94T8PYZJhrQqMFOJKN38aMAVIlzJWx zN32wLHj+GcPkb1Nc5+HkVukwRrIzndOjbB5d4B5+uYZnvgX75NeiegWxgr2xBuJvT9q A6wj/rYngL1OmXIUcDoylPs7Mi1/L9VxZnv/p7Nd4C5StvBq30nG1pX+3B1NEYDMHVe+ V9/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ScOd4eVd; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si4208710edx.461.2020.07.16.18.36.24; Thu, 16 Jul 2020 18:36:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ScOd4eVd; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbgGQBfj (ORCPT + 99 others); Thu, 16 Jul 2020 21:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbgGQBfg (ORCPT ); Thu, 16 Jul 2020 21:35:36 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC0B6C08C5DE for ; Thu, 16 Jul 2020 18:35:36 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id x14so5562608pln.18 for ; Thu, 16 Jul 2020 18:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=M2BARCIgcttWxNELPw4zNOFpxD9+a8coXLhy2/p7EJA=; b=ScOd4eVdydlkWQWlLKjntUWKsksUG68MvUJTiQKD/1j4ez9IPtZHneB7t7Ah8qMNyc MHTRFtyHLSVQuzXvDGfcq1tmzfAdCtLSmZIu8QiLrxTH5oPYRpc6Xm8acH/i/frdbEfg qAGhkmd5lTbDuYireEzW2VFzMdyc3o3Ix94XFQPXLGMjKcpyqYukSAR/2bsRkAy9pBhB 04thfYfEh36yMRz9fE7EiL6Rb5v/6cBI7oGtqnFqKH9w4ZHgI7/tLWdLQ9a6EuFnbIRP YWzo3NcnvBJXf0IanbogryzR0zhzkrtHOFHVCRcHUwUgvU/7rQQ2KBsuYyow/vQSkZkO l60g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=M2BARCIgcttWxNELPw4zNOFpxD9+a8coXLhy2/p7EJA=; b=Qt7g6f6UmNZamnRYtyLQr1ivWkzSWwR1CGVTfGCSpKHNG41mx90vPpPg0+0cB6inSj EFWHDl7wXfhYiNWPIqgcN63Bw/0tICXeQulOv4ek96FSYd2pMdGeb8BNfWSjdsjI8GYY cUxcWa8ozKUtbt7JmKxkOR/BIrUSZbKI4dKzSvl17borGWl8Rn/8m629aDTcQBK2pymC DCV64UF05O7uctpOKl8oewU9MwNBSga+r4gfURga5GrwdjJ7n01zRwFk/Pdux3ZaDhrn zNYiwCjGoqn25XeZ8w+Fy9Y3//OjvCDYljJKtu6f2cQeL2lFcVikzgiJcdddQejQjQSq jNkg== X-Gm-Message-State: AOAM533FKKDuYhgSkgprvs5PvNHbbbWmw08aw3x5bqW2P4YD+xTXbFIQ yidq01QwZFxIUcmL+f6mu5juMVhXKpg= X-Received: by 2002:a17:902:7008:: with SMTP id y8mr5639281plk.85.1594949736186; Thu, 16 Jul 2020 18:35:36 -0700 (PDT) Date: Fri, 17 Jul 2020 01:35:17 +0000 In-Reply-To: <20200717013518.59219-1-satyat@google.com> Message-Id: <20200717013518.59219-7-satyat@google.com> Mime-Version: 1.0 References: <20200717013518.59219-1-satyat@google.com> X-Mailer: git-send-email 2.28.0.rc0.105.gf9edc3c819-goog Subject: [PATCH v2 6/7] fscrypt: document inline encryption support 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: linux-xfs@vger.kernel.org, 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 Update the fscrypt documentation file for inline encryption support. Signed-off-by: Satya Tangirala --- Documentation/filesystems/fscrypt.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fscrypt.rst index f5d8b0303ddf..f3d87a1a0a7f 100644 --- a/Documentation/filesystems/fscrypt.rst +++ b/Documentation/filesystems/fscrypt.rst @@ -1204,6 +1204,18 @@ buffer. Some filesystems, such as UBIFS, already use temporary buffers regardless of encryption. Other filesystems, such as ext4 and F2FS, have to allocate bounce pages specially for encryption. +Fscrypt is also able to use inline encryption hardware instead of the +kernel crypto API for en/decryption of file contents. When possible, and +if directed to do so (by specifying the 'inlinecrypt' mount option for +an ext4/F2FS filesystem), it adds encryption contexts to bios and +uses blk-crypto to perform the en/decryption instead of making use +of the above read/write path changes. Of course, even if directed to make +use of inline encryption, fscrypt will only be able to do so if either +hardware inline encryption support is available for the selected encryption +algorithm or CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK is selected. If neither +is the case, fscrypt will fall back to using the above mentioned read/write +path changes for en/decryption. + Filename hashing and encoding ----------------------------- @@ -1250,7 +1262,9 @@ Tests To test fscrypt, use xfstests, which is Linux's de facto standard filesystem test suite. First, run all the tests in the "encrypt" -group on the relevant filesystem(s). For example, to test ext4 and +group on the relevant filesystem(s). One can also run the tests +with the 'inlinecrypt' mount option to test the implementation for +inline encryption support. For example, to test ext4 and f2fs encryption using `kvm-xfstests `_:: -- 2.28.0.rc0.105.gf9edc3c819-goog