Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp715106rdf; Tue, 21 Nov 2023 14:39:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IErxqAcCTCgdbJzAe4gASxBZt7Dqrkc1IbZ+ACz5/2ZTWe5W3r24msAWqYdP7eZHX+LyIu3 X-Received: by 2002:a05:6a00:4209:b0:6cb:8abd:39b5 with SMTP id cd9-20020a056a00420900b006cb8abd39b5mr1075416pfb.1.1700606388274; Tue, 21 Nov 2023 14:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700606388; cv=none; d=google.com; s=arc-20160816; b=1FmqjsMQ30Z9jMrmHYMBHHtrrMEYcyf5j+ZHFudMk5vvtsuNLC0uOKWg+M5lgGxSYu CvtpMkVH7y2TbWCb0PX+F3DLmmH0dseiBMLfxbp4l32x3y1DYRceCG8HKU4ZUv4n2az1 g6KxoJdG79TJE7SV946Ly3yS40dITqju2bnGEGAq5GLVTamKCjUInpiunfcDfBdM/Yo0 b9QJCxsY5N+7INSy+ZoCbFkaoVE3+t4qb7FecD74wutp0Riktqwl7eVWnjWmC+fjns+A 91s9+higYZJrU1LtouHEkn7g78TS6VUpGbmuKcLU1CX3cXr9Q3KHNsHdDFgHySkeBt34 SExA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=xvGMzjc4utdrIKc0TPq3ACSXu/1S9AWiz790knsYmbo=; fh=gvial6qLvcAsOAQbq5rZqsZzavosyo15VQ19VqtaZLk=; b=xkbHjK1NlTL58wOIz8zAKF1SfUyxcANXildIvaeuvkWOLEhfMKWwDi5coE9ROzOkaN /tBp8FxGoQU5Ulf+CTlWubOVks3ZEKw6S4yd6sn2Au5YeM8OVfjF+8yK+UvkpzCBZTUV 23EK3i1JBZTI0TlmxvqlSPSf2uEedIq0a1hIaoCro0K2HT4iaSkx9mgm6lSsxrJaJ/Ea +mI1LB2he1WmzeRpa72AXCzEWva6ydcmt+6xAg5TggnbHBx54P7/UaYxgXeXyCB18p9p HR15w1X7Vo2r1nT2oQOCQrFakV77RSaeEedt26RCOT+TtINumBweXUxjJCjVgpJw9iaZ cLzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lhpw0ES8; spf=pass (google.com: domain of linux-ext4+bounces-70-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-70-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l189-20020a6388c6000000b0059ccb99a2eesi11836285pgd.173.2023.11.21.14.39.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 14:39:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-70-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lhpw0ES8; spf=pass (google.com: domain of linux-ext4+bounces-70-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-70-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4FA24282AEE for ; Tue, 21 Nov 2023 22:39:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC16055799; Tue, 21 Nov 2023 22:39:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lhpw0ES8" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 512C116405; Tue, 21 Nov 2023 22:39:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FCD6C433C7; Tue, 21 Nov 2023 22:39:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700606375; bh=F7T9ozkx5kq3xFIaUUxDQId3Ryj4a172IH01F7bLlaA=; h=From:To:Cc:Subject:Date:From; b=lhpw0ES8jbh5enMJozW9b9tfugeonU6dStP/RBqgzl6iW4a2QYjdVbrLamfcFe6ZM n1AfA68K0vk7gYwZ4DVK6cBs7YgncKMSPbJ+48E0DKjGJqloppllX1aI+hvM/Psard eDLY8DTaFPpYB9LOnb7BLfW1Vg4TtTE6T0qOXFK5HxayRph8zgZdsSjJDbpm2Nxf6M /3PxIQ67MLlFu+4GEn38Idncz6/l1K7ljSl0Sxk4XHP6cAmkWnYkb2EZLVl1cwsVl6 l9kRe3IvMRhHJs+1bmn/WtqDcXNBF/F6sqM8CAzZXNi164XKNgq4l/o5Z3w6emAgVB 00EsoXKMJbGUw== From: Eric Biggers To: fstests@vger.kernel.org Cc: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Daniel Rosenberg Subject: [PATCH v2 0/4] xfstests: test custom crypto data unit size Date: Tue, 21 Nov 2023 14:39:05 -0800 Message-ID: <20231121223909.4617-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.42.1 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series adds a test that verifies the on-disk format of encrypted files that use a crypto data unit size that differs from the filesystem block size. This tests the functionality that was introduced in Linux 6.7 by kernel commit 5b1188847180 ("fscrypt: support crypto data unit size less than filesystem block size"). This depends on the xfsprogs patch "xfs_io/encrypt: support specifying crypto data unit size" (https://lore.kernel.org/r/20231013062639.141468-1-ebiggers@kernel.org) which adds the '-s' option to the set_encpolicy command of xfs_io. As usual, the test skips itself when any prerequisite isn't met. I've tested the new test on both ext4 and f2fs. Changed in v2: - Updated the cover letter, commit message, and a comment to reflect that the kernel commit that added this feature was merged in 6.7. - Rebased onto latest for-next branch of xfstests. Eric Biggers (4): fscrypt-crypt-util: rename block to data unit common/rc: fix _require_xfs_io_command with digits in argument common/encrypt: support custom data unit size generic: add test for custom crypto data unit size common/encrypt | 42 +++++++++++++----- common/rc | 2 +- src/fscrypt-crypt-util.c | 93 ++++++++++++++++++++-------------------- tests/f2fs/002 | 6 +-- tests/generic/900 | 29 +++++++++++++ tests/generic/900.out | 11 +++++ 6 files changed, 123 insertions(+), 60 deletions(-) create mode 100755 tests/generic/900 create mode 100644 tests/generic/900.out base-commit: b9e1a88f8198ac02f3b82fe3b127d4e14f4a97b7 -- 2.42.1