[PATCH v4 0/5] NVMeoFC support on Grub

2024-08-30 Thread Avnish Chouhan
This patch series adds support of NVMeoFC on grub. It consists of five patches. Patch 1/5 (0001-ieee1275-powerpc-implements-fibre-channel-discovery-.patch): grub-ofpathname doesn't work with fibre channel because there is no function currently implemented for it. This patch enables it by prividing

[PATCH v4 1/5] ieee1275/powerpc: implements fibre channel discovery for ofpathname

2024-08-30 Thread Avnish Chouhan
grub-ofpathname doesn't work with fibre channel because there is no function currently implemented for it. This patch enables it by prividing a function that looks for the port name, building the entire path for OF devices. Signed-off-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-co

[PATCH v4 2/5] ieee1275: implement FCP methods for WWPN and LUNs

2024-08-30 Thread Avnish Chouhan
This patch enables the fcp-targets and fcp-luns methods which are responsible to get WWPNs and LUNs for fibre channel devices. Those methods are specially necessary if the boot directory and grub installation are in different FCP disks, allowing the dev_iterate() to find the WWPNs and LUNs when ca

[PATCH v4 3/5] ieee1275: change the logic of ieee1275_get_devargs()

2024-08-30 Thread Avnish Chouhan
Usually grub will parse the PFW arguments by searching for the first occurence of the character ':'. However, we can have this char more than once on NQN. This patch changes the logic to find the last occurence of this char so we can get the proper values for NVMeoFC Signed-off-by: Diego Domingo

[PATCH v4 4/5] ieee1275: add support for NVMeoFC

2024-08-30 Thread Avnish Chouhan
This patch implements the functions to scan and discovery of NVMeoFC. Signed-off-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/disk/ieee1275/ofdisk.c | 390 +-- 1 file changed, 296 insertions(+), 94 deletions(-) diff --git a

[PATCH v4 5/5] ieee1275: ofpath enable NVMeoF logical device translate

2024-08-30 Thread Avnish Chouhan
This patch adds code to enable the translation of logical devices to the of NVMeoFC paths. Signed-off-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/osdep/linux/ofpath.c | 371 +-- include/grub/util/ofpath.h | 28

[PATCH 0/1] Allow to autogeneratd fdt entry via grub-mkconfig

2024-08-30 Thread alexxy
From: Alexey Shvetsov Some platforms like arm, arm64, risc-v and others need fdt entry to boot linux kernel. This patch allow to generate fdt records in grub.cfg via grub-mkconfig if GRUB_DEFAULT_DTB is set Alexey Shvetsov (1): fdt: allow to autogenerate entry for fdt files in grub.cfg util/

[PATCH 1/1] fdt: allow to autogenerate entry for fdt files in grub.cfg

2024-08-30 Thread alexxy
From: Alexey Shvetsov Some platforms like arm, arm64, riscv and other need fdt files to boot. This change allow to autogenerate entry for them if GRUB_DEFAULT_DTB is set Signed-off-by: Alexey Shvetsov --- util/grub-mkconfig.in | 3 ++- util/grub.d/10_linux.in | 14 ++ 2 files ch

Re: [PATCH v18 18/25] util/grub-protect: Add new tool

2024-08-30 Thread Daniel Kiper
On Fri, Jun 28, 2024 at 04:19:01PM +0800, Gary Lin via Grub-devel wrote: > From: Hernan Gatta > > To utilize the key protectors framework, there must be a way to protect > full-disk encryption keys in the first place. The grub-protect tool > includes support for the TPM2 key protector but other pr

Re: [PATCH v18 19/25] tpm2_key_protector: Support authorized policy

2024-08-30 Thread Daniel Kiper
On Fri, Jun 28, 2024 at 04:19:02PM +0800, Gary Lin via Grub-devel wrote: > This commit handles the TPM2_PolicyAuthorize command from the key file > in TPM 2.0 Key File format. > > TPM2_PolicyAuthorize is the essential command to support authorized > policy which allows the users to sign TPM policie

Re: [PATCH v18 20/25] tpm2_key_protector: Implement NV index

2024-08-30 Thread Daniel Kiper
On Fri, Jun 28, 2024 at 04:19:03PM +0800, Gary Lin via Grub-devel wrote: > From: Patrick Colp > > Currently with the TPM2 protector, only SRK mode is supported and > NV index support is just a stub. Implement the NV index option. > > Note: This only extends support on the unseal path. grub2_protec

Re: [PATCH v18 21/25] cryptodisk: Fallback to passphrase

2024-08-30 Thread Daniel Kiper
On Fri, Jun 28, 2024 at 04:19:04PM +0800, Gary Lin via Grub-devel wrote: > From: Patrick Colp > > If a protector is specified, but it fails to unlock the disk, fall back > to asking for the passphrase. However, an error was set indicating that > the protector(s) failed. Later code (e.g., LUKS code

Re: [PATCH v18 22/25] cryptodisk: wipe out the cached keys from protectors

2024-08-30 Thread Daniel Kiper
On Fri, Jun 28, 2024 at 04:19:05PM +0800, Gary Lin via Grub-devel wrote: > An attacker may insert a malicious disk with the same crypto UUID and > trick grub2 to mount the fake root. Even though the key from the key > protector fails to unlock the fake root, it's not wiped out cleanly so > the atta

Re: [PATCH v18 23/25] diskfilter: look up cryptodisk devices first

2024-08-30 Thread Daniel Kiper
On Fri, Jun 28, 2024 at 04:19:06PM +0800, Gary Lin via Grub-devel wrote: > When using disk auto-unlocking with TPM 2.0, the typical grub.cfg may > look like this: > > tpm2_key_protector_init --tpm2key=(hd0,gpt1)/boot/grub2/sealed.tpm > cryptomount -u -P tpm2 > search --fs-uuid --set=root >

Re: [PATCH v18 24/25] tpm2_key_protector: Add grub-emu support

2024-08-30 Thread Daniel Kiper
On Fri, Jun 28, 2024 at 04:19:07PM +0800, Gary Lin via Grub-devel wrote: > As a preparation to test tpm2_key_protector with grub-emu, the new > option, --tpm-device, is introduced to specify the TPM device for > grub-emu so that grub-emu can share the emulated TPM device with > the host. > > Since

Re: [PATCH v18 25/25] tests: Add tpm2_key_protector_test

2024-08-30 Thread Daniel Kiper
On Fri, Jun 28, 2024 at 04:19:08PM +0800, Gary Lin via Grub-devel wrote: > For the tpm2_key_protector module, the TCG2 command submission function > is the only difference between a QEMU instance and grub-emu. To test > TPM2 key unsealing with a QEMU instance, it requires an extra OS image > to inv

Re: [PATCH] net/net: Delete Routes for Deleted Interfaces

2024-08-30 Thread Andrew Hamilton
I see I messed up the description of the email... sorry about that. Full description: -- Correct incorrect handling of routes being maintained when an associated interface is deleted. Previously the route(s) for an interface being removed were not deleted. This resulted in displaying corrup

[PATCH] net/net: Delete Routes for Deleted Interfaces

2024-08-30 Thread Andrew Hamilton
With this update, routes mapped to a deleted interface will be deleted. Signed-off-by: Andrew Hamilton --- grub-core/net/net.c | 17 + 1 file changed, 17 insertions(+) diff --git a/grub-core/net/net.c b/grub-core/net/net.c index 8cad4fb6d..51e0dd312 100644 --- a/grub-core/net/ne