From patchwork Mon Nov 11 21:04:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 11237765 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0EA96159A for ; Mon, 11 Nov 2019 21:05:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0597217F9 for ; Mon, 11 Nov 2019 21:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573506343; bh=8LGZlQ9PjzhCJsXqUDgAmcCdBPdgGqN761KBPA+4UOs=; h=From:To:Cc:Subject:Date:List-ID:From; b=U/hDvHYjdnmlnZJ/QX5g/TaY/7g9X0lQYR1PObZYGWIuApagPkHvpwFQLYWi0lG5j XLJj41iRj0szx1O5Fi3pOQ+tThw8TLm9rr1SH7FJhMTWgBRHJELioALu5CYPcKbLOw sk2BioPoXb02ECEQdzTEoM3qfNsaOmd+PjutmcNc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726952AbfKKVFm (ORCPT ); Mon, 11 Nov 2019 16:05:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:44334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726916AbfKKVFm (ORCPT ); Mon, 11 Nov 2019 16:05:42 -0500 Received: from ebiggers-linuxstation.mtv.corp.google.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 512B0206BB; Mon, 11 Nov 2019 21:05:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573506341; bh=8LGZlQ9PjzhCJsXqUDgAmcCdBPdgGqN761KBPA+4UOs=; h=From:To:Cc:Subject:Date:From; b=bivwWQiB7QbNInWItFThfZloqxdcKLLAINjOVaFwh5ed+L5RJKzfVRT9pywiw1ebR Mawl4c5WbTQEMYCA6ZBv2rACB+jZQlBglczMjlHpz++AiQMU0e0rbrvMdJoeh/NeQQ k2Rc6PSdMnSYmdKD2L/UYPGhAprKqbojjB8M/Dbk= From: Eric Biggers To: fstests@vger.kernel.org Cc: linux-fscrypt@vger.kernel.org, Satya Tangirala Subject: [RFC PATCH 0/5] xfstests: verify ciphertext of IV_INO_LBLK_64 encryption policies Date: Mon, 11 Nov 2019 13:04:22 -0800 Message-Id: <20191111210427.137256-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.24.0.rc1.363.gb1bccd3e3d-goog MIME-Version: 1.0 Sender: linux-fscrypt-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org Hello, This series adds an xfstest which tests that the encryption for IV_INO_LBLK_64 encryption policies is being done correctly. IV_INO_LBLK_64 is a new fscrypt policy flag which modifies the encryption to be optimized for inline encryption hardware compliant with the UFS v2.1 standard or the upcoming version of the eMMC standard. For more information, see the kernel patchset: https://lore.kernel.org/linux-fscrypt/20191024215438.138489-1-ebiggers@kernel.org/T/#u This is RFC for now since the kernel patches aren't in mainline yet (they're queued for 5.5). To run on ext4 this test also needs a version of e2fsprogs built from the master branch, for support for the stable_inodes filesystem feature. Eric Biggers (5): fscrypt-crypt-util: create key_and_iv_params structure fscrypt-crypt-util: add HKDF context constants common/encrypt: create named variables for UAPI constants common/encrypt: support verifying ciphertext of IV_INO_LBLK_64 policies generic: verify ciphertext of IV_INO_LBLK_64 encryption policies common/encrypt | 126 +++++++++++++++++++++++++------- src/fscrypt-crypt-util.c | 151 ++++++++++++++++++++++++++++----------- tests/generic/805 | 43 +++++++++++ tests/generic/805.out | 6 ++ tests/generic/group | 1 + 5 files changed, 259 insertions(+), 68 deletions(-) create mode 100644 tests/generic/805 create mode 100644 tests/generic/805.out