Re: [PATCH] docs: Improve initrd documentation

2023-06-28 Thread Oskari Pirhonen
On Wed, Jun 28, 2023 at 05:12:04 -0500, Glenn Washburn wrote: > Remove reference to "initial ramdisk" and replace with "initrd". This then > covers the case of ramdisk and ramfs, which is the usual method with kernels > 2.6 and greater. Add sentence with URL to initrd documentation Linux kernel. >

Re: [PATCH 4/4] docs: Add missing assumption

2023-06-28 Thread Oskari Pirhonen
On Wed, Jun 28, 2023 at 05:10:10 -0500, Glenn Washburn wrote: > Also reword a prior sentence to be more clear. > > Fixes: 5a3d2b4742df (docs: Add debugging chapter to development documentation) > Signed-off-by: Glenn Washburn > --- > docs/grub-dev.texi | 5 +++-- > 1 file changed, 3 insertions(+

Re: [PATCH] luks2: Add support for LUKS2 in (proc)/luks_script

2023-06-28 Thread Glenn Washburn
On Wed, 8 Feb 2023 19:39:19 +0100 Daniel Kiper wrote: > On Sun, Feb 05, 2023 at 01:05:31AM -0600, Glenn Washburn wrote: > > The sector size in bytes is added to each line and it is allowed to be 5 > > decimal digits long, which covers the most common cases of 512 and 4096 > > byte sectors with sp

Re: [EXTERNAL] Re: grub-2.06 fails to load 64bit Multiboot2 ELF with regions above 4GiB

2023-06-28 Thread Daniel Kiper
On Fri, Jun 23, 2023 at 03:10:36PM +, Baksik, Fred [USA] wrote: > That is only true when boot services is enabled.  Which is not always true. > The OS we are loading does not include the boot services tag. >   > Also it looks like the 4GiB limit was introduced with support of the 3.1.13 > Reloc

Re: [PATCH 2/2] efi: Fallback to legacy mode if shim is loaded on x86 archs

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 05:19:49PM +0200, Ard Biesheuvel wrote: > On Wed, 28 Jun 2023 at 15:29, Daniel Kiper wrote: > > > > The LoadImage() provided by the shim does not consult MOK when loading > > an image. So, simply signature verification fails when it should not. > > This means we cannot use

Re: [PATCH 2/2] efi: Fallback to legacy mode if shim is loaded on x86 archs

2023-06-28 Thread Ard Biesheuvel
On Wed, 28 Jun 2023 at 15:29, Daniel Kiper wrote: > > The LoadImage() provided by the shim does not consult MOK when loading > an image. So, simply signature verification fails when it should not. > This means we cannot use Linux EFI stub to start the kernel when the > shim is loaded. We have to f

Re: [PATCH 1/2] efi: Drop __grub_efi_api attribute from shim_lock->verify() call

2023-06-28 Thread Ard Biesheuvel
On Wed, 28 Jun 2023 at 15:29, Daniel Kiper wrote: > > ... because (surprisingly) it uses System V AMD64 ABI on x86-64 > architecture... > > Fixes: 6a080b9cd (efi: Add calling convention annotation to all prototypes) > > Signed-off-by: Daniel Kiper Acked-by: Ard Biesheuvel > --- > include/grub

[PATCH 1/2] efi: Drop __grub_efi_api attribute from shim_lock->verify() call

2023-06-28 Thread Daniel Kiper
... because (surprisingly) it uses System V AMD64 ABI on x86-64 architecture... Fixes: 6a080b9cd (efi: Add calling convention annotation to all prototypes) Signed-off-by: Daniel Kiper --- include/grub/efi/api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/efi

[PATCH 2/2] efi: Fallback to legacy mode if shim is loaded on x86 archs

2023-06-28 Thread Daniel Kiper
The LoadImage() provided by the shim does not consult MOK when loading an image. So, simply signature verification fails when it should not. This means we cannot use Linux EFI stub to start the kernel when the shim is loaded. We have to fallback to legacy mode on x86 architectures. This is not poss

[PATCH 0/2] efi: Secure Boot fixes

2023-06-28 Thread Daniel Kiper
Hi, Here are two fixes for Secure Boot issues reported recently. Please review and test. Daniel Daniel Kiper (2): efi: Drop __grub_efi_api attribute from shim_lock->verify() call efi: Fallback to legacy mode if shim is loaded on x86 archs grub-core/kern/efi/sb.c | 10 +

Re: [PATCH] docs: Improve initrd documentation

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 05:12:04AM -0500, Glenn Washburn wrote: > Remove reference to "initial ramdisk" and replace with "initrd". This then > covers the case of ramdisk and ramfs, which is the usual method with kernels > 2.6 and greater. Add sentence with URL to initrd documentation Linux kernel.

Re: [PATCH 0/4] Various corrections

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 05:10:06AM -0500, Glenn Washburn wrote: > These are all fairly trivial changes, so I lumped them together. > > Glenn > > Glenn Washburn (4): > misc: Fix typo > misc: Add space after comma in function argument list > docs: Minor corrections > docs: Add missing assumpt

Re: [PATCH] term/serial: Use grub_strncpy instead of grub_snprintf when only copying string

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 02:47:09AM -0500, Glenn Washburn wrote: > Using grub_strncpy() instead of grub_snprintf() is less overhead and > indicates clearly that the dest should be the same string as the source. > > Also fix indentation. > > Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper

Re: [PATCH 0/3] Improve newc generation logging

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 02:38:21AM -0500, Glenn Washburn wrote: > The first two patches stand on their own, but are needed for the last patch. > The first patch adds the support for the %o format specifier, which prints > numbers in octal. The second patch was something Daniel requested in reply >

Re: [PATCH] gitignore: Ignore python bytecode files

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 02:26:27AM -0500, Glenn Washburn wrote: > Python bytecode files, which end in .pyc, may be generated by the build > system as needed and should not go into the git repository. > > Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper Daniel ___

Re: [PATCH] loader/linux: Only emit newc directory once

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 02:25:16AM -0500, Glenn Washburn wrote: > When creating at runtime a newc initrd via arguments to initrd with "newc:" > prefixes, only emit a directory path record once. The original code > intended to do that by bailing out of emiting the record when the record > to be crea

Re: [PATCH] efi: Fix formatting and remove unneeded parenthesis

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 01:22:40AM -0500, Glenn Washburn wrote: > Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH v2] efi: Print EFI status as hex number instead of uint

2023-06-28 Thread Daniel Kiper
On Wed, Jun 28, 2023 at 01:19:48AM -0500, Glenn Washburn wrote: > EFI status codes are of different classes depending on the first byte and > all error status codes defined in appendix D of the main spec start from 1 > and have the high bit set. When printing as a uint, the decimal is a very > larg

Re: [PATCH v2] docs: Minor edits to debugging chapter

2023-06-28 Thread Daniel Kiper
On Mon, Jun 26, 2023 at 12:12:33PM -0500, Glenn Washburn wrote: > On Sun, 25 Jun 2023 14:27:57 -0500 > Oskari Pirhonen wrote: > > > Small set of wording and grammatical edits which did not make it in time > > for the original review of the chapter. > > LGTM. > > Reviewed-by: Glenn Washburn Revie

[PATCH] docs: Improve initrd documentation

2023-06-28 Thread Glenn Washburn
Remove reference to "initial ramdisk" and replace with "initrd". This then covers the case of ramdisk and ramfs, which is the usual method with kernels 2.6 and greater. Add sentence with URL to initrd documentation Linux kernel. Also, add a section documenting how to have the initrd command generat

[PATCH 2/4] misc: Add space after comma in function argument list

2023-06-28 Thread Glenn Washburn
Signed-off-by: Glenn Washburn --- grub-core/kern/misc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index 739cc56691a1..2890aad49fa7 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -1004,7 +1004

[PATCH 3/4] docs: Minor corrections

2023-06-28 Thread Glenn Washburn
When referring to initrd16 the link for initrd16 should be used, not a link for initrd. Also, correct the spelling of additionally and add a comma after it to correct its grammatical usage. Signed-off-by: Glenn Washburn --- docs/grub.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 0/4] Various corrections

2023-06-28 Thread Glenn Washburn
These are all fairly trivial changes, so I lumped them together. Glenn Glenn Washburn (4): misc: Fix typo misc: Add space after comma in function argument list docs: Minor corrections docs: Add missing assumption docs/grub-dev.texi | 5 +++-- docs/grub.texi | 4 +

[PATCH 1/4] misc: Fix typo

2023-06-28 Thread Glenn Washburn
Signed-off-by: Glenn Washburn --- grub-core/commands/regexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/commands/regexp.c b/grub-core/commands/regexp.c index 612003f94c82..246af39f058b 100644 --- a/grub-core/commands/regexp.c +++ b/grub-core/commands/regexp.c @

[PATCH 4/4] docs: Add missing assumption

2023-06-28 Thread Glenn Washburn
Also reword a prior sentence to be more clear. Fixes: 5a3d2b4742df (docs: Add debugging chapter to development documentation) Signed-off-by: Glenn Washburn --- docs/grub-dev.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi inde

[PATCH] term/serial: Use grub_strncpy instead of grub_snprintf when only copying string

2023-06-28 Thread Glenn Washburn
Using grub_strncpy() instead of grub_snprintf() is less overhead and indicates clearly that the dest should be the same string as the source. Also fix indentation. Signed-off-by: Glenn Washburn --- grub-core/term/serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH 3/3] loader/linux: Print debug message for each generated newc path generated

2023-06-28 Thread Glenn Washburn
Signed-off-by: Glenn Washburn --- grub-core/loader/linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c index cb2c3f6e4f06..35ad6bf19460 100644 --- a/grub-core/loader/linux.c +++ b/grub-core/loader/linux.c @@ -64,6 +64,7

[PATCH 0/3] Improve newc generation logging

2023-06-28 Thread Glenn Washburn
The first two patches stand on their own, but are needed for the last patch. The first patch adds the support for the %o format specifier, which prints numbers in octal. The second patch was something Daniel requested in reply to a different patch, adding PRI* macros for types grub_off_t and grub_d

[PATCH 1/3] misc: Support octal printf format code

2023-06-28 Thread Glenn Washburn
Also add parenthesis to nested terciary operator to improve clarity. Signed-off-by: Glenn Washburn --- grub-core/kern/misc.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index 977535282a33..739cc56691a1 100644 --

[PATCH 2/3] include/grub/types.h: Add PRI*GRUB_OFFSET and PRI*GRUB_DISK_ADDR

2023-06-28 Thread Glenn Washburn
These are currently always the same as PRI*GRUB_UINT64_T, but they may not be in the future. Signed-off-by: Glenn Washburn --- include/grub/types.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/grub/types.h b/include/grub/types.h index 9f43a5580935..0d96006fe

[PATCH] gitignore: Ignore python bytecode files

2023-06-28 Thread Glenn Washburn
Python bytecode files, which end in .pyc, may be generated by the build system as needed and should not go into the git repository. Signed-off-by: Glenn Washburn --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4064d3d1ec89..11fcecf5c40b 100644 ---

[PATCH] loader/linux: Only emit newc directory once

2023-06-28 Thread Glenn Washburn
When creating at runtime a newc initrd via arguments to initrd with "newc:" prefixes, only emit a directory path record once. The original code intended to do that by bailing out of emiting the record when the record to be created matches an existing record. However, this does not happen because gr