Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2400699ybh; Fri, 24 Jul 2020 11:46:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbIX3dGmx2dzdWfapeW8abFJL374lT69tmui80vXioUNFpSGz/QstljAgNtEgdQ+rHvOH+ X-Received: by 2002:a05:6402:1c10:: with SMTP id ck16mr10339487edb.72.1595616405005; Fri, 24 Jul 2020 11:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595616404; cv=none; d=google.com; s=arc-20160816; b=sB6USWvc9AMYLh6uibLJjlmznWpJp5eUjeMNMFoI5oK4ByaBLNlm1OCCSU4EuGJ0NR uFdyL8O8FcABjJR2tHGbRhcfwuOZQqi8SXDCUA8wuuE/Sc0lnmag2MfJHBKkox0OObnF VZ4gVeOlVHUZGYnFDUYIiROioDzgT6CkjI3IZFOPPKYecl9bFMg8TLJ4X+BmNo0eycB0 kNOCzzXs+N7pBNdjH/asRdJF3JdyiMmdNLuUnTgbJOyypuM9LIfrPI/memJMAJLvj7NW HrZzOBByakntcjF7mLbT3Iaeiqo1wEAD6ET2nHDhyB3L4Rl3ptTr5GILVcktd9iPeSKS 0A/A== 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=ak9b1MetrNwz8tkXgMNDeTUR8YoZBpQh5jjz0bYRY0M=; b=DY1FW6zffKyI9vEBrT7G8dBqBdflA8kIQAxls38oCfKQgrd9AhX3wFB/QSN/UXYCek AJC4clm72TkVXZcRg4cLve52zXOPlpTejNSNAgl6xv/bU49C2orsji6uHDWPHNXKI2v4 Jy+ziM4AtfqY8G9XvxQjFLE+QgoDKUA0xa84pie6iny/3PN195IB90cRE2O0RQhp1Pfx F5DAUd0WyEkPMEryFv44rORX9xi6d4bIhg8ZPpYpqFSMa1SJa8nOFU3iXbwZjeBTEa1o Wk54NlcLsa8gtvr4hXiiNPtGJzgxy4Bdh6trM/oiYdo9Peyd13f5q0j1IHhGjgSRfA+4 WEsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ITpDF03z; 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 b18si1154699ejq.13.2020.07.24.11.46.21; Fri, 24 Jul 2020 11:46:44 -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=ITpDF03z; 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 S1726768AbgGXSpZ (ORCPT + 99 others); Fri, 24 Jul 2020 14:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbgGXSpS (ORCPT ); Fri, 24 Jul 2020 14:45:18 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6F9DC03CA40 for ; Fri, 24 Jul 2020 11:45:16 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id w35so11501711ybi.16 for ; Fri, 24 Jul 2020 11:45:16 -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=ak9b1MetrNwz8tkXgMNDeTUR8YoZBpQh5jjz0bYRY0M=; b=ITpDF03zh4gAXQ80IgtXYXSVSudg/gU9rVN57XZQKro+oG5FczxsGGWDIk19KaZUlG Hkjz42c4BcWVc7yDHolMXgpncUUqKjalZEP7MuFByMe4pNel/xhE7ghREp4QClDZsKCO Ephfn9OUfGkQ4PQc3FpjFY9Q1OGvIPi/WWbgtYnXgbmI+ypPpmWm4E1cZWktwV5WV/Hk 1r6DAzau+34Tj4JZDNQ+kk85DecV+mTqhpQFF3eVxMwgJIAB1/H/e1XTzvZ6sLHGhsNn MhBrQ+GdgjovyQoTISpziTf1X9MqGb/stJUXrK9lxtfQ2BpP77C5c3tsRK5M0QJCJHHC 0gLg== 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=ak9b1MetrNwz8tkXgMNDeTUR8YoZBpQh5jjz0bYRY0M=; b=HlCuzodfCtSaS2VWLy1PMc6bKnPEoFcpsHVDNdUwHuqklq6d8GyzCIIm1LVsN7XF3B paEkKKSxr4AC43/l1dGR08NPMg/Ij3YlFiMgsnSej5HvaGZJNn1DK6wrkSGKg+3Gr3Co ztHdgidqz8MGMj0BsfcL8vElBeN49hoyu7ULOkOsKWriCPL3aCqRtt2pUQhTIOC+Q7zl +XzEyJfBzK4fC/zMNP3rjVH8UeDr5it0tIXXskU4DOd6FHJm+NWpJmnmbihptrTCIdzd cX1rNbRLuhZ70PgaZuOVaOTprCDBtOxzX7NEJKLglYjkqSs5OocDTu8OGSigigLAeQg3 Td9g== X-Gm-Message-State: AOAM530x00ufyr2ueUwop102Q7vha03FUFu/vuERpG1tjhFQV8o0BD/r fl6gvcUg5scDkNY+uqsnQUnsAUlo2CA= X-Received: by 2002:a25:2b89:: with SMTP id r131mr16541745ybr.131.1595616316063; Fri, 24 Jul 2020 11:45:16 -0700 (PDT) Date: Fri, 24 Jul 2020 18:45:00 +0000 In-Reply-To: <20200724184501.1651378-1-satyat@google.com> Message-Id: <20200724184501.1651378-7-satyat@google.com> Mime-Version: 1.0 References: <20200724184501.1651378-1-satyat@google.com> X-Mailer: git-send-email 2.28.0.rc0.142.g3c755180ce-goog Subject: [PATCH v6 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 , Eric Biggers , Jaegeuk Kim 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 Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim --- 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 1a6ad6f736b5..423c5a0daf45 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.142.g3c755180ce-goog