Re: [PATCH v2] grub-core/kern/corecmd: Quote variable values when displayed by the set command

2022-08-19 Thread Daniel Kiper
On Fri, Aug 19, 2022 at 05:38:24PM -0500, Glenn Washburn wrote: > Variable values may contain spaces at the end or newlines. However, when > displayed without quotes this is not obvious and can lead to confusion as > to the actual contents of variables. Also for some variables grub_env_get() >

[PATCH v6 2/2] cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner

2022-08-19 Thread Glenn Washburn
A user can now specify UUID strings with dashes, instead of having to remove dashes. This is backwards-compatability preserving and also fixes a source of user confusion over the inconsistency with how UUIDs are specified between file system UUIDs and cryptomount UUIDs. Since cryptsetup, the

[PATCH v6 1/2] misc: Add cast in grub_strncasecmp() to drop sign when calling grub_tolower()

2022-08-19 Thread Glenn Washburn
Note this cast was fixed in grub_strcasecmp() in commit ce41ab7aab (* grub-core/kern/misc.c (grub_strcmp): Use unsigned comparison as per common usage and preffered in several parts of code.), but this commit omitted fixing it in grub_strncasecmp(). Signed-off-by: Glenn Washburn Reviewed-by:

[PATCH v6 0/2] cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner

2022-08-19 Thread Glenn Washburn
Updates since v5: * Add better documentation of n parameter to grub_strncasecmp() at Patrick's suggestion. Glenn Glenn Washburn (2): misc: Add cast in grub_strncasecmp() to drop sign when calling grub_tolower() cryptodisk: Allows UUIDs to be compared in a dash-insensitive manner

Re: [PATCH v4 5/5] Don't display a uefi-firmware entry if it's not supported

2022-08-19 Thread Daniel Kiper
On Fri, Aug 19, 2022 at 05:26:19PM -0500, Glenn Washburn wrote: > On Thu, 18 Aug 2022 13:50:13 -0400 > Robbie Harwood wrote: > > > Add a new --is-supported option to commands/efi/efifwsetup and > > conditionalize display on it. > > > > Signed-off-by: Robbie Harwood > > --- > >

Re: [PATCH] Add a link to environment variables inside docs

2022-08-19 Thread Daniel Kiper
On Fri, Aug 19, 2022 at 04:36:16PM +0200, Daniel Kiper wrote: > On Thu, Aug 11, 2022 at 02:38:07PM -0500, Glenn Washburn wrote: > > On Sat, 09 Jan 2021 19:30:34 +0100 > > "Andrea G. Monaco" wrote: > > > > > This is trivial, but it might save some time to beginners. Please > > > consider for

[PATCH v2] grub-core/kern/corecmd: Quote variable values when displayed by the set command

2022-08-19 Thread Glenn Washburn
Variable values may contain spaces at the end or newlines. However, when displayed without quotes this is not obvious and can lead to confusion as to the actual contents of variables. Also for some variables grub_env_get() returns a NULL pointer instead of a pointer to an empty string and

Re: [PATCH v4 5/5] Don't display a uefi-firmware entry if it's not supported

2022-08-19 Thread Glenn Washburn
On Thu, 18 Aug 2022 13:50:13 -0400 Robbie Harwood wrote: > Add a new --is-supported option to commands/efi/efifwsetup and > conditionalize display on it. > > Signed-off-by: Robbie Harwood > --- > grub-core/commands/efi/efifwsetup.c | 3 +++ > util/grub.d/30_uefi-firmware.in | 2 +- > 2

Re: [PATCH] grub-core/kern/corecmd: Quote variable values when displayed by the set command

2022-08-19 Thread Glenn Washburn
On Fri, 19 Aug 2022 16:03:03 +0200 Daniel Kiper wrote: > On Tue, Aug 16, 2022 at 03:22:53PM -0500, Glenn Washburn wrote: > > Variable values may contain spaces at the end or newlines. However, when > > displayed without quotes this is not obvious and can lead to confusion as > > to the actual

Re: [PATCH v2 0/2] Document fwsetup and fix typo

2022-08-19 Thread Daniel Kiper
On Fri, Aug 19, 2022 at 05:02:25PM -0400, Robbie Harwood wrote: > Resend because I chunked a bunch of other stuff that didn't belong into the > original. Original message: > > As requested in review of the recent fwsetup support series, document fwsetup > (and its option), and fix a nearby typo I

Re: [PATCH v4 0/5] Improve logic to check for fwsetup support

2022-08-19 Thread Daniel Kiper
On Fri, Aug 19, 2022 at 04:54:39PM -0400, Robbie Harwood wrote: > In this version: fix wrong arg parsing in patch to address Glenn's review. > > Be well, > --Robbie > > Javier Martinez Canillas (2): > templates: Check for EFI at runtime instead of config generation time > efi: Print an error

[PATCH v2 0/2] Document fwsetup and fix typo

2022-08-19 Thread Robbie Harwood
Resend because I chunked a bunch of other stuff that didn't belong into the original. Original message: As requested in review of the recent fwsetup support series, document fwsetup (and its option), and fix a nearby typo I noticed that caused halt's options to not render correctly. Be well,

[PATCH v2 2/2] grub.texi: Fix mismatched brackets in halt command

2022-08-19 Thread Robbie Harwood
Signed-off-by: Robbie Harwood --- docs/grub.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/grub.texi b/docs/grub.texi index 949b5a3601..ac1f401a52 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -4800,7 +4800,7 @@ type are omitted, then the partition will be

[PATCH v2 1/2] grub.text: Document fwsetup command

2022-08-19 Thread Robbie Harwood
Signed-off-by: Robbie Harwood --- docs/grub.texi | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/grub.texi b/docs/grub.texi index b848d0928b..949b5a3601 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -4242,6 +4242,7 @@ you forget a command, you can run

[PATCH v4 4/5] efi: Print an error if boot to firmware setup is not supported

2022-08-19 Thread Robbie Harwood
From: Javier Martinez Canillas The "fwsetup" command is only registered if the firmware supports booting to the firmware setup UI. But it could be possible that the GRUB config already contains a "fwsetup" entry, because it was generated in a machine that has support for this feature. To

[PATCH v4 1/5] commands/efi/efifwsetup: Add missing grub_free()s

2022-08-19 Thread Robbie Harwood
Each call of grub_efi_get_variable() needs a grub_free(). Signed-off-by: Robbie Harwood --- grub-core/commands/efi/efifwsetup.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/grub-core/commands/efi/efifwsetup.c b/grub-core/commands/efi/efifwsetup.c index

[PATCH v4 2/5] Make all grub_efi_guid_t variables static

2022-08-19 Thread Robbie Harwood
This is believed to result in smaller code. Signed-off-by: Robbie Harwood --- grub-core/commands/efi/efifwsetup.c | 4 ++-- grub-core/efiemu/i386/pc/cfgtables.c | 6 +++--- grub-core/kern/efi/fdt.c | 2 +- grub-core/loader/efi/fdt.c | 2 +- grub-core/term/efi/console.c

[PATCH 0/2] grub.texi: Document fwsetup and fix typo

2022-08-19 Thread Robbie Harwood
As requested in review of the recent fwsetup support series, document fwsetup (and its option), and fix a nearby typo I noticed that caused halt's options to not render correctly. Be well, --Robbie Robbie Harwood (2): grub.text: Document fwsetup command grub.texi: Fix mismatched brackets in

[PATCH 1/2] grub.text: Document fwsetup command

2022-08-19 Thread Robbie Harwood
Signed-off-by: Robbie Harwood --- docs/grub.texi | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/grub.texi b/docs/grub.texi index b848d0928b..949b5a3601 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -4242,6 +4242,7 @@ you forget a command, you can run

[PATCH v4 5/5] Don't display a uefi-firmware entry if it's not supported

2022-08-19 Thread Robbie Harwood
Add a new --is-supported option to commands/efi/efifwsetup and conditionalize display on it. Signed-off-by: Robbie Harwood --- grub-core/commands/efi/efifwsetup.c | 3 +++ util/grub.d/30_uefi-firmware.in | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH 1/1] grub.texi: Fix mismatched brackets in halt command

2022-08-19 Thread Robbie Harwood
Signed-off-by: Robbie Harwood --- docs/grub.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/grub.texi b/docs/grub.texi index 949b5a3601..ac1f401a52 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -4800,7 +4800,7 @@ type are omitted, then the partition will be

[PATCH 2/2] grub.texi: Fix mismatched brackets in halt command

2022-08-19 Thread Robbie Harwood
Signed-off-by: Robbie Harwood --- docs/grub.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/grub.texi b/docs/grub.texi index 949b5a3601..ac1f401a52 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -4800,7 +4800,7 @@ type are omitted, then the partition will be

[PATCH v4 0/5] Improve logic to check for fwsetup support

2022-08-19 Thread Robbie Harwood
In this version: fix wrong arg parsing in patch to address Glenn's review. Be well, --Robbie Javier Martinez Canillas (2): templates: Check for EFI at runtime instead of config generation time efi: Print an error if boot to firmware setup is not supported Robbie Harwood (3):

[PATCH v4 3/5] templates: Check for EFI at runtime instead of config generation time

2022-08-19 Thread Robbie Harwood
From: Javier Martinez Canillas The 30_uefi-firmware template checks if an OsIndicationsSupported UEFI var exists and EFI_OS_INDICATIONS_BOOT_TO_FW_UI bit is set, to decide whether a "fwsetup" menu entry would be added or not to the GRUB menu. But this has the problem that it will only work if

Re: [PATCH] Remove HFS support

2022-08-19 Thread Vladimir 'phcoder' Serbinenko
Le ven. 19 août 2022, 21:05, Dimitri John Ledkov < dimitri.led...@canonical.com> a écrit : > There is no need for that code on any signed grubs or upstream. Ports that > want to support this patch can have it conditionally compiled / enabled > only on that arch, but not other. > > For example, in

Re: [PATCH] Remove HFS support

2022-08-19 Thread Dimitri John Ledkov
There is no need for that code on any signed grubs or upstream. Ports that want to support this patch can have it conditionally compiled / enabled only on that arch, but not other. For example, in Ubuntu we already use separate builds for signed & unsigned bootloaders. Or one may keep grub-2.06

Re: [PATCH] Remove HFS support

2022-08-19 Thread Vladimir 'phcoder' Serbinenko
Le ven. 19 août 2022, 20:11, Steve McIntyre a écrit : > On Fri, Aug 19, 2022 at 04:03:38PM +0200, John Paul Adrian Glaubitz wrote: > >> On Aug 19, 2022, at 3:59 PM, Daniel Kiper wrote: > >> > >> If I do not hear any major objections in the following weeks I will > >> merge this patch or a

Re: [PATCH] Remove HFS support

2022-08-19 Thread John Paul Adrian Glaubitz
On 8/19/22 20:09, Steve McIntyre wrote: On Fri, Aug 19, 2022 at 04:03:38PM +0200, John Paul Adrian Glaubitz wrote: On Aug 19, 2022, at 3:59 PM, Daniel Kiper wrote: If I do not hear any major objections in the following weeks I will merge this patch or a variant of it in the second half of

Re: [PATCH v3 2/8] efi: move MS-DOS stub out of generic PE header definition

2022-08-19 Thread Vladimir 'phcoder' Serbinenko
Looks good to me Le jeu. 18 août 2022, 16:54, Ard Biesheuvel a écrit : > The PE/COFF spec permits the COFF signature and file header to appear > anywhere in the file, and the actual offset is recorded in 4 byte > little endian field at offset 0x3c of the image. > > When GRUB is emitted as a

Re: [PATCH] Remove HFS support

2022-08-19 Thread Steve McIntyre
On Fri, Aug 19, 2022 at 04:03:38PM +0200, John Paul Adrian Glaubitz wrote: >> On Aug 19, 2022, at 3:59 PM, Daniel Kiper wrote: >> >> If I do not hear any major objections in the following weeks I will >> merge this patch or a variant of it in the second half of September. > >We’re still

Re: [PATCH] arm64/linux: Remove magic number header field check

2022-08-19 Thread Daniel Kiper
On Thu, Aug 11, 2022 at 04:51:57PM +0200, Ard Biesheuvel wrote: > The 'ARM\x64' magic number in the file header identifies an image as one > that implements the bare metal boot protocol, allowing the loader to > simply move the file to a suitably aligned address in memory, with > sufficient

Re: [PATCH] Remove HFS support

2022-08-19 Thread Vladimir 'phcoder' Serbinenko
No go from me either. Older macs may not be able to read HFS+ /boot. Also HFS+ presents couple of problems the biggest one is that in case of sudden reboot HFS+ often needs to be mounted by OSX or cleaning dirty flag manually before it becomes writeable. Le ven. 19 août 2022, 16:05, John Paul

Re: [PATCH 0/2] util: Resolve issues with use of grub_util_mkdir

2022-08-19 Thread Daniel Kiper
On Tue, Aug 09, 2022 at 01:29:03PM +, Darren Kenny wrote: > Coverity flagged some issues where grub_util_mkdir() was being called but the > return value was not being checked. > > After examining the implementation, on UNIX and ACROS, grub_util_mkdir() is a > macro that maps to libc's mkdir(),

Re: [PATCH] grub-shell: Only show grub-mkrescue output if it returns an error

2022-08-19 Thread Daniel Kiper
On Thu, Aug 11, 2022 at 12:06:43PM -0500, Glenn Washburn wrote: > The previous behavior ignored an error and the output from grub-mkrescue. > This made it difficult to discover that grub-mkrescue was the reason that > tests which rely on grub-shell were failing. Even after discovering >

Re: [PATCH v5 1/2] misc: Add cast in grub_strncasecmp() to drop sign when calling grub_tolower()

2022-08-19 Thread Daniel Kiper
On Thu, Aug 11, 2022 at 12:48:42PM -0500, Glenn Washburn wrote: > Note this cast was fixed in grub_strcasecmp() in commit ce41ab7aab > (* grub-core/kern/misc.c (grub_strcmp): Use unsigned comparison as per > common usage and preffered in several parts of code.), but this commit > omitted fixing it

Re: [PATCH] fill_fs_info: pass pointer to dnode_end_t instead of value

2022-08-19 Thread Daniel Kiper
On Fri, Aug 19, 2022 at 05:11:39PM +0200, Jag Raman wrote: > > On Aug 19, 2022, at 11:09 AM, Darren Kenny wrote: > > > > Hi Jag, > > > > These changes look good to me. > > > > Just to confirm, you have run 'make check' and this has no negative > > impact on the zfs tests? > > Hi Darren, > > Yes,

Re: [PATCH] fill_fs_info: pass pointer to dnode_end_t instead of value

2022-08-19 Thread Jag Raman
> On Aug 19, 2022, at 11:09 AM, Darren Kenny wrote: > > Hi Jag, > > These changes look good to me. > > Just to confirm, you have run 'make check' and this has no negative > impact on the zfs tests? Hi Darren, Yes, I ran ‘make check’ and this patch had no negative impact on the ZFS test. >

Re: [PATCH] fill_fs_info: pass pointer to dnode_end_t instead of value

2022-08-19 Thread Darren Kenny
Hi Jag, These changes look good to me. Just to confirm, you have run 'make check' and this has no negative impact on the zfs tests? Assuming that is the case... On Friday, 2022-08-19 at 10:57:22 -04, Jagannathan Raman wrote: > Coverity reports that dnode_end_t argument of fill_fs_info() is too

[PATCH] fill_fs_info: pass pointer to dnode_end_t instead of value

2022-08-19 Thread Jagannathan Raman
Coverity reports that dnode_end_t argument of fill_fs_info() is too large to pass-by-value. Therefore, replace the argument with a pointer. Fixes: CID 73631 Signed-off-by: Jagannathan Raman --- grub-core/fs/zfs/zfs.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-)

Re: [PATCH] Add a link to environment variables inside docs

2022-08-19 Thread Daniel Kiper
On Thu, Aug 11, 2022 at 02:38:07PM -0500, Glenn Washburn wrote: > On Sat, 09 Jan 2021 19:30:34 +0100 > "Andrea G. Monaco" wrote: > > > This is trivial, but it might save some time to beginners. Please > > consider for insertion. > > Reviewed-by: Glenn Washburn Huh! Somehow this fell off from my

Re: [PATCH 0/2] templates/linux_xen: Properly handle multiple initrd files

2022-08-19 Thread Daniel Kiper
On Wed, Aug 17, 2022 at 06:08:12PM -0300, Mauricio Faria de Oliveira wrote: > [removing xen-devel and Juergen Gross] > > Hi Daniel, > > On Fri, Aug 12, 2022 at 3:05 AM Juergen Gross wrote: > > > > On 11.08.22 21:10, Mauricio Faria de Oliveira wrote: > > > Adding the xen-devel list as requested in

Re: [PATCH v2 0/5] Fix coverity bugs and add checks for elf values in grub-core

2022-08-19 Thread Daniel Kiper
On Mon, Aug 15, 2022 at 11:00:01AM +0100, Darren Kenny wrote: > Hi Alec, > > These changes look good to me, > > Reviewed-by: Darren Kenny Reviewed-by: Daniel Kiper Alec, thank you for patiently working on this! Daniel ___ Grub-devel mailing list

Re: [PATCH] luks2: Continue trying all keyslots even if there are some failures

2022-08-19 Thread Daniel Kiper
On Mon, Aug 15, 2022 at 05:23:15PM +0200, Patrick Steinhardt wrote: > On Fri, Jul 22, 2022 at 03:04:50AM -0500, Glenn Washburn wrote: > > luks2_get_keyslot can fail for a variety of reasons that do not neccesarily > > mean the next keyslot should not be tried (eg. a new kdf type). So always > >

Re: [PATCH] Remove HFS support

2022-08-19 Thread John Paul Adrian Glaubitz
> On Aug 19, 2022, at 3:59 PM, Daniel Kiper wrote: > > On Fri, Aug 19, 2022 at 11:38:26PM +1000, Daniel Axtens wrote: >> HFS is so so very old now. According to Wikipedia, HFS was >> introduced in 1985 and the successor HFS+ came out in January >> 1998. Mac OS dropped support for writing HFS

Re: [PATCH] grub-core/kern/corecmd: Quote variable values when displayed by the set command

2022-08-19 Thread Daniel Kiper
On Tue, Aug 16, 2022 at 03:22:53PM -0500, Glenn Washburn wrote: > Variable values may contain spaces at the end or newlines. However, when > displayed without quotes this is not obvious and can lead to confusion as > to the actual contents of variables. > > Signed-off-by: Glenn Washburn

Re: [PATCH] Remove HFS support

2022-08-19 Thread Daniel Kiper
On Fri, Aug 19, 2022 at 11:38:26PM +1000, Daniel Axtens wrote: > HFS is so so very old now. According to Wikipedia, HFS was > introduced in 1985 and the successor HFS+ came out in January > 1998. Mac OS dropped support for writing HFS in 2009 and dropped > support for reading HFS in 2019 with

Re: [PATCH v4 0/5] Improve logic to check for fwsetup support

2022-08-19 Thread Daniel Kiper
On Thu, Aug 18, 2022 at 01:50:08PM -0400, Robbie Harwood wrote: > In this version: fix wrong arg parsing in patch to address Glenn's review. > > Be well, > --Robbie > > Javier Martinez Canillas (2): > templates: Check for EFI at runtime instead of config generation time > efi: Print an error

[PATCH] Remove HFS support

2022-08-19 Thread Daniel Axtens
HFS is so so very old now. According to Wikipedia, HFS was introduced in 1985 and the successor HFS+ came out in January 1998. Mac OS dropped support for writing HFS in 2009 and dropped support for reading HFS in 2019 with macOS 10.15. Grub's support for it doesn't survive contact with a fuzzer,