Re: [PATCH 8/9] efi: Only register shim_lock verifier if shim_lock protocol is found and SB enabled

2020-12-07 Thread Michael Chang via Grub-devel
On Thu, Dec 03, 2020 at 04:01:49PM +0100, Javier Martinez Canillas wrote: > The shim_lock module registers a verifier to call shim's verify, but the > handler is registered even when the shim_lock protocol was not installed. > > This doesn't cause a NULL pointer dereference in shim_lock_write() be

Re: [PATCHv2] grub-install: Add backup and restore

2020-12-07 Thread Michael Chang via Grub-devel
On Mon, Dec 07, 2020 at 12:37:28PM +, Dimitri John Ledkov wrote: > Refactor clean_grub_dir to create a backup of all the files, instead > of just irrevocably removing them as the first action. If available, > register on_exit handle to restore the backup if any errors occur, or > remove the bac

Re: [PATCHv2] grub-install: Add backup and restore

2020-12-08 Thread Michael Chang via Grub-devel
On Tue, Dec 08, 2020 at 05:58:40AM +, Dimitri John Ledkov wrote: > On Tue, 8 Dec 2020, 03:17 Michael Chang, wrote: > > > On Mon, Dec 07, 2020 at 12:37:28PM +, Dimitri John Ledkov wrote: > > > Refactor clean_grub_dir to create a backup of all the files, instead > > > of just irrevocably re

Re: [PATCH 8/9] efi: Only register shim_lock verifier if shim_lock protocol is found and SB enabled

2020-12-14 Thread Michael Chang via Grub-devel
On Thu, Dec 10, 2020 at 05:50:53PM +0100, Daniel Kiper wrote: > On Tue, Dec 08, 2020 at 10:20:03AM +0800, Michael Chang via Grub-devel wrote: > > On Thu, Dec 03, 2020 at 04:01:49PM +0100, Javier Martinez Canillas wrote: > > > The shim_lock module registers a verifier to call shim

[PATCH] emu: fix executable stack marking

2021-02-03 Thread Michael Chang via Grub-devel
The gcc by default assumes executable stack is required if the source object file doesn't have .note.GNU-stack section in place. If any of the source objects doesn't incorporate the GNU-stack note, the resulting program will have executable stack flag set in PT_GNU_STACK program header to instruct

Re: [PATCH] emu: fix executable stack marking

2021-02-04 Thread Michael Chang via Grub-devel
On Thu, Feb 04, 2021 at 04:28:10PM -0600, Glenn Washburn wrote: > Hi Michael, > > On Wed, 3 Feb 2021 21:03:44 +0800 > Michael Chang via Grub-devel wrote: > > > The gcc by default assumes executable stack is required if the source > > object file doesn't have

[PATCH] Add chainloaded image as shim's verifiable object

2021-03-05 Thread Michael Chang via Grub-devel
While attempting to dual boot Microsoft Windows with efi chainloader, it failed with below error when secure boot was enabled. error ../../grub-core/kern/verifiers.c:119:verification requested but nobody cares: /EFI/Microsoft/Boot/bootmgfw.efi. It is a regression, as previously it worked without

Re: [PATCH] Add chainloaded image as shim's verifiable object

2021-03-05 Thread Michael Chang via Grub-devel
On Fri, Mar 05, 2021 at 01:32:57PM +0100, Thomas Frauendorfer wrote: > On Fri, Mar 5, 2021 at 1:12 PM Michael Chang via Grub-devel > wrote: > > > > While attempting to dual boot Microsoft Windows with efi chainloader, it > > failed with below error when secure boot wa

Re: [PATCH] Add chainloaded image as shim's verifiable object

2021-03-05 Thread Michael Chang via Grub-devel
is intended to continue to allow "boot windows" as the menu > entry in grub. So what is recommended solution in the interim ? We just can't afford to release new grub version that cannot do the chainload ... Thanks, Michael > > On Fri, Mar 5, 2021 at 12:12 PM Michael C

[PATCH v2] Add chainloaded image as shim's verifiable object

2021-03-05 Thread Michael Chang via Grub-devel
While attempting to dual boot Microsoft Windows with efi chainloader, it failed with below error when secure boot was enabled. error ../../grub-core/kern/verifiers.c:119:verification requested but nobody cares: /EFI/Microsoft/Boot/bootmgfw.efi. It is a regression, as previously it worked without

Re: [PATCH] Add chainloaded image as shim's verifiable object

2021-03-07 Thread Michael Chang via Grub-devel
; > > > > And yes it is intended to continue to allow "boot windows" as the menu > > > entry in grub. > > > > So what is recommended solution in the interim ? We just can't afford > > to release new grub version that cannot do the chainload .

Re: [PATCH] Add chainloaded image as shim's verifiable object

2021-03-09 Thread Michael Chang via Grub-devel
On Tue, Mar 09, 2021 at 07:45:55PM +0100, Thomas Frauendorfer wrote: > On Mon, Mar 8, 2021 at 5:59 AM Michael Chang via Grub-devel > wrote: > > > > On Fri, Mar 05, 2021 at 01:49:00PM +, Dimitri John Ledkov wrote: > > > On Fri, Mar 5, 2021 at 1:34 PM Michael Chang

Re: [PATCH v2] Add chainloaded image as shim's verifiable object

2021-03-09 Thread Michael Chang via Grub-devel
On Tue, Mar 09, 2021 at 05:18:22PM +0100, Daniel Kiper wrote: > On Fri, Mar 05, 2021 at 09:48:53PM +0800, Michael Chang via Grub-devel wrote: > > While attempting to dual boot Microsoft Windows with efi chainloader, it > > failed with below error when secure boot was enabled

Re: IS: 2.06-rc1 cut... WAS: Re: [PATCH v2] Add chainloaded image as shim's verifiable object

2021-03-10 Thread Michael Chang via Grub-devel
On Wed, Mar 10, 2021 at 05:06:31PM +0100, Daniel Kiper wrote: > On Wed, Mar 10, 2021 at 11:56:47AM +0800, Michael Chang via Grub-devel wrote: > > On Tue, Mar 09, 2021 at 05:18:22PM +0100, Daniel Kiper wrote: > > > On Fri, Mar 05, 2021 at 09:48:53PM +0800, Michael Chang via Grub-

Re: [SECURITY PATCH 001/117] verifiers: Move verifiers API to kernel image

2021-03-18 Thread Michael Chang via Grub-devel
On Thu, Mar 18, 2021 at 01:22:19AM +, Colin Watson wrote: > On Tue, Mar 02, 2021 at 07:00:08PM +0100, Daniel Kiper wrote: [snip] > I believe the practical threshold is 62 512-byte sectors, i.e. 31744 > bytes. > > As you can see, the biggest single change was induced by this patch, > which mo

[PATCH] i386-pc: build verifiers API as module

2021-03-18 Thread Michael Chang via Grub-devel
Given no core functions on i386-pc would require verifiers to work and the only consumer of the verifier API is the pgp module, it looks good to me that we can move the verifiers out of the kernel image and let moddep.lst to auto-load it when pgp is loaded on i386-pc platform. This helps to reduce

Re: [PATCH] i386-pc: build verifiers API as module

2021-03-18 Thread Michael Chang via Grub-devel
On Thu, Mar 18, 2021 at 09:23:40AM +, Colin Watson wrote: > On Thu, Mar 18, 2021 at 03:14:34PM +0800, Michael Chang via Grub-devel wrote: > > Given no core functions on i386-pc would require verifiers to work and > > the only consumer of the verifier API is the pgp module, it lo

[PATCH v2] i386-pc: build verifiers API as module

2021-03-18 Thread Michael Chang via Grub-devel
Given no core functions on i386-pc would require verifiers to work and the only consumer of the verifier API is the pgp module, it looks good to me that we can move the verifiers out of the kernel image and let moddep.lst to auto-load it when pgp is loaded on i386-pc platform. This helps to reduce

Re: [PATCH v2] i386-pc: build verifiers API as module

2021-03-22 Thread Michael Chang via Grub-devel
On Mon, Mar 22, 2021 at 04:20:00PM +0100, Daniel Kiper wrote: > On Thu, Mar 18, 2021 at 07:30:26PM +0800, Michael Chang via Grub-devel wrote: [snip] > NAK for this patch and others "fixing" small MBR gaps. I am not going to > deal with this kind of issues any longer because

Re: [PATCH v2] i386-pc: build verifiers API as module

2021-03-23 Thread Michael Chang via Grub-devel
On Tue, Mar 23, 2021 at 05:48:01PM +0100, Daniel Kiper wrote: > On Tue, Mar 23, 2021 at 12:16:21PM +0800, Michael Chang via Grub-devel wrote: > > On Mon, Mar 22, 2021 at 04:20:00PM +0100, Daniel Kiper wrote: > > > On Thu, Mar 18, 2021 at 07:30:26PM +0800, Michael Chang via Grub-

Re: [PATCH v2] i386-pc: build verifiers API as module

2021-03-23 Thread Michael Chang via Grub-devel
On Tue, Mar 23, 2021 at 05:33:12PM +0100, Daniel Kiper wrote: > On Mon, Mar 22, 2021 at 08:45:27PM +, Colin Watson wrote: [snip] > > rounds of security megapatches we've also seen that the amount of > > divergence between upstream and various distributions in > > security-critical code is in

Re: [PATCH v2] i386-pc: build verifiers API as module

2021-04-12 Thread Michael Chang via Grub-devel
On Mon, Apr 12, 2021 at 03:15:53PM +0200, Daniel Kiper wrote: > On Fri, Mar 26, 2021 at 06:01:01PM +0100, Daniel Kiper wrote: > > On Wed, Mar 24, 2021 at 12:44:52PM +0800, Michael Chang via Grub-devel > > wrote: > > > On Tue, Mar 23, 2021 at 05:33:12PM +0100, Daniel Kip

Re: [PATCH v2] i386-pc: build verifiers API as module

2021-04-19 Thread Michael Chang via Grub-devel
On Wed, Apr 14, 2021 at 03:22:35PM +0200, Daniel Kiper wrote: > On Tue, Apr 13, 2021 at 12:13:02PM +0800, Michael Chang via Grub-devel wrote: > > On Mon, Apr 12, 2021 at 03:15:53PM +0200, Daniel Kiper wrote: > > > On Fri, Mar 26, 2021 at 06:01:01PM +0100, Daniel Kiper wrote: >

Re: [PATCH] grub-install: Add backup and restore

2021-05-02 Thread Michael Chang via Grub-devel
On Thu, Apr 29, 2021 at 12:36:37PM +0100, Dimitri John Ledkov wrote: > Refactor clean_grub_dir to create a backup of all the files, instead > of just irrevocably removing them as the first action. If available, > register atexit handle to restore the backup if errors occur before > point of no retu

Re: RFC: A partition for grubenv, etc.

2021-05-26 Thread Michael Chang via Grub-devel
On Tue, May 25, 2021 at 04:58:23PM -0600, Chris Murphy wrote: > Hi, > > It's not possible for GRUB pre-boot environment to write to grubenv > when it's on Btrfs, ZFS, LVM, mdadm raid, or LUKS. Also, at least XFS > upstream is super skeptical of anything except kernel code making any > kind of modi

Re: RFC: A partition for grubenv, etc.

2021-05-27 Thread Michael Chang via Grub-devel
On Wed, May 26, 2021 at 08:36:05PM -0600, Chris Murphy wrote: > On Wed, May 26, 2021 at 3:17 AM Michael Chang via Grub-devel > wrote: > > > > On Tue, May 25, 2021 at 04:58:23PM -0600, Chris Murphy wrote: > > > Hi, > > > > > > It's not possible

Re: RFC: A partition for grubenv, etc.

2021-05-27 Thread Michael Chang via Grub-devel
On Thu, May 27, 2021 at 03:49:14PM -0300, Luiz Angelo Daros de Luca wrote: > This was already discussed in this ML a couple of times. > > It is not uncommon for some FS to have an unused header space. This > happens for btrfs and SUSE patches grub2 to use it: > https://build.opensuse.org/package/v

Re: UEFI Secureboot not succeeding with Grub 2.06 and later version

2021-07-08 Thread Michael Chang via Grub-devel
Hi Dimitri, On Thu, Jul 08, 2021 at 11:51:25AM +0100, Dimitri John Ledkov wrote: > Hi, > > The below mentioned commands are useful. Hence we need to debug this > further and establish further details about your setup. I think the problem here is that arm64 already uses LoadImage to verify the ke

Re: UEFI Secureboot not succeeding with Grub 2.06 and later version

2021-07-08 Thread Michael Chang via Grub-devel
On Thu, Jul 08, 2021 at 01:18:34PM +0100, Dimitri John Ledkov wrote: > On Thu, 8 Jul 2021, 13:05 Michael Chang via Grub-devel, > wrote: > > > Hi Dimitri, > > > > On Thu, Jul 08, 2021 at 11:51:25AM +0100, Dimitri John Ledkov wrote: > > > Hi, > > >

Re: UEFI Secureboot not succeeding with Grub 2.06 and later version

2021-07-08 Thread Michael Chang via Grub-devel
On Thu, Jul 08, 2021 at 03:31:15PM +0200, Daniel Kiper wrote: > On Thu, Jul 08, 2021 at 08:01:31PM +0800, Michael Chang via Grub-devel wrote: > > Hi Dimitri, > > > > On Thu, Jul 08, 2021 at 11:51:25AM +0100, Dimitri John Ledkov wrote: > > > Hi, > > > > &

Re: [PATCH 2/2] grub2: use stat instead of udevadm for partition lookup

2021-07-13 Thread Michael Chang via Grub-devel
On Tue, Jul 13, 2021 at 11:25:49AM +0200, Paul Menzel wrote: > Dear Petr, dear Jeff, > > > Am 08.07.21 um 17:55 schrieb Petr Vorel: > > From: Jeff Mahoney > > > > sysfs_partition_path calls udevadm to resolve the sysfs path for > > a block device. That can be accomplished by stating the device

Re: [PATCH 2/2] grub2: use stat instead of udevadm for partition lookup

2021-07-13 Thread Michael Chang via Grub-devel
On Tue, Jul 13, 2021 at 12:52:12PM +0200, Petr Vorel wrote: > Hi Paul, > > > Dear Petr, dear Jeff, > > > > Am 08.07.21 um 17:55 schrieb Petr Vorel: > > > From: Jeff Mahoney > > > > sysfs_partition_path calls udevadm to resolve the sysfs path for > > > a block device. That can be accomplished b

[PATCH] diskfilter: use nodes in logical volume's segment as member device

2021-08-02 Thread Michael Chang via Grub-devel
Currently the grub_diskfilter_memberlist function returns all physical volumes added to a volume group to which a logical volume (LV) belongs. However this is suboptimal as it doesn't fit the intended behavior of returning underlying devices that make up the LV. To give a clear picture, the result

[PATCH] emu: fix executable stack marking

2021-08-02 Thread Michael Chang via Grub-devel
The gcc by default assumes executable stack is required if the source object file doesn't have .note.GNU-stack section in place. If any of the source objects doesn't incorporate the GNU-stack note, the resulting program will have executable stack flag set in PT_GNU_STACK program header to instruct

[PATCH] Fix build error in binutils 2.36

2021-08-02 Thread Michael Chang via Grub-devel
The xen build fails on binutils 2.36 with the following error. /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: section .note.gnu.property VMA [00400158,00400187] overlaps section .bss VMA [f000,0041e1af] The most significant factor is

Re: [PATCH 3/4] luks2: set up dummy sector size during scan

2021-08-05 Thread Michael Chang via Grub-devel
Hi, Enclosed herewith please find the revised patch from openSUSE that could also fix this very same problem. According to Fabian, the author of this patch, the reason for having this patch is that he found some problem in the posted one. I have added him to the CC list so that he could provide m

Re: [PATCH] Fix build error in binutils 2.36

2021-08-08 Thread Michael Chang via Grub-devel
On Thu, Aug 05, 2021 at 03:07:21PM +0200, Daniel Kiper wrote: > On Mon, Aug 02, 2021 at 05:41:15PM +0800, Michael Chang via Grub-devel wrote: > > The xen build fails on binutils 2.36 with the following error. > > > > /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86

Re: [PATCH] emu: fix executable stack marking

2021-08-08 Thread Michael Chang via Grub-devel
On Thu, Aug 05, 2021 at 05:05:05PM +0200, Daniel Kiper wrote: > On Mon, Aug 02, 2021 at 05:40:57PM +0800, Michael Chang via Grub-devel wrote: > > The gcc by default assumes executable stack is required if the source > > object file doesn't have .note.GNU-stack section in

Re: [PATCH] diskfilter: use nodes in logical volume's segment as member device

2021-08-10 Thread Michael Chang via Grub-devel
On Mon, Aug 09, 2021 at 05:34:41PM +0200, Daniel Kiper wrote: > On Mon, Aug 02, 2021 at 05:40:20PM +0800, Michael Chang via Grub-devel wrote: > > Currently the grub_diskfilter_memberlist function returns all physical > > volumes added to a volume group to which a logical volu

[PATCH] i386-pc: build btrfs zstd support into separate module

2021-08-31 Thread Michael Chang via Grub-devel
The zstd support in btrfs brings significant size increment to the on-disk image that it can no longer fit into btrfs bootloader area and short mbr gap. In order to support grub update on outstanding i386-pc setup with these size constraints remain in place, here we build the zstd suppprt of btrfs

Re: [PATCH] i386-pc: build btrfs zstd support into separate module

2021-09-01 Thread Michael Chang via Grub-devel
On Wed, Sep 01, 2021 at 06:38:22PM +0200, Daniel Kiper wrote: > On Tue, Aug 31, 2021 at 03:12:28PM +0800, Michael Chang via Grub-devel wrote: > > The zstd support in btrfs brings significant size increment to the > > on-disk image that it can no longer fit into btrfs bootloader are

Re: [PATCH] i386-pc: build btrfs zstd support into separate module

2021-09-02 Thread Michael Chang via Grub-devel
On Thu, Sep 02, 2021 at 02:12:52PM +0200, Daniel Kiper wrote: > On Thu, Sep 02, 2021 at 01:48:30PM +0800, Michael Chang via Grub-devel wrote: > > On Wed, Sep 01, 2021 at 06:38:22PM +0200, Daniel Kiper wrote: > > > On Tue, Aug 31, 2021 at 03:12:28PM +0800, Michael Chang via Grub-

Re: [PATCH v2] kern/efi: Adding efi-watchdog command

2021-09-02 Thread Michael Chang via Grub-devel
On Thu, Sep 02, 2021 at 06:50:35PM +0200, Erwan Velu wrote: > This patch got written by Arthur Mesh from Juniper (now at Apple Sec team). > It was extracted from > https://lists.gnu.org/archive/html/grub-devel/2015-09/msg00065.html > > Since this email, the this patch was : > - rebased against th

[PATCH v2] diskfilter: use nodes in logical volume's segment as member device

2021-09-09 Thread Michael Chang via Grub-devel
Currently the grub_diskfilter_memberlist function returns all physical volumes added to a volume group to which a logical volume (LV) belongs. However this is suboptimal as it doesn't fit the intended behavior of returning underlying devices that make up the LV. To give a clear picture, the result

Re: [PATCH] i386-pc: build btrfs zstd support into separate module

2021-09-10 Thread Michael Chang via Grub-devel
On Wed, Sep 08, 2021 at 09:37:52PM +0200, Daniel Kiper wrote: > On Fri, Sep 03, 2021 at 09:21:39AM +0800, Michael Chang via Grub-devel wrote: > > On Thu, Sep 02, 2021 at 02:12:52PM +0200, Daniel Kiper wrote: > > > On Thu, Sep 02, 2021 at 01:48:30PM +0800, Michael Chang via Grub-

Re: [PATCH] Fix build error in binutils 2.36

2021-09-15 Thread Michael Chang via Grub-devel
On Tue, Sep 14, 2021 at 10:13:36AM -0400, Mike Gilbert wrote: > On Mon, Aug 9, 2021 at 12:37 AM Michael Chang via Grub-devel > wrote: [snip] > Just wondering if there has been any progress on this issue. > > A few people have commented on the related bug [1] for Gentoo Linux

Re: [PATCH v2] diskfilter: use nodes in logical volume's segment as member device

2021-09-17 Thread Michael Chang via Grub-devel
On Wed, Sep 15, 2021 at 06:00:09PM +0200, Daniel Kiper wrote: > On Thu, Sep 09, 2021 at 09:02:29PM +0800, Michael Chang via Grub-devel wrote: > > Currently the grub_diskfilter_memberlist function returns all physical > > volumes added to a volume group to which a logical volu

Re: [PATCH] Fix build error in binutils 2.36

2021-09-17 Thread Michael Chang via Grub-devel
On Thu, Sep 16, 2021 at 11:47:57PM +0200, Daniel Kiper wrote: > On Mon, Aug 09, 2021 at 12:37:59PM +0800, Michael Chang via Grub-devel wrote: > > On Thu, Aug 05, 2021 at 03:07:21PM +0200, Daniel Kiper wrote: > > > On Mon, Aug 02, 2021 at 05:41:15PM +0800, Michael Chang via Grub-

[PATCH v3] diskfilter: use nodes in logical volume's segment as member device

2021-09-27 Thread Michael Chang via Grub-devel
Currently the grub_diskfilter_memberlist function returns all physical volumes added to a volume group to which a logical volume (LV) belongs. However this is suboptimal as it doesn't fit the intended behavior of returning underlying devices that make up the LV. To give a clear picture, the result

[PATCH v2] Fix build error in binutils 2.36

2021-09-27 Thread Michael Chang via Grub-devel
The following procedure to build xen/pvgrub is broken. git clone https://git.savannah.gnu.org/git/grub.git cd grub ./bootstrap mkdir build-xen cd build-xen ../configure --with-platform=xen make It fails with the message: /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse

Re: [PATCH v2] Fix build error in binutils 2.36

2021-09-27 Thread Michael Chang via Grub-devel
On Mon, Sep 27, 2021 at 10:18:49AM -0400, Mike Gilbert wrote: > On Mon, Sep 27, 2021 at 5:41 AM Michael Chang via Grub-devel > wrote: > > It is also worth mentioning that binutils upstream apparently doesn't > > seem to consider this as a bug [2] and proposed to use &

[PATCH v3] Fix build error in binutils 2.36

2021-09-27 Thread Michael Chang via Grub-devel
The following procedure to build xen/pvgrub is broken. git clone https://git.savannah.gnu.org/git/grub.git cd grub ./bootstrap mkdir build-xen cd build-xen ../configure --with-platform=xen make It fails with the message: /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse

[PATCH] Filter out POSIX locale for translation

2021-10-26 Thread Michael Chang via Grub-devel
The POSIX locale is default or native operating system's locale identical to the C locale, so no translation to human speaking languages provided. For this reason we should filter out LANG=POSIX as well as LANG=C upon generating grub.cfg to avoid looking up for it's gettext's message catalogs that

Re: [PATCH] i386-pc: build btrfs zstd support into separate module

2021-10-26 Thread Michael Chang via Grub-devel
On Tue, Oct 26, 2021 at 02:55:21PM +0200, Daniel Kiper wrote: > On Fri, Sep 10, 2021 at 05:22:22PM +0800, Michael Chang via Grub-devel wrote: > > On Wed, Sep 08, 2021 at 09:37:52PM +0200, Daniel Kiper wrote: > > > On Fri, Sep 03, 2021 at 09:21:39AM +0800, Michael Chang via Grub-

Re: [PATCH] fs/btrfs: Make extent item iteration to handle gaps

2021-10-28 Thread Michael Chang via Grub-devel
On Thu, Oct 28, 2021 at 03:36:10PM +0800, The development of GNU GRUB wrote: > Gentle ping? > > Without this patch, the new mkfs.btrfs NO_HOLES feature would break any > kernel/initramfs with hole in it. > > And considering the modification is already small, I believe this patch is > definitely w

[PATCH] Use full btrfs bootloader area

2021-11-02 Thread Michael Chang via Grub-devel
Up to now grub can only embed to the first 64 KiB before primary superblock of btrfs, effectively limiting the size that could consequently pose restrictions to feature enablement like advancing zstd compression. This patch attempts to utilize full unused area reserved by btrfs for bootloader outl

Re: [PATCH 0/2] ieee1275/powerpc: implement ofpath to enable hint feature for FC and dm devices

2021-11-16 Thread Michael Chang via Grub-devel
On Tue, Nov 16, 2021 at 08:29:49AM +0100, Javier Martinez Canillas wrote: > Hello Diego, > > On 11/20/20 19:43, Diego Domingos wrote: > > The grub-ofpathname and hint feature for ieee1275 are not working since > > there is no code implemented to get the information needed about fibre > > channel

Re: [PATCH 2/2] ieee1275: set real-base in the PowerPC IEEE1275 Note to 32MB

2021-11-16 Thread Michael Chang via Grub-devel
On Tue, Nov 16, 2021 at 02:42:05PM +1100, Daniel Axtens wrote: > Background > -- > > Figuring out how to lay out memory in powerpc OpenFirmware is a bit > of a complicate dance. > > Firstly, firmware needs to reserve a little bit of space for things > like interrupt vectors that live at a

Re: [PATCH] Use full btrfs bootloader area

2021-12-02 Thread Michael Chang via Grub-devel
On Wed, Dec 01, 2021 at 05:16:56PM +0100, Daniel Kiper wrote: > On Tue, Nov 02, 2021 at 04:11:06PM +0800, Michael Chang via Grub-devel wrote: > > Up to now grub can only embed to the first 64 KiB before primary > > s/grub/GRUB/ > > > superblock of btrfs, effectively limi

[PATCH] grub-mkconfig: restore umask for grub.cfg

2021-12-03 Thread Michael Chang via Grub-devel
Since commit: ab2e53c8a grub-mkconfig: Honor a symlink when generating configuration by grub-mkconfig has inadvertently discarded umask for creating grub.cfg in the process of grub-mkconfig. The resulting wrong permission (0644) would allow unprivileged users to read grub's configuration file c

[PATCH v2] Use full btrfs bootloader area

2021-12-12 Thread Michael Chang via Grub-devel
Up to now GRUB can only embed to the first 64 KiB before primary superblock of btrfs, effectively limiting the size that could consequently pose restrictions to feature enablement like advanced zstd compression. This patch attempts to utilize full unused area reserved by btrfs for bootloader outli

Re: [PATCH 3/6] commands/i386/pc/sendkey: Fix "writing 1 byte into a region of size 0" build error

2022-03-13 Thread Michael Chang via Grub-devel
On Fri, Mar 11, 2022 at 12:35:57AM +0100, Daniel Kiper wrote: > Latest GCC may complain in that way: > > commands/i386/pc/sendkey.c: In function ‘grub_sendkey_postboot’: > commands/i386/pc/sendkey.c:223:21: error: writing 1 byte into a region of > size 0 [-Werror=stringop-overflow=] > 223

[PATCH 0/3] Fix GCC 12 build error

2022-03-16 Thread Michael Chang via Grub-devel
The tested gcc version is: abuild@mazu:~> gcc --version gcc (SUSE Linux) 12.0.1 20220307 (experimental) [revision 40c1d4a07e5798c01e4364336c9617550744861d] Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; n

[PATCH 1/3] mkimage: Fix dangling pointer may be used error

2022-03-16 Thread Michael Chang via Grub-devel
The warning is real as long as dangling pointer to 'tmp_' may be used if o32 and o64 are both null. However that is not going to happen and can be ignored safely because the PE_OHDR is being used in a context that either o32 or o64 must have been properly initialized. Sadly compiler seems not to al

[PATCH 2/3] Fix -Werror=array-bounds array subscript 0 is outside array bounds

2022-03-16 Thread Michael Chang via Grub-devel
The grub is failing to build with gcc-12 in many places like this: In function 'init_cbfsdisk', inlined from 'grub_mod_init' at ../../grub-core/fs/cbfs.c:391:3: ../../grub-core/fs/cbfs.c:345:7: error: array subscript 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]'} [-Wer

[PATCH 3/3] reed_solomon: Fix array subscript 0 is outside array bounds

2022-03-16 Thread Michael Chang via Grub-devel
The grub_absolute_pointer() is a compound expression that can only work within a function. We are out of luck here when the pointer variables require global definition due to ATTRIBUTE_TEXT that have to use fully initialized global definition because of the way linkers work. static gf_single_t *

Re: [PATCH 3/3] reed_solomon: Fix array subscript 0 is outside array bounds

2022-03-17 Thread Michael Chang via Grub-devel
On Thu, Mar 17, 2022 at 08:41:32AM +0100, Paul Menzel wrote: > Dear Michael, > > > Thank you for working on that. > > > Am 17.03.22 um 07:43 schrieb Michael Chang via Grub-devel: > > The grub_absolute_pointer() is a compound expression that can only work > >

Re: [PATCH v2 3/5] protectors: Add TPM2 Key Protector

2022-03-21 Thread Michael Chang via Grub-devel
On Tue, Feb 01, 2022 at 05:02:55AM -0800, Hernan Gatta wrote: > The TPM2 key protector is a module that enables the automatic retrieval of a > fully-encrypted disk's unlocking key from a TPM 2.0. > > The theory of operation is such that the module accepts various arguments, > most > of which are

Re: [PATCH v2 3/5] protectors: Add TPM2 Key Protector

2022-03-21 Thread Michael Chang via Grub-devel
On Tue, Feb 01, 2022 at 05:02:55AM -0800, Hernan Gatta wrote: Sorry forgot to mention another build related issue in previous reply. > +static grub_err_t > +grub_tpm2_protector_srk_unmarshal_keyfile (void *sealed_key, > + grub_size_t sealed_key_size, > +

Re: [PATCH v2 5/5] util/grub-protect: Add new tool

2022-03-21 Thread Michael Chang via Grub-devel
On Tue, Feb 01, 2022 at 05:02:57AM -0800, Hernan Gatta wrote: [snip] > +static grub_err_t > +grub_protect_tpm2_get_policy_digest (struct grub_protect_args *args, > + TPM2B_DIGEST *digest) > +{ [snip] > + for (i = 0; i < args->tpm2_pcr_count; i++) > +{ >

Re: [PATCH 2/3] Fix -Werror=array-bounds array subscript 0 is outside array bounds

2022-03-22 Thread Michael Chang via Grub-devel
On Tue, Mar 22, 2022 at 10:19:26PM +0100, Daniel Kiper wrote: > On Thu, Mar 17, 2022 at 02:43:41PM +0800, Michael Chang via Grub-devel wrote: > > The grub is failing to build with gcc-12 in many places like this: > > > > In function 'init_cbfsdisk', > >

[PATCH v2 1/3] mkimage: Fix dangling pointer may be used error

2022-03-28 Thread Michael Chang via Grub-devel
The warning is real as long as dangling pointer to 'tmp_' may be used if o32 and o64 are both null. However that is not going to happen and can be ignored safely because the PE_OHDR is being used in a context that either o32 or o64 must have been properly initialized. Sadly compiler seems not to al

[PATCH v2 3/3] reed_solomon: Fix array subscript 0 is outside array bounds

2022-03-28 Thread Michael Chang via Grub-devel
The grub_absolute_pointer() is a compound expression that can only work within a function. We are out of luck here when the pointer variables require global definition due to ATTRIBUTE_TEXT that have to use fully initialized global definition because of the way linkers work. static gf_single_t *

[PATCH v2 0/3] Fix GCC 12 build error

2022-03-28 Thread Michael Chang via Grub-devel
The tested gcc version is: abuild@mazu:~> gcc --version gcc (SUSE Linux) 12.0.1 20220307 (experimental) [revision 40c1d4a07e5798c01e4364336c9617550744861d] Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; n

[PATCH v2 2/3] Fix -Werror=array-bounds array subscript 0 is outside array bounds

2022-03-28 Thread Michael Chang via Grub-devel
The grub is failing to build with gcc-12 in many places like this: In function 'init_cbfsdisk', inlined from 'grub_mod_init' at ../../grub-core/fs/cbfs.c:391:3: ../../grub-core/fs/cbfs.c:345:7: error: array subscript 0 is outside array bounds of 'grub_uint32_t[0]' {aka 'unsigned int[]'} [-Wer

Re: [PATCH v3 15/19] appended signatures: parse PKCS#7 signedData and X.509 certificates

2022-04-21 Thread Michael Chang via Grub-devel
On Thu, Apr 21, 2022 at 09:32:41PM +1000, Daniel Axtens wrote: > Hi, > > >> This code allows us to parse: > >> > >> - PKCS#7 signedData messages. Only a single signerInfo is supported, > >>which is all that the Linux sign-file utility supports creating > >>out-of-the-box. Only RSA, SHA-2

Re: [RFC PATCH v3 5/5] Cleanup: grub-mkconfig_lib: remove unused version comparison functions

2022-05-26 Thread Michael Chang via Grub-devel
On Thu, May 26, 2022 at 05:07:11PM -0400, Robbie Harwood wrote: > Mathieu Desnoyers writes: > > > There are no users left of version_find_latest(), version_test_gt(), and > > version_test_numeric(). Remove those unused helper functions. Using > > those helper functions is what caused the quadrati

[PATCH] gfxmenu: resolve false grub_errno disrupting boot process

2024-02-18 Thread Michael Chang via Grub-devel
When enabling gfxmenu and choosing to boot the Xen hypervisor from its menu, an error occurred: "error: ../../grub-core/video/bitmap_scale.c:42:null src bitmap in grub_video_create_scaled." The error is returned by grub_video_bitmap_create_scaled() when the source pixmap is not there. The init_ba

Re: [PATCH 7/7] verifiers: Verify after decompression

2024-03-14 Thread Michael Chang via Grub-devel
On Wed, Mar 13, 2024 at 03:07:48PM +, Ross Lagerwall via Grub-devel wrote: > It is convenient and common to have binaries stored in gzip archives > (e.g. xen.gz). Verification should be run after decompression rather > than before so reorder the file filter list as appropriate. The proposed ch

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

2024-03-14 Thread Michael Chang via Grub-devel
On Mon, May 08, 2023 at 01:58:36PM +, Avnish Chouhan wrote: > 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

[PATCH] disk: Prioritize OS disk devices over memdisk and procfs

2024-03-15 Thread Michael Chang via Grub-devel
Refine iteration to prioritize returning system disk devices over memdisk and procfs. This adjustment brings about a modest improvement in search efficiency, particularly during file or UUID-based searches for a root file system. Additionally, it helps mitigate potential collisions in file-based se

Re: Re: [PATCH] disk: Prioritize OS disk devices over memdisk and procfs

2024-03-17 Thread Michael Chang via Grub-devel
On Fri, Mar 15, 2024 at 04:09:02PM +0100, Daniel Kiper wrote: > On Fri, Mar 15, 2024 at 05:00:28PM +0800, Michael Chang via Grub-devel wrote: > > Refine iteration to prioritize returning system disk devices over > > memdisk and procfs. This adjustment brings about a modest

Re: Re: Re: [PATCH] disk: Prioritize OS disk devices over memdisk and procfs

2024-03-19 Thread Michael Chang via Grub-devel
On Mon, Mar 18, 2024 at 12:34:37PM +0100, Daniel Kiper wrote: > On Mon, Mar 18, 2024 at 02:21:36PM +0800, Michael Chang wrote: > > On Fri, Mar 15, 2024 at 04:09:02PM +0100, Daniel Kiper wrote: > > > On Fri, Mar 15, 2024 at 05:00:28PM +0800, Michael Chang via Grub-devel > >

[PATCH] ofnet: Remove 200 ms timeout in get_card_packet to reduce input latency

2024-05-05 Thread Michael Chang via Grub-devel
When grub image is netbooted on ppc64le, the keyboard input exhibits significant latency, reports even say that characters are processed about once per second. This issue makes interactively trying to debug a ppc64le config very difficult. It seems that the latency is largely caused by a 200 ms ti

Re: [PATCH v0 0/2] Secure Boot Advanced Targeting (SBAT) support on powerpc

2024-05-10 Thread Michael Chang via Grub-devel
On Wed, Apr 17, 2024 at 01:27:02AM GMT, Sudhakar Kuppusamy wrote: > This patch set contains the v0 for Secure Boot Advanced Targeting (SBAT) > support on powerpc secure boot. Hi Sudhakar, This patch series cannot be applied to the upstream master because the prerequisites patch series for power

Re: [PATCH] lvm: Grub2 fails to detect LVM volumes due to an incorrect computation of mda_end

2024-05-15 Thread Michael Chang via Grub-devel
On Wed, May 08, 2024 at 05:48:15PM GMT, Daniel Kiper via Grub-devel wrote: > Adding Marta... > > On Mon, May 06, 2024 at 03:18:45PM -0500, Glenn Washburn wrote: > > From: Rogier > > > > When handling a regular LVM volume, Grub can fail with the message: > > error: disk `lvmid/**---***

Re: [PATCH] lvm: Grub2 fails to detect LVM volumes due to an incorrect computation of mda_end

2024-05-15 Thread Michael Chang via Grub-devel
On Thu, May 16, 2024 at 12:04:21PM GMT, Michael Chang wrote: > On Wed, May 08, 2024 at 05:48:15PM GMT, Daniel Kiper via Grub-devel wrote: > > Adding Marta... > > > > On Mon, May 06, 2024 at 03:18:45PM -0500, Glenn Washburn wrote: > > > From: Rogier > > > > > > When handling a regular LVM volume,

Re: [PATCH] ofnet: Remove 200 ms timeout in get_card_packet to reduce input latency

2024-05-26 Thread Michael Chang via Grub-devel
Hi, A gentle ping. With many patches posted these days, I hope this one is not overlooked. A quick note: This fixes a one second latency for each text input in the grub interactive shell/editor when the image is net booted, as reported on mkvterm on powerhmc, caused quite a few complaints from ou

[PATCH] Fix screen coud be filled with leftover artifacts

2024-06-19 Thread Michael Chang via Grub-devel
A regression in grub 2.12 causes the grub screen to become cluttered with artifacts from the previous screen, whether it's the UEFI post ui, UEFI shell, or any graphical UI running before grub. this issue occurs in situations like booting grub from the UEFI shell and going straight to the rescue or

[PATCH] lvm: allocate metadata buffer from raw contents

2024-06-19 Thread Michael Chang via Grub-devel
Previously, the buffer for LVM metadata parsing was set to twice the size of the metadata area, which caused excessive memory use. This patch changes the allocation to read the actual raw metadata blocks directly from the metadata area. Instead of using twice the entire metadata area size, we now

Re: [PATCH] Fix screen coud be filled with leftover artifacts

2024-06-20 Thread Michael Chang via Grub-devel
On Thu, Jun 20, 2024 at 02:48:55PM GMT, Michael Chang wrote: > A regression in grub 2.12 causes the grub screen to become cluttered > with artifacts from the previous screen, whether it's the UEFI post ui, > UEFI shell, or any graphical UI running before grub. this issue occurs > in situations like

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

2024-06-24 Thread Michael Chang via Grub-devel
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 partition. So, we implemented this code to

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

2024-06-26 Thread Michael Chang via Grub-devel
On Thu, Jun 06, 2024 at 06:07:22PM GMT, Avnish Chouhan wrote: > 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. > >

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

2024-07-01 Thread Michael Chang via Grub-devel
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 grub > installation are in different

[PATCH] bli: Fix crash in get_part_uuid

2024-07-15 Thread Michael Chang via Grub-devel
The get_part_uuid() function made an assumption that the target grub device is a partition device and accessed device->disk->partition without checking for NULL. There are four situations where this assumption is problematic: 1. The device is a net device instead of a disk. 2. The device is an abs

Re: EFI El Torito image on ISO9660 (was: [PATCH] bli: Fix crash in get_part_uuid)

2024-07-16 Thread Michael Chang via Grub-devel
On Tue, Jul 16, 2024 at 10:47:57AM GMT, Pascal Hambourg wrote: > On 16/07/2024 at 08:55, Michael Chang via Grub-devel wrote: > > > > 4. When booting from an ISO, the ESP is treated as an El Torito image in > > the boot catalog. It is therefore presented by firmware and &

Re: [PATCH] bli: Fix crash in get_part_uuid

2024-07-16 Thread Michael Chang via Grub-devel
On Tue, Jul 16, 2024 at 05:45:10AM GMT, Oliver Steffen wrote: > Quoting Michael Chang via Grub-devel (2024-07-16 08:55:00) > > The get_part_uuid() function made an assumption that the target grub > > device is a partition device and accessed device->disk->partition > >

[PATCH v2] bli: Fix crash in get_part_uuid

2024-07-16 Thread Michael Chang via Grub-devel
The get_part_uuid() function made an assumption that the target grub device is a partition device and accessed device->disk->partition without checking for NULL. There are four situations where this assumption is problematic: 1. The device is a net device instead of a disk. 2. The device is an abs

Re: Support for unsealing TPM keys in GRUB

2022-06-05 Thread Michael Chang via Grub-devel
On Fri, Jun 03, 2022 at 03:56:10PM +0530, sinfinity 85 wrote: > Hi > We need to unseal TPM keys in GRUB2 (2.0.4) in order to decrypt the kernel > and load it. But, I see that there's no support for unsealing keys in GRUB2. > However, support for unsealing keys is present in TrustedGrub.Has anyone

Re: [PATCH v4 2/2] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters

2022-06-14 Thread Michael Chang via Grub-devel
On Tue, Jun 14, 2022 at 03:47:30PM +0200, The development of GNU GRUB wrote: > This lets a LUKS2 cryptodisk have its cipher and hash filled out, > otherwise they wouldn't be initialized if cheat mounted. > --- > grub-core/osdep/devmapper/getroot.c | 91 - > 1 file chang

  1   2   >