Re: [PATCH v2] tpm: Disable tpm verifier if tpm is not present

2023-03-02 Thread Michael Chang via Grub-devel
On Thu, Mar 02, 2023 at 07:59:00PM +0100, Daniel Kiper wrote: > On Tue, Feb 28, 2023 at 11:22:14AM +0800, Michael Chang via Grub-devel wrote: > > On Thu, Feb 23, 2023 at 02:22:27PM +0100, Daniel Kiper wrote: > > > Adding James, Stefan and Robbie... > > > > > > On Mon, Feb 20, 2023 at 12:57:01PM

Re: [PATCH v2] tpm: Disable tpm verifier if tpm is not present

2023-03-02 Thread Daniel Kiper
On Tue, Feb 28, 2023 at 11:22:14AM +0800, Michael Chang via Grub-devel wrote: > On Thu, Feb 23, 2023 at 02:22:27PM +0100, Daniel Kiper wrote: > > Adding James, Stefan and Robbie... > > > > On Mon, Feb 20, 2023 at 12:57:01PM +0800, Michael Chang via Grub-devel > > wrote: > > > On Tue, Nov 29, 2022

Re: [PATCH v6 09/14] gdb: Add more support for debugging on EFI platforms

2023-03-02 Thread Daniel Kiper
On Mon, Feb 20, 2023 at 09:07:28PM -0600, Glenn Washburn wrote: > On Mon, 20 Feb 2023 15:06:46 -0500 > Robbie Harwood wrote: > > Glenn Washburn writes: > > > > > If the configure option --enable-efi-debug is given, then enable the > > > printing early in EFI startup of the command needed to load

[PATCH v3 00/10] Add basic Boot Loader Interface support

2023-03-02 Thread Oliver Steffen
This is a step towards supporting unified kernel images (UKI) in Grub. Add a new module named boot_loader_interface, which provides a command with the same name. It implements a small but quite useful part of the Boot Loader Interface [0]. This interface uses EFI variables for communication

[PATCH v3 09/10] commands/bli: Extract uft8 to utf16 conversion

2023-03-02 Thread Oliver Steffen
Create a new function for utf-8 to utf-16 conversion called `grub_utf8_to_utf16_alloc` in the bli module. It is modeled after the `grub_utf8_to_ucs4_alloc` like functions in charset.h. The goal is to move this to a central place so that it can help reduce code duplication. Please comment: Where

[PATCH v3 10/10] util/grub.d: Activate bli module on EFI

2023-03-02 Thread Oliver Steffen
Add a new configuration drop-in file that loads the boot-loader-interface (bli) module and runs the command in case we are booting on the EFI platform. Signed-off-by: Oliver Steffen --- util/grub.d/25_boot_loader_interface.in | 34 + 1 file changed, 34 insertions(+)

[PATCH v3 07/10] grub-core/kern/efi: Remove redundant null-termination

2023-03-02 Thread Oliver Steffen
grub_calloc already initializes the buffer with \0, no need to set the null-terminator at the end. Signed-off-by: Oliver Steffen --- grub-core/kern/efi/efi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c index 91aa5d644..008bf2f2e

[PATCH v3 05/10] grub-core: Make use of guid printf format specifier

2023-03-02 Thread Oliver Steffen
Use the new printf format specifier %pG. Fixes the text representation of GUIDs in the output of the lsefisystab command. Signed-off-by: Oliver Steffen --- grub-core/commands/efi/lsefi.c | 13 + grub-core/commands/efi/lsefisystab.c | 6 +- grub-core/commands/probe.c

[PATCH v3 08/10] types.h: Add GRUB_SSIZE_MAX

2023-03-02 Thread Oliver Steffen
In the same way as GRUB_SIZE_MAX, add GRUB_SSIZE_MAX. Signed-off-by: Oliver Steffen --- include/grub/types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/grub/types.h b/include/grub/types.h index c56ce9820..9f43a5580 100644 --- a/include/grub/types.h +++ b/include/grub/types.h

[PATCH v3 06/10] Add a module for the Boot Loader Interface

2023-03-02 Thread Oliver Steffen
Add a new module named boot_loader_interface, which provides a command with the same name. It implements a small but quite useful part of the Boot Loader Interface [0]. This interface uses EFI variables for communication between the boot loader and the operating system. This module sets two EFI

[PATCH v3 03/10] Unify GUID types

2023-03-02 Thread Oliver Steffen
There are 3 implementations of a GUID in Grub. Replace them with a common one, placed in types.h. It uses the "packed" flavor of the GUID structs, the alignment attribute is dropped, since it is not required. Signed-off-by: Oliver Steffen --- grub-core/commands/acpi.c| 4 +-

[PATCH v3 04/10] kern/misc: Add a format specifier GUIDs.

2023-03-02 Thread Oliver Steffen
Extend the printf format specifier for pointers (%p) to accept a suffix specifier G to print GUIDs: %pG can be used to print grub_guid structs. This does not interfere with the -Wformat checking of gcc. Note that the data type is not checked though (%p accepts void*). --- grub-core/kern/misc.c |

[PATCH v3 02/10] efi: Check for integer overflow in string conversion

2023-03-02 Thread Oliver Steffen
Check for integer overflow when converting the name of the EFI variable to UTF16 in grub_efi_set_variable_with_attributes(). Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/grub-core/kern/efi/efi.c

[PATCH v3 01/10] efi: Add grub_efi_set_variable_with_attributes

2023-03-02 Thread Oliver Steffen
Add a function to the EFI module that allows setting EFI variables with specific attributes. This is useful for marking variables as volatile, for example. Signed-off-by: Oliver Steffen Reviewed-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 19 +-- include/grub/efi/efi.h |