Skip to content

xfstests: test adding filesystem-level fscrypt key via key_id

Eric Biggers fstests keyrings linux-fscrypt 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v1 RFC3 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Fixed incorrect detection of kernel support.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3common/rc: handle option with argument in _require_xfs_io_command()common/rc+1 -10 replies
2/3common/encrypt: move constant test key to common codecommon/encrypt tests/generic/580+15 -130 replies
3/3generic: test adding filesystem-level fscrypt key via key_idcommon/encrypt tests/generic/806 tests/generic/806.out +1 more+299 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] xfstests: test adding filesystem-level fscrypt key via key_id

This series adds a test which tests adding a key to a filesystem's fscrypt keyring via an "fscrypt-provisioning" keyring key. This is an alternative to the normal method where the raw key is given directly.

The needed kernel support was merged in 5.6, so currently this test needs the latest mainline kernel to run.

This test also depends on an xfs_io patch which adds the '-k' option to the 'add_enckey' command, e.g.:

xfs_io -c "add_enckey -k KEY_ID" MOUNTPOINT

This test is skipped if the needed kernel or xfs_io support is absent.

This has been tested on ext4, f2fs, and ubifs.

This series can also be retrieved from
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/xfstests-dev.git
tag "fscrypt-provisioning_2020-02-03".

Changed since v1:
- Fixed incorrect detection of kernel support.

Eric Biggers (3):
common/rc: handle option with argument in _require_xfs_io_command() common/encrypt: move constant test key to common code
generic: test adding filesystem-level fscrypt key via key_id

 common/encrypt        |  95 ++++++++++++++++++++++----
 common/rc             |   2 +-
 tests/generic/580     |  17 ++---
 tests/generic/806     | 155 ++++++++++++++++++++++++++++++++++++++++++
 tests/generic/806.out |  73 ++++++++++++++++++++
 tests/generic/group   |   1 +
 6 files changed, 315 insertions(+), 28 deletions(-)
 create mode 100644 tests/generic/806
 create mode 100644 tests/generic/806.out
Signature · 1 line
2.25.0.341.g760bfbb309-goog