[PATCH 2/3] cryptodisk: Refactor password input out of crypto dev modules into cryptodisk

2021-08-25 Thread Glenn Washburn
The crypto device modules should only be setting up the crypto devices and not getting user input. This has the added benefit of simplifying the code such that three essentially duplicate pieces of code are merged into one. Signed-off-by: Glenn Washburn --- grub-core/disk/cryptodisk.c | 52

[PATCH 1/3] cryptodisk: Add infrastructure to pass data from cryptomount to cryptodisk modules

2021-08-25 Thread Glenn Washburn
As an example, passing a password as a cryptomount argument is implemented. However, the backends are not implemented, so testing this will return a not implemented error. Signed-off-by: Glenn Washburn --- grub-core/disk/cryptodisk.c | 31 ++- grub-core/disk/geli.c

[PATCH 3/3] cryptodisk: Move global variables into grub_cryptomount_args struct

2021-08-25 Thread Glenn Washburn
Signed-off-by: Glenn Washburn --- grub-core/disk/cryptodisk.c | 26 +- include/grub/cryptodisk.h | 3 +++ 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c index b6cf1835d..00a671a59 100644 ---

[PATCH 0/3] Refactor/improve cryptomount data passing to crypto modules

2021-08-25 Thread Glenn Washburn
This patch series refactors the way cryptomount passes data to the crypto modules. Currently, the method has been by global variable and function call argument, neither of which are ideal. This method passes data via a grub_cryptomount_args struct, which can be added to over time as opposed to

Re: [PATCH 00/12] Grub-shell improvements

2021-08-25 Thread Glenn Washburn
Hi Daniel, What are the chances this patch series can be reviewed in the near future? Some feedback would be greatly appreciated. Glenn On Wed, 31 Mar 2021 20:57:39 -0500 Glenn Washburn wrote: > I've extracted this patch series from the GitLab CI patch series, > which some minor

Re: [grub-fs-tester.in] zisofs test looks unsuitable

2021-08-25 Thread Glenn Washburn
On Wed, 25 Aug 2021 12:29:48 +0200 "Thomas Schmitt" wrote: > Hi, > > the xorriso run for testing zisofs in > > tests/util/grub-fs-tester.in > > looks not like it would cause any zisofs compression in the ISO. > > Line 1024: > > xorriso -compliance rec_mtime -set_filter_r --zisofs --

Re: [PATCH v2 1/8] tests: Make sure LANG is set properly for iso9660_test

2021-08-25 Thread Glenn Washburn
Hi Thomas, On Wed, 25 Aug 2021 11:34:47 +0200 "Thomas Schmitt" wrote: > Hi, > > Glenn Washburn wrote: > > LANG must be set to something that supports international > > characters, otherwise xorriso will refuse to include the file with > > name having international characters, causing the test

Re: [PATCH 2/2] configure: Check -falign-jumps=1 -falign-functions=1 beside -falign-loops=1

2021-08-25 Thread Fangrui Song via Grub-devel
On 2021-08-25, Daniel Kiper wrote: On Mon, Aug 23, 2021 at 11:18:38PM -0700, Fangrui Song wrote: Clang does not support -falign-jumps and only recently gained support for -falign-loops. Test all the alignment options to avoid passing unrecognized options to Clang: clang-14: error:

Re: [RFC PATCH 0/7] Support writing grub modules in Rust

2021-08-25 Thread Daniel Axtens
Heinrich Schuchardt writes: > On 8/24/21 3:32 PM, Daniel Axtens wrote: >> grub is a trusted component of the secure boot process, including >> "traditional" GPG-based secure boot, UEFI-based secure boot, and the >> WIP secure boot process using appended signatures. Most of grub is >> written in

[PATCH] fs/xfs: Avoid unreadble filesystem if V4 superblock

2021-08-25 Thread Erwan Velu
Commit 8b1e5d1936fffc490510e85c95f93248453586c1 introduced the support of bigtime by adding the some features in inodes V3. This change extended grub_xfs_inode struct by 76 bytes but also changed the computation of XFS_V3_INODE_SIZE & XFS_V2_INODE_SIZE. Prior this commit, XFS_V2_INODE_SIZE was

Re: [PATCH] commands/setpci: honor write mask argument

2021-08-25 Thread Daniel Kiper
On Sat, Aug 14, 2021 at 08:23:09PM +0200, Wouter van Kesteren wrote: > On Fri, Aug 13, 2021 at 10:41 PM Daniel Kiper wrote: > > May I add "Signed-off-by: Wouter van Kesteren " to > > this patch? > > > > Otherwise Reviewed-by: Daniel Kiper > > > > Daniel > > Hey Daniel, > > Thanks for the reply.

Re: [PATCH 2/2] configure: Check -falign-jumps=1 -falign-functions=1 beside -falign-loops=1

2021-08-25 Thread Daniel Kiper
On Mon, Aug 23, 2021 at 11:18:38PM -0700, Fangrui Song wrote: > Clang does not support -falign-jumps and only recently gained support > for -falign-loops. Test all the alignment options to avoid passing > unrecognized options to Clang: > > clang-14: error: optimization flag '-falign-jumps=1'

Re: [PATCH 1/2] configure: Remove obsoleted -malign-{jumps, loops, functions}

2021-08-25 Thread Daniel Kiper
On Tue, Aug 24, 2021 at 08:24:14AM +0200, Paul Menzel wrote: > Dear Fāng-ruì, > > Am 24.08.21 um 08:18 schrieb Fangrui Song via Grub-devel: > > GCC warns `cc1: warning: ‘-malign-loops’ is obsolete, use ‘-falign-loops’`. > > Clang silently ignores -malign-{jumps,loops,functions}. > > > > The

[grub-fs-tester.in] zisofs test looks unsuitable

2021-08-25 Thread Thomas Schmitt
Hi, the xorriso run for testing zisofs in tests/util/grub-fs-tester.in looks not like it would cause any zisofs compression in the ISO. Line 1024: xorriso -compliance rec_mtime -set_filter_r --zisofs -- -zisofs default -as mkisofs ... some options ... --

Re: [PATCH v2 1/8] tests: Make sure LANG is set properly for iso9660_test

2021-08-25 Thread Thomas Schmitt
Hi, Glenn Washburn wrote: > LANG must be set to something that supports international characters, > otherwise xorriso will refuse to include the file with name having > international characters, causing the test to fail. Can you tell me the exact error message from xorriso ? I have some

[PATCH v2 7/8] tests: Exit with skipped exit code when test not performed

2021-08-25 Thread Glenn Washburn
These tests were not performed and therefore did not pass, nor fail. This fixes misleading test exit code where, for instance, the pseries_test will pass on i386-pc, which is not a pseries architecture. Signed-off-by: Glenn Washburn --- tests/ahci_test.in | 8

[PATCH v2 6/8] tests: A failure of mktemp should cause the test script to exit with code 99

2021-08-25 Thread Glenn Washburn
A test exiting with code 99 means that there was an error in the test itself and not a failure in the thing being tested (also known as a hard error). Signed-off-by: Glenn Washburn --- tests/ahci_test.in| 4 ++-- tests/ehci_test.in| 4 ++-- tests/gettext_strings_test.in

[PATCH v2 4/8] tests: Fail immediately when grub-shell fails and do not occlude the error code

2021-08-25 Thread Glenn Washburn
If grub-shell fails, that means that whatever was being tested was not actually tested. So fail immediately. Sometimes grub-shell is not the last command in a pipeline of several commands, and in this case the failed error code can be hidden by a later failing command or hidden when 'set -e' is

[PATCH v2 8/8] tests: Use @BUILD_SHEBANG@ autoconf var instead of literal shell

2021-08-25 Thread Glenn Washburn
This bring this test in line with the rest of the test scripts. Signed-off-by: Glenn Washburn --- tests/f2fs_test.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/f2fs_test.in b/tests/f2fs_test.in index 1ea77c826..8c415db61 100644 --- a/tests/f2fs_test.in +++

[PATCH v2 5/8] tests: Make setup errors in grub-fs-tester hard errors

2021-08-25 Thread Glenn Washburn
When a test program fails because it failed to setup the test properly, this does not indicate a failure in what is attempting to be tested because the test is never run. So exit with a hard error exit status to note this difference. This will allow easier detection of tests that are not actually

[PATCH v2 0/8] Various fixes/improvements for tests

2021-08-25 Thread Glenn Washburn
This is an update to the first version of this patch series to account for changes in tests/ahci_test.in which cause a conflict in the previous patch series. Nothing of substance has changed which would invalidate the previous cover letter, to which I'll refer for comments on the patches. Glenn

[PATCH v2 3/8] tests: When checking squashfs fstime, use superblock last modified time

2021-08-25 Thread Glenn Washburn
Currently, the filesystem timestamp check in grub-fs-tester uses the squashfs image file's last modified timestamp and checks to see if that time stamp is within 3 seconds of the superblock timestamp as determined by grub. The image file's timestamp could be more than 3 seconds off if mksquashfs

[PATCH v2 1/8] tests: Make sure LANG is set properly for iso9660_test

2021-08-25 Thread Glenn Washburn
LANG must be set to something that supports international characters, otherwise xorriso will refuse to include the file with name having international characters, causing the test to fail. So if LANG is not set, set it to en_US.UTF-8, a very common UTF-8 locale. And if it is set, but does not look

[PATCH v2 2/8] tests: Fix partmap_test for arm*-efi, disk numbering has changed

2021-08-25 Thread Glenn Washburn
Perhaps using a newer UEFI firmware is the reason for the created test disk showing up as hd2 instead of hd3. Signed-off-by: Glenn Washburn --- tests/partmap_test.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/partmap_test.in b/tests/partmap_test.in index

Re: [PATCH] fat: Allow out-of-range FAT modification timestamps

2021-08-25 Thread Heinrich Schuchardt
On 8/16/21 4:59 PM, Tomasz Kramkowski via Grub-devel wrote: 20def1a3c introduced support for file modification times to allow comparison of file ages on EFI systems. This patch used grub_datetime2unixtime which uses a 32 bit unix timestamp and as a result did not allow the full range of times