Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp99312ybk; Tue, 12 May 2020 16:36:45 -0700 (PDT) X-Google-Smtp-Source: APiQypJGbMr8cpaH6uuxfNAlye2L3J+U16XSHC372Pvu+lIbUyzsLELhaCM4Ke+uKOEZWyNciAYN X-Received: by 2002:a17:906:1dce:: with SMTP id v14mr20573476ejh.244.1589326604946; Tue, 12 May 2020 16:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589326604; cv=none; d=google.com; s=arc-20160816; b=ynBmOrhJhF7sj/2b+9whZgiIvYFzLyq9GSAOSFmd8gdxyCcKkcb6H6x3co1/Xwkn6J 6A7FP4BpqtjDFtZ2sk12w/7KgAAsxxff08ue3ZJlfFan+N9Ua7a/aB+kv8+txWll2as5 +J/TCCn0BIbCs2+aMZ6rJ2QMbzMt2j4l5OZhIswVQrcwDXi74Vw2vJDlpuID+H/O6uSo dx4CnzDm++AWjR+mJ6Ib0i3oAd7RrvmIKlaQiNzrHUo1TtsYV7SqecQtv2FsG79BMo5R B2Tuk+VLksEXwFv2d2e9QEycKKX+ws2jbcnIQnqmo1zrt44U+dTKFungIq9Hld0qkc+6 hERA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CtunamWNpifi9QtBcgSnG6mzwregi6ruKz6ib5uJh8Y=; b=QHHEVT+Gks5kV0uJ5gtLRR9DyQUwEmsM/gHUau9TjgcLhSo/3+q8LOJRXvlfpP7aWL kzL8eupgNNawHtc/R0rQxs96zsbD6lm7h8oi93at6/cCrOD9WKz/5Mx5Of+1RkH16wHC hhRApdd2cxDI2KumnwbM5ylTUxLdlmveZLFXY40XB34Pc282Ji5F+L6OfjDty/YXSwK0 A993BZThb28oHzhb3/insTC6rkWNg9G1JMoAwcbLxciMymhTwfjPnTVYW2MVHfjZzAZp vorn6dK57aw6AGK5ccsZTF2yw2/pM3pf2juzL7XflDPssICgoUR2KtnMaZC7uaVZ4Sgb tOcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=afRq1cf5; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si8302133edb.6.2020.05.12.16.36.10; Tue, 12 May 2020 16:36: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=@kernel.org header.s=default header.b=afRq1cf5; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731508AbgELXgH (ORCPT + 99 others); Tue, 12 May 2020 19:36:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:33912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725938AbgELXgH (ORCPT ); Tue, 12 May 2020 19:36:07 -0400 Received: from sol.hsd1.ca.comcast.net (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (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 81FBD206F5; Tue, 12 May 2020 23:36:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589326567; bh=dUF4crkDJeVEpBzU47y9vojUlDTZiw0M+TOOvUz27To=; h=From:To:Cc:Subject:Date:From; b=afRq1cf5WfvzrPj28yGvgevWspYFNzgMZQgKcHyFYPR8VWWT/lmrfs0Qp0W4OBWac VPkSZMBGDAbKBltNqjKetKmJv4TN8MLM5nhsjla7Jv8NNrCEVVt7hnOExK3PBlq32H 17Vq4/E4jU5X1pEAbWPA2sr/YRHRMuavi6kFLBuE= From: Eric Biggers To: linux-fscrypt@vger.kernel.org Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim , "Theodore Y . Ts'o" , Daniel Rosenberg Subject: [PATCH 0/4] fscrypt: make '-o test_dummy_encryption' support v2 policies Date: Tue, 12 May 2020 16:32:47 -0700 Message-Id: <20200512233251.118314-1-ebiggers@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org v1 encryption policies are deprecated in favor of v2, and some new features (e.g. encryption+casefolding) are only being added for v2. As a result, the "test_dummy_encryption" mount option (which is used for encryption I/O testing with xfstests) needs to support v2 policies. Therefore, this patchset adds support for specifying "test_dummy_encryption=v2" (or "test_dummy_encryption=v1"). To make this possible, it reworks the way the test_dummy_encryption mount option is handled to make it more flexible than a flag, and to automatically add the test dummy key to the filesystem's keyring. Patch 4 additionally changes the default to "v2". This patchset applies to v5.7-rc4. Eric Biggers (4): linux/parser.h: add include guards fscrypt: add fscrypt_add_test_dummy_key() fscrypt: support test_dummy_encryption=v2 fscrypt: make test_dummy_encryption use v2 by default Documentation/filesystems/f2fs.rst | 6 +- fs/crypto/fscrypt_private.h | 3 + fs/crypto/keyring.c | 117 +++++++++++++++++---------- fs/crypto/keysetup.c | 15 ++-- fs/crypto/policy.c | 125 +++++++++++++++++++++++++++++ fs/ext4/ext4.h | 7 +- fs/ext4/super.c | 68 ++++++++++++---- fs/f2fs/f2fs.h | 4 +- fs/f2fs/super.c | 85 ++++++++++++++------ include/linux/fscrypt.h | 52 ++++++++++-- include/linux/parser.h | 5 +- 11 files changed, 383 insertions(+), 104 deletions(-) -- 2.26.2