grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] grub-fs-tester: Add luks1 and luks2 support


From: Pierre-Louis Bonicoli
Subject: Re: [PATCH v4] grub-fs-tester: Add luks1 and luks2 support
Date: Thu, 16 Jun 2022 01:59:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

On 15/06/2022 20.30, Glenn Washburn wrote:
From: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>

The logical sector size used by LUKS1 is 512 bytes and LUKS2 uses 512 to
4069 bytes. The deafualt password used is "pass", but can be overridden
by setting the PASS environment variable. The device mapper name is set
to the name of the temp directory so that its easy to corrolate device
mapper name with a particular test run. Also since this name is unique
per test run, multiple simultaneous test runs are allowed.

Note that cryptsetup is passing the --disable-locks parameter to allow
cryptsetup run successfully when /run/lock/cryptsetup is not accessible.
Since the device mapper name is unique per test run, there is no need to
worry about locking the device to serialize access.

Signed-off-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
Update from v3:
  * Add --force-password so that cryptsetup does not fail with the default
    password on systems where cryptsetup is built with the password quality
    checking library. Cryptsetup is not built this way on Debian or Ubuntu
    systems, but on Fabian's test system, which I presume is a SUSE variant,
    it is.

This is a heavily modified version of Pierre-Louis's v2 patch. It has
been tested with Fabian's v3 and Josselin's v4 series for x86_64-efi.
Some notable differences from the previous version:
  * Rebase on to master accounting for cleanup() changes
  * Allow multple tests runs to run simultaneously
  * Allow specifying alternate password with environment variable
  * Fixed bug in previous version where LC_ALL=C was being set for echo and
    not run_it
  * Make output on UUID fail consistent with other filesystems
  * Allow tests to work with older cryptsetups
  * Fixed bug where luks1 tests were actually testing luks2
  * Address my review comments

Note: The luks2 test will fail without some form of working grub-probe
support for luks2. This patch is independent of the above mentioned
patch series, will apply without them just fine, and can be reviewed
independently.

Glenn

Thanks for these updates. I ran the luks1_test and luks2_test tests successfully on top of the following patches: - [PATCH v3] disk/cryptodisk: When cheatmounting, use the sector info of the cheat device - [PATCH v5 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters

--
Pierre-Louis Bonicoli



reply via email to

[Prev in Thread] Current Thread [Next in Thread]