Skip to content

LUKS1/2 testing in fs-tester and LUKS2 support in grub-probe

Glenn Washburn grub-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4disk/cryptodisk: When cheatmounting, use the sector info of the cheat devicegrub-core/disk/cryptodisk.c+18 -20 replies
2/4devmapper/getroot: Have devmapper recognize LUKS2grub-core/osdep/devmapper/getroot.c+7 -40 replies
3/4devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parametersgrub-core/osdep/devmapper/getroot.c+106 -12 replies
4/4grub-fs-tester: Add luks1 and luks2 support.gitignore Makefile.util.def tests/luks1_test.in +2 more+115 -20 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGlenn WashburnPatrick SteinhardtDaniel Kiper
SeriesR-b R-b
1/4T-b R-b R-b
2/4T-b
3/4T-b
4/4T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/4] LUKS1/2 testing in fs-tester and LUKS2 support in grub-probe

This series adds the testing of LUKS 1 and 2 encrypted container to the user-space fs tester. While this does replicate some of the testing done by grub_cmd_cryptomount, and is less flexible, it is run natively (that is without need for virtualization). It also tests the added LUKS2 support in grub-probe, unlike grub_cmd_cryptomount which does not test any user-space grub components.

All of these patches have previously been sent to the list. Only patch 4 has been slightly modified to fix some issues. Since utility of any one is greatly enhanced, and in the case of patch 4 required, by the others, I think it makes sense to evaluate them together.

Fabian has noted a memory leak with error handling when using LUKS2 with a null_cipher[1]. Since this isn't something that I expect to happen in the wild (why would you use an unencrypted LUKS container?) and even if it does occur grub-probe is exiting, so the leak would be very short lived, I don't think this is something that we need to worry about. It wouldn't be that hard to fix though, just annoying and add a little more complexity to the source.

The corresponding patches can be found in the order of this series here:
1: [PATCH v3] disk/cryptodisk: When cheatmounting, use the sector info of the cheat device

    https://lists.gnu.org/archive/html/grub-devel/2022-06/msg00106.html
 2: [PATCH v6 1/2] devmapper/getroot: Have devmapper recognize LUKS2
    https://lists.gnu.org/archive/html/grub-devel/2022-07/msg00036.html
 3: [PATCH v6 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters
    https://lists.gnu.org/archive/html/grub-devel/2022-07/msg00038.html
 4: [PATCH v4] grub-fs-tester: Add luks1 and luks2 support
    https://lists.gnu.org/archive/html/grub-devel/2022-06/msg00127.html

Glenn

[1] https://lists.gnu.org/archive/html/grub-devel/2022-11/msg00032.html

Fabian Vogt (1):
disk/cryptodisk: When cheatmounting, use the sector info of the cheat
device

Josselin Poiret (2):
devmapper/getroot: Have devmapper recognize LUKS2 devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM
parameters

Pierre-Louis Bonicoli (1):
grub-fs-tester: Add luks1 and luks2 support

 .gitignore                          |   2 +
 Makefile.util.def                   |  12 +++
 grub-core/disk/cryptodisk.c         |  20 ++++-
 grub-core/osdep/devmapper/getroot.c | 118 ++++++++++++++++++++++++++--
 tests/luks1_test.in                 |  23 ++++++
 tests/luks2_test.in                 |  23 ++++++
 tests/util/grub-fs-tester.in        |  57 +++++++++++++-
 7 files changed, 246 insertions(+), 9 deletions(-)
 create mode 100644 tests/luks1_test.in
 create mode 100644 tests/luks2_test.in
Signature · 1 line
2.34.1