Re: [PATCH v2 2/3] multiboot2: Add PE load support

2024-04-01 Thread avnish
(reloc_base->size > context->reloc_dir->size)) +{ + grub_error (GRUB_ERR_BAD_ARGUMENT, + "Reloc %d block size %d is invalid\n", n, + reloc_base->size); + ret = GRUB_ERR_BAD_ARGUMENT; + goto

Re: [PATCH] Mandatory install device check for PowerPC

2024-05-29 Thread avnish
le on the machine. And corruption probably due to wrong PReP picked up by installer. And as the installer picked the valid PReP available, we don't get any errors. Thank you! Regards, Avnish Chouhan On 2024-05-27 19:44, Michal Suchánek wrote: Hello, On Mon, May 27, 2024 at 07:07:

Re: [PATCH v3 2/6] ieee1275/powerpc: enables device mapper discovery

2024-06-07 Thread avnish
quired functions has been implemented to handle this kind of case. We have done changes based on the requirement that will look into /sys/block/dm-* devices and search slave devices recursively inside slaves directory to find the root disk. Regards, Avnish Chouhan Le jeu. 6 juin 2024, 14:4

Re: [PATCH v3 2/6] ieee1275/powerpc: enables device mapper discovery

2024-06-20 Thread avnish
(name_buf); if (realname) { free (name_buf); name_buf = realname; } #endif Please suggest us. Thank you so much! Regards, Avnish Chouhan On 2024-06-07 15:05, grub-devel-requ...@gnu.org wrote: Send Grub-devel mailing list submissions to grub-devel@gnu.org

Re: [PATCH v3 2/6] ieee1275/powerpc: enables device mapper discovery

2024-06-25 Thread avnish
On 2024-06-25 10:01, Michael Chang wrote: On Thu, Jun 20, 2024 at 03:14:59PM GMT, avnish wrote: Hi Vladimir, We have implemented this code to enable the ieee1275 hint for grub. We had scenarios (in SLES) like the disk had PReP partition followed by an LVM and, inside this LVM , the boot

Re: [PATCH v3 3/6] ieee1275: implement FCP methods for WWPN and LUNs

2024-07-01 Thread avnish
On 2024-07-01 13:04, Michael Chang wrote: On Thu, Jun 06, 2024 at 06:07:24PM GMT, Avnish Chouhan wrote: 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

Re: [PATCH v3 4/6] ieee1275: implement vec5 for cas negotiation

2023-02-03 Thread avnish
On 2023-02-01 21:31, Robbie Harwood wrote: Stefan Berger writes: +.vec5_size = 1 + sizeof (struct option_vector5) - 2, +.vec5 = { + 0, 0, 0, 0, 0, 0, 0, 0, 256 +} Hi Stefan and Diego, are you able to speak to vec5 setting? I have been talking with Avnish Chouhan (CC&#

Re: [PATCH 0/6] NVMeoFC support on Grub

2023-06-06 Thread avnish
On 2023-05-10 17:57, Daniel Kiper wrote: On Mon, May 08, 2023 at 07:28:34PM +0530, Avnish Chouhan wrote: This patch series adds support of NVMeoFC on grub. It consists of six patches. Patch 1/6 (0001-ieee1275-powerpc-implements-fibre-channel-discovery-.patch): grub-ofpathname doesn't

Re: [PATCH v3 01/16] ieee1275/openfw: IBM client architecture(CAS) reboot support

2024-11-05 Thread avnish
EXPORT_FUNC(grub_ieee1275_devalias_next) (struct grub_ieee1275_devalias *ali void EXPORT_FUNC(grub_ieee1275_children_peer) (struct grub_ieee1275_devalias *alias); void EXPORT_FUNC(grub_ieee1275_children_first) (const char *devpath, struct grub_ieee1275_devalia

Re: [PATCH V6] ieee1275/ofdisk: retry on open and read failure

2024-11-05 Thread avnish
bsequent requests + * Cur time is used as a source of randomness + */ + grub_millisleep ((32 << ++inc) * (grub_get_time_ms () % 32)); +} while (1); + return err; +} + static grub_err_t grub_ofdisk_write (grub_disk_t disk, grub_disk_addr_t sector,

Re: [PATCH] Mandatory install device check for PowerPC

2024-11-08 Thread avnish
ed on this finding. This new check will only be applicable to PowerPC. And in case of PowerMacs, it will allow grub_install even without mentioning the install device. Thank you! Regards, Avnish Chouhan -- Message: 5 Date: Fri, 8 Nov 2024 15:07:29 +0300 From: "

Re: [PATCH] loader/efi/chainloader: Add efidriver command (Nikita Travkin)

2024-09-24 Thread avnish
_command ("chainloader", grub_cmd_chainloader, + 0, N_("Load another boot loader.")); + cmd_efidriver = grub_register_command ("efidriver", grub_cmd_efidriver, +0, N_("Load a efi driver."

Re: [RESEND V3] ieee1275/ofdisk: vscsi lun handling on lun len

2024-11-06 Thread avnish
rub_uint64_t buf_addr; + grub_uint64_t lun_count; +}; + Hi Mukesh, Coding style looks off in structure definition. '{' needs to be moved to next line. Thank you! Regards, Avnish Chouhan static grub_err_t grub_ofdisk_get_block_size (const char *device, grub_uint32_t

Re: [PATCH v3 03/16] ieee1275: Disable GRUB video support for IBM power machines

2024-11-08 Thread avnish
) (enum grub_ieee1275_flag flag); -- 2.46.2 ------ Reviewed-by: Avnish Chouhan  ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH 0/6] NVMeoFC support on Grub

2024-05-10 Thread Avnish Chouhan
From: Avnish Chouhan This patch series adds support of NVMeoFC on grub. It consists of six patches. Patch 1/6 (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 v2 2/6] ieee1275/powerpc: enables device mapper discovery

2024-05-10 Thread Avnish Chouhan
recursively inside slaves directory to find the root disk. Signed-off-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/osdep/linux/ofpath.c | 64 +- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/grub-core/osdep/linux/ofpath.c b

[PATCH v2 3/6] ieee1275: implement FCP methods for WWPN and LUNs

2024-05-10 Thread Avnish Chouhan
From: 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

[PATCH v2 6/6] ieee1275: ofpath enable NVMeoF logical device translate

2024-05-10 Thread Avnish Chouhan
From: Avnish Chouhan This patch add 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

[PATCH v2 4/6] ieee1275: change the logic of ieee1275_get_devargs()

2024-05-10 Thread Avnish Chouhan
From: 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 f

[PATCH v2 1/6] ieee1275/powerpc: implements fibre channel discovery for ofpathname

2024-05-10 Thread Avnish Chouhan
From: Diego Domingos 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 --- grub-core/osdep

[PATCH v2 5/6] ieee1275: add support for NVMeoFC

2024-05-10 Thread Avnish Chouhan
From: 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

[PATCH v2] ieee1275 radix support added for KVM on power

2024-05-23 Thread Avnish Chouhan
This patch adds support for Radix, Xive and Radix_gtse in Options vector5 which is required for KVM LPARs. KVM LPARs ONLY support Radix and not the Hash. Not enabling Radix on any PowerVM KVM LPARs will result in boot failure. Signed-off-by: Avnish Chouhan Reviewed-by: Daniel Kiper --- grub

[PATCH] Mandatory install device check for PowerPC

2024-05-27 Thread Avnish Chouhan
This patch adds a check on install_device while installing grub for PowerPC. If install_device is not mentioned in grub2-install, the error will be thrown. Running grub2-install on PowerPC without the install_device may result in boot corruption. Signed-off-by: Avnish Chouhan --- util/grub

[PATCH v3 0/6] NVMeoFC support on Grub

2024-06-06 Thread Avnish Chouhan
devices to the of NVMeoFC paths. Avnish Chouhan (4): ieee1275: implement FCP methods for WWPN and LUNs ieee1275: change the logic of ieee1275_get_devargs() ieee1275: add support for NVMeoFC ieee1275: ofpath enable NVMeoF logical device translate Diego Domingos (2): ieee1275/powerpc: i

[PATCH v3 1/6] ieee1275/powerpc: implements fibre channel discovery for ofpathname

2024-06-06 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 ---

[PATCH v3 2/6] ieee1275/powerpc: enables device mapper discovery

2024-06-06 Thread Avnish Chouhan
recursively inside slaves directory to find the root disk. Signed-off-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/osdep/linux/ofpath.c | 64 +- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/grub-core/osdep/linux/ofpath.c b

[PATCH v3 3/6] ieee1275: implement FCP methods for WWPN and LUNs

2024-06-06 Thread Avnish Chouhan
called by searchfs.uuid tool. Signed-off-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/disk/ieee1275/ofdisk.c | 111 ++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub

[PATCH v3 4/6] ieee1275: change the logic of ieee1275_get_devargs()

2024-06-06 Thread Avnish Chouhan
-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/kern/ieee1275/openfw.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c index 0278054..b97104c 100644 --- a/grub-core/kern/ieee127

[PATCH v3 5/6] ieee1275: add support for NVMeoFC

2024-06-06 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

[PATCH v3 6/6] ieee1275: ofpath enable NVMeoF logical device translate

2024-06-06 Thread Avnish Chouhan
This patch add 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] ieee1275: support added for multiple nvme bootpaths

2024-08-21 Thread Avnish Chouhan
This patch sets mupltiple NVMe boot-devices for more robust boot. Scenario where NVMe multipaths are available, all the available bootpaths (Max 5) will be added as the boot-device. Signed-off-by: Avnish Chouhan --- grub-core/osdep/unix/platform.c | 66

[PATCH v4 0/5] NVMeoFC support on Grub

2024-08-30 Thread Avnish Chouhan
he functions to scan and discovery of NVMeoFC. Patch 5/5(0005-ieee1275-ofpath-enable-NVMeoF-logical-device-transla.patch): This patch add code to enable the translation of logical devices to the of NVMeoFC paths. Avnish Chouhan (4): ieee1275: implement FCP methods for WWPN and LUNs ieee1275: chan

[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 ---

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

2024-08-30 Thread Avnish Chouhan
called by searchfs.uuid tool. Signed-off-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/disk/ieee1275/ofdisk.c | 111 ++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub

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

2024-08-30 Thread Avnish Chouhan
-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/kern/ieee1275/openfw.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c index 0278054..b97104c 100644 --- a/grub-core/kern/ieee127

[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

[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] ieee1275 : extended support in options vector5

2023-03-17 Thread Avnish Chouhan
This patch enables the multiple options in Options Vector5. Signed-off-by: Avnish Chouhan Reviewed-by: Brian King --- grub-core/kern/ieee1275/init.c | 43 ++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/grub-core/kern/ieee1275/init.c b

[PATCH v2 2/2] ieee1275 : extended support in options vector5

2023-03-26 Thread Avnish Chouhan
” property in the “ibm,dynamic-reconfiguration-memory” node and it may be presented in the device tree. 20. DRC_INFO : Client program supports the “ibm,drc-info” property definition and it may be presented in the device tree. Signed-off-by: Avnish Chouhan --- Change log: V2 - Split the

[PATCH v2 1/2] ieee1275 : Converting plain numbers to constants in Vec5

2023-03-26 Thread Avnish Chouhan
maximum number of CPUs supported. Signed-off-by: Avnish Chouhan --- Change log: V2 - Split the patch as suggested by Daniel Kiper. - Converted existing plain numbers to constants. --- grub-core/kern/ieee1275/init.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/grub-core

[PATCH 0/6] NVMeoFC support on Grub

2023-05-08 Thread Avnish Chouhan
devices to the of NVMeoFC paths. Avnish Chouhan (4): ieee1275: implement FCP methods for WWPN and LUNs ieee1275: change the logic of ieee1275_get_devargs() ieee1275: add support for NVMeoFC ieee1275: ofpath enable NVMeoF logical device translate Diego Domingos (2): ieee1275/powerpc: i

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

2023-05-08 Thread Avnish Chouhan
From: Diego Domingos 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 --- grub-core/osdep

[PATCH 5/6] ieee1275: add support for NVMeoFC

2023-05-08 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

[PATCH 3/6] ieee1275: implement FCP methods for WWPN and LUNs

2023-05-08 Thread Avnish Chouhan
called by searchfs.uuid tool. Signed-off-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/disk/ieee1275/ofdisk.c | 111 ++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub

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

2023-05-08 Thread Avnish Chouhan
This patch add 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 4/6] ieee1275: change the logic of ieee1275_get_devargs()

2023-05-08 Thread Avnish Chouhan
-by: Diego Domingos Signed-off-by: Avnish Chouhan --- grub-core/kern/ieee1275/openfw.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/grub-core/kern/ieee1275/openfw.c b/grub-core/kern/ieee1275/openfw.c index 0278054..b97104c 100644 --- a/grub-core/kern/ieee127

[PATCH 2/6] ieee1275/powerpc: enables device mapper discovery

2023-05-08 Thread Avnish Chouhan
From: Diego Domingos This patch enables the device mapper discovery on ofpath.c. Currently, when we are dealing with a device like /dev/dm-* the ofpath returns null since there is no function implemented to handle this case. This patch implements a function that will look into /sys/block/dm-* de

[PATCH] ieee1275 radix support added for KVM on power

2023-12-18 Thread Avnish Chouhan
This patch adds support for Radix, Xive and Radix_gtse in Options vector5 which is required for KVM LPARs. KVM LPARs ONLY support Radix and not the Hash. Not enabling Radix on any PowerVM KVM LPARs will result in boot failure. Signed-off-by: Avnish Chouhan --- grub-core/kern/ieee1275/init.c

Re: [PATCH V4] ieee1275/ofdisk: vscsi lun handling on lun len

2024-11-11 Thread Avnish Chouhan
grub_ieee1275_close (ihandle); grub_free (buf); return; -- 2.47.0 -- Reviewed-by: Avnish Chouhan ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH v3 02/16] term/terminfo: for ppc, reset console display attr when clear screen

2024-11-11 Thread Avnish Chouhan
e[m"); if (grub_strcmp ("ieee1275", str) == 0) -- 2.46.2 -- Reviewed-by: Avnish Chouhan  ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH] Mandatory install device check for PowerPC

2024-11-08 Thread Avnish Chouhan
install_device may result in bootlist corruption. When no install device is specified, it attempts to load images from the filesystem, which leads to nvram bootlist corruption. The idea is to fail the operation and avoid creating the invalid boot entry. Signed-off-by: Avnish Chouhan --- grub-install.c

Re: [PATCH] Mandatory install device check for PowerPC

2024-11-28 Thread Avnish Chouhan
uot;. The issue we had in my v1 is to identify whether the machine PowerPC or PowerMac. With v2, we have achieved this and the change is limited to PowerPC now. Thank you! Regards, Avnish Chouhan -- Message: 4 Date: Mon, 11 Nov 2024 10:13:57 +0100 From: Mich

Re: Grub-devel Digest, Vol 249, Issue 46

2024-11-28 Thread Avnish Chouhan
e have achieved this and the change is limited to PowerPC now. Thank you! Regards, Avnish Chouhan -- Message: 4 Date: Mon, 11 Nov 2024 10:13:57 +0100 From: Michal Suchánek To: avnish Cc: grub-devel@gnu.org, grub-devel-requ...@gnu.org, phco...@gmail.com,

Re: [PATCH 2/2] ieee1275: Add TCG2 driver for ieee1275 PowerPC firmware

2024-11-13 Thread Avnish Chouhan
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GRUB_IEEE1275_TPM_HEADER +#d

Re: [PATCH] menu: add GRUB_RIGHT_TO_SELECT to toggle select-by-right-arrow-key

2024-11-17 Thread Avnish Chouhan
! + if ((c != GRUB_TERM_KEY_RIGHT) || + right_to_select) + { + menu_fini (); + *auto_boot = 0; + return current_entry; + } + break; This also seems little off on coding style. Thank you! Regards, Avnish Ch

Re: [PATCH] Mandatory install device check for PowerPC

2025-01-05 Thread Avnish Chouhan
Hi Vladimir, Did you get a chance to review my response to your query? Thank you! Regards, Avnish Chouhan On 2024-11-28 16:11, Avnish Chouhan wrote: (Resending the email due to missing proper subject line caused by some glitches in my application) Hi Vladimir, Hope you're doing wond

Re: [PATCH v1 01/21] powerpc-ieee1275: Add support for signing grub with an appended signature

2025-01-05 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Rashmica Gupta Add infrastructure to allow firmware to verify the integrity of grub by use of a Linux-kernel-module-style appended signature. We initially target powerpc-ieee1275, but the code should be

Re: [PATCH v1 14/21] ieee1275: Platform Keystore (PKS) Support

2025-02-06 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: enhancing the infrastructure to enable the Platform Keystore (PKS) feature, which provides access to the SB VERSION, DB, and DBX secure boot variables from PKS. Signed-off-by: Sudhakar Kuppusamy --- grub-core/kern

Re: [PATCH] powerpc: increase MIN RMA size for CAS negotiation

2025-02-06 Thread Avnish Chouhan
On 2025-02-06 13:00, Michael Chang wrote: On Wed, Jan 15, 2025 at 05:46:05PM +0530, Avnish Chouhan wrote: Change RMA size from 512 MB to 768 MB which will result in more memory at boot time for PowerPC. When PowerPC LPAR use/uses vTPM, Secure Boot or FADump, the 512 MB RMA memory is not

Re: [PATCH v1 13/21] ieee1275: enter lockdown based on /ibm,secure-boot

2025-02-05 Thread Avnish Chouhan
} +static void +grub_get_ieee1275_secure_boot (void) +{ + grub_ieee1275_phandle_t root; + int rc; + grub_uint32_t is_sb; + + grub_ieee1275_finddevice ("/", &root); Hi, Failure check condition is missing! Thank you, Avnish Chouhan + + rc = grub_ieee1275_get_integer_property (roo

Re: [PATCH v1 15/21] ieee1275: Read the DB and DBX secure boot variables

2025-02-06 Thread Avnish Chouhan
Suggestion : Can we use grub_dprintf instead of grub_printf, unless it is extremely necessary! Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: If secure boot is enabled with PKS, it will read secure boot variables such as db and dbx from PKS and extract

Re: [PATCH v1 16/21] appendedsig: The creation of trusted and distrusted lists

2025-02-06 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: The trusted certificates and binary hashes, distrusted certificates and binary/certificate hashes will be extracted from the platform keystore buffer if Secure Boot is enabled with PKS. In order to verify the

Re: [PATCH v1 17/21] appendedsig: While verifying the kernel, use trusted and distrusted lists

2025-02-06 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: To verify the kernel's: verify the kernel binary against list of binary hashes that are distrusted and trusted. If it is not listed in both trusted and distrusted, the trusted keys from trusted key list used to v

Re: [PATCH v1 19/21] appendedsig: Reads the default DB keys from ELF Note

2025-02-06 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: if secure boot enabled with PKS and set use_static_keys flag, it reads the DB default keys from ELF Note and store it in trusted list buffer. Signed-off-by: Sudhakar Kuppusamy --- grub-core/commands/appendedsig

Re: [PATCH v1 18/21] ieee1275: set use_static_keys flag

2025-02-06 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: if secure boot enabled with PKS, it set the use_static_keys flag when DB variable is not present in PKS storage and the appendedsig (module) would use it later to extract the default DB key's from ELF Note and

Re: [PATCH v1 10/21] appended signatures: support verifying appended signatures

2025-02-05 Thread Avnish Chouhan
c, grub_env_write_sec); + grub_env_export ("check_appended_signatures"); + + rc = asn1_init (); + if (rc) +grub_fatal ("Error initing ASN.1 data structures: %d: %s\n", rc, asn1_strerror (rc)); + + FOR_MODULES (header) + { +struct grub_file pseudo_file; +struct x509_certificate *pk =

Re: [PATCH v1 21/21] appendedsig: documentation

2025-02-07 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: This explains how static and dynamic key appended signatures can be used to form part of a secure boot chain, and documents the commands and variables introduced. Signed-off-by: Sudhakar Kuppusamy --- docs/grub.texi

Re: [PATCH v1 20/21] appendedsig: The grub command's trusted and distrusted support

2025-02-07 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: To support the following trusted and distrusted commands 1. trusted_list: It will show the list of trusted certificates and binary hashes 2. distrusted_list: It will show the list of distrusted

Re: [PATCH v1 03/21] docs/grub: Document signing grub with an appended signature

2025-01-24 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Daniel Axtens Signing grub for firmware that verifies an appended signature is a bit fiddly. I don't want people to have to figure it out from scratch so document it here. Signed-off-by: Daniel Axtens S

Re: [PATCH v1 05/21] pgp: factor out rsa_pad

2025-01-24 Thread Avnish Chouhan
Indentation looks off in couple of places. Please fix it. Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Daniel Axtens rsa_pad does the PKCS#1 v1.5 padding for the RSA signature scheme. We want to use it in other RSA signature verification applications. I

Re: [PATCH v1 06/21] crypto: move storage for grub_crypto_pk_* to crypto.c

2025-01-24 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Daniel Axtens The way gcry_rsa and friends (the asymmetric ciphers) are loaded for the pgp module is a bit quirky. include/grub/crypto.h contains: extern struct gcry_pk_spec *grub_crypto_pk_rsa; commands

Re: [PATCH v1 09/21] appended signatures: parse PKCS#7 signedData and X.509 certificates

2025-01-24 Thread Avnish Chouhan
Suggestion : It will be good if we can remove the brackets in one liner if conditions and loops! Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Daniel Axtens This code allows us to parse: - PKCS#7 signedData messages. Only a single signerInfo is

Re: [PATCH v1 04/21] dl: provide a fake grub_dl_set_persistent for the emu target

2025-01-24 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Daniel Axtens Trying to start grub-emu with a module that calls grub_dl_set_persistent will crash because grub-emu fakes modules and passes NULL to the module init function. Provide an empty function for the

Re: [PATCH v1 07/21] grub-install: support embedding x509 certificates

2025-01-24 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Alastair D'Silva To support verification of appended signatures, we need a way to embed the necessary public keys. Existing appended signature schemes in the Linux kernel use X.509 certificates, so

Re: [PATCH v1 08/21] appended signatures: import GNUTLS's ASN.1 description files

2025-01-24 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Daniel Axtens In order to parse PKCS#7 messages and X.509 certificates with libtasn1, we need some information about how they are encoded. We get these from GNUTLS, which has the benefit that they support the

[PATCH] powerpc: increase MIN RMA size for CAS negotiation

2025-01-15 Thread Avnish Chouhan
with 3. kern/file.c:148: Opening `/ppc/ppc64/initrd.img' succeeded. error: ../../grub-core/kern/mm.c:552:out of memory. Signed-off-by: Avnish Chouhan --- grub-core/kern/ieee1275/init.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git

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

2025-02-12 Thread Avnish Chouhan
Hi Michael, Thank you so much for a review! I'll add the failure checks in the code mentioned by you. On build issue. I haven't observed any of these errors on my machine. Today, I built the latest upstream grub with this patch on my machine and no errors are observed. Regar

Re: [PATCH v1 11/21] appended signatures: verification tests

2025-02-14 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Daniel Axtens These tests are run through all_functional_test and test a range of commands and behaviours. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar Kuppusamy --- grub-core/Makefile.core.def

Re: [PATCH v1 12/21] appended signatures: documentation

2025-02-14 Thread Avnish Chouhan
Reviewed-by: Avnish Chouhan  On 2024-12-18 20:26, Sudhakar Kuppusamy wrote: From: Daniel Axtens This explains how appended signatures can be used to form part of a secure boot chain, and documents the commands and variables introduced. Signed-off-by: Daniel Axtens Signed-off-by: Sudhakar

[PATCH v2] powerpc: increase MIN RMA size for CAS negotiation

2025-03-03 Thread Avnish Chouhan
trd.img' failed with 3. kern/file.c:148: Opening `/ppc/ppc64/initrd.img' succeeded. error: ../../grub-core/kern/mm.c:552:out of memory. Signed-off-by: Avnish Chouhan --- grub-core/kern/ieee1275/init.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-

Re: [PATCH v2] powerpc: increase MIN RMA size for CAS negotiation

2025-03-07 Thread Avnish Chouhan
h you earlier by IBM folks. Please let me know if you have more questions on this. Thank you! Regards, Avnish Chouhan On 2025-03-04 20:39, Daniel Kiper wrote: On Mon, Mar 03, 2025 at 10:19:22PM +0530, Avnish Chouhan wrote: Change RMA size from 512 MB to 768 MB which will result in more me

Re: [PATCH v2] powerpc: increase MIN RMA size for CAS negotiation

2025-03-11 Thread Avnish Chouhan
oot, the machine will boot with the last booted kernel having MIN_RMA as 512 MB. We will not see an option to choose which kernel a user like to boot to. * _ Please let me know if you feel I need to change or add any content in my "comment" in the patch. I have

Re: [PATCH v3] powerpc: increase MIN RMA size for CAS negotiation

2025-03-13 Thread Avnish Chouhan
On 2025-03-13 00:28, Daniel Kiper wrote: On Wed, Mar 12, 2025 at 10:06:15PM +0530, Avnish Chouhan wrote: Change RMA size from 512 MB to 768 MB which will result in more memory at boot time for PowerPC. When vTPM, Secure Boot or FADump are enabled on PowerPC, the 512 MB RMA memory is not

[PATCH v4] powerpc: increase MIN RMA size for CAS negotiation

2025-03-13 Thread Avnish Chouhan
trd.img' failed with 3. kern/file.c:148: Opening `/ppc/ppc64/initrd.img' succeeded. error: ../../grub-core/kern/mm.c:552:out of memory. Signed-off-by: Avnish Chouhan --- grub-core/kern/ieee1275/init.c | 51 ++- 1 file changed, 46 i

[PATCH v3] powerpc: increase MIN RMA size for CAS negotiation

2025-03-12 Thread Avnish Chouhan
trd.img' failed with 3. kern/file.c:148: Opening `/ppc/ppc64/initrd.img' succeeded. error: ../../grub-core/kern/mm.c:552:out of memory. Signed-off-by: Avnish Chouhan --- grub-core/kern/ieee1275/init.c | 44 1 file changed, 40 insertions

Re: [PATCH v2] powerpc: increase MIN RMA size for CAS negotiation

2025-03-12 Thread Avnish Chouhan
Thank you Daniel! As suggested, I will rephrase the comment and re submit the patch! On 2025-03-11 19:14, Daniel Kiper wrote: On Tue, Mar 11, 2025 at 02:59:35PM +0530, Avnish Chouhan wrote: Hi Daniel, Thank you for your response! -- Condition before the patch: if (err