Re: [PATCH 2/2] Ensure nvram is available and functional on IEEE1275

2022-08-24 Thread Michael Chang via Grub-devel
On Wed, Aug 24, 2022 at 06:03:11PM +0200, Ismael Luceno wrote: > Otherwise the installation will fail, and the system will be left in an > unbootable state. > > On ppc64le, the boot process shows: > > Welcome to GRUB! > > error: ../../grub-core/kern/dl.c:380:symbol `grub_disk_get_siz

[PATCH] grub-install: set point of no return for powerpc-ieee1275 install

2022-08-24 Thread Michael Chang via Grub-devel
The point of no return is used to define a point where no change should be reverted in a wake of fatal error that consequently aborts the process. The powerpc-ieee1275 install apparently missed this point of no return defintion that newly installed modules could be inadvertently reverted after succ

Re: [PATCH v2 1/2] grub-install: Add missing points of no return for IEEE1275 on i386/powerpc

2022-09-05 Thread Michael Chang via Grub-devel
On Mon, Aug 29, 2022 at 04:36:24PM +0200, Ismael Luceno wrote: > Signed-off-by: Ismael Luceno > --- > util/grub-install.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/util/grub-install.c b/util/grub-install.c > index 7b04bd3c534b..527b85e27aa7 100644 > --- a/util/grub-install.c > +

Re: [PATCH v2 2/2] grub-install: Ensure a functional /dev/nvram

2022-09-05 Thread Michael Chang via Grub-devel
On Mon, Aug 29, 2022 at 04:36:25PM +0200, Ismael Luceno wrote: > This enables an early failure; for i386-ieee1275 and powerpc-ieee1275 on > Linux, without /dev/nvram the system may be left in an unbootable state. > > Signed-off-by: Ismael Luceno > --- > util/grub-install.c | 23 +

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

2022-09-07 Thread Michael Chang via Grub-devel
This helps to prevent out of memory error when reading large files via disablig tpm device as verifier has to read all content into memory in one chunk to measure the hash and extend to tpm. Signed-off-by: Michael Chang --- grub-core/commands/efi/tpm.c | 37

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

2022-10-06 Thread Michael Chang via Grub-devel
This helps to prevent out of memory error when reading large files via disabling tpm device as verifier has to read all content into memory in one chunk to measure the hash and extend to tpm. Signed-off-by: Michael Chang Reviewed-by: Stefan Berger --- grub-core/commands/efi/tpm.c | 37 +

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

2022-10-06 Thread Michael Chang via Grub-devel
On Thu, Oct 06, 2022 at 03:40:36PM -0400, Stefan Berger wrote: > > > On 9/8/22 00:23, Michael Chang via Grub-devel wrote: > > This helps to prevent out of memory error when reading large files via > > disablig > > tpm device as verifier has to read all content

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

2022-10-16 Thread Michael Chang via Grub-devel
On Fri, Oct 14, 2022 at 11:40:01AM +0200, Daniel Kiper wrote: > On Fri, Oct 07, 2022 at 01:37:10PM +0800, Michael Chang via Grub-devel wrote: > > This helps to prevent out of memory error when reading large files via > > disabling > > tpm device as verifier has to read all c

Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-18 Thread Michael Chang via Grub-devel
On Tue, Oct 18, 2022 at 04:18:21PM +0200, Olaf Hering wrote: > Tue, 18 Oct 2022 06:57:36 -0700 Denton Liu : > > > If I'm understanding correctly, what you're proposing is a mechanism for > > setting the default entry. If I'm not mistaken, this seems like an > > orthogonal discussion to me. My patc

Re: GRUB 2.12 release - update

2022-11-21 Thread Michael Chang via Grub-devel
Dear Daniel, On Wed, Oct 26, 2022 at 04:52:09PM +0200, Daniel Kiper wrote: > Hi, > > We are getting closer to the 2.12 release. Sadly we still do not have > many of important patch sets in the tree. So, I am going to spend more > time on reviews in the following weeks. Below you can find my list

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

2022-11-24 Thread Michael Chang via Grub-devel
On Thu, Nov 24, 2022 at 05:04:48PM +0100, Daniel Kiper wrote: > On Mon, Oct 17, 2022 at 01:19:08PM +0800, Michael Chang via Grub-devel wrote: > > On Fri, Oct 14, 2022 at 11:40:01AM +0200, Daniel Kiper wrote: > > > On Fri, Oct 07, 2022 at 01:37:10PM +0800, Michael Chang via Grub-

Re: Fonts and theming and what to do in future with SB

2022-11-29 Thread Michael Chang via Grub-devel
On Tue, Nov 29, 2022 at 03:24:51PM -0500, Robbie Harwood wrote: > Steve McIntyre writes: > > > Hey folks! > > > > So, with the latest set of GRUB CVE patches we've fixed up a bunch of > > potential crashes in font-handling code that could lead to Secure Boot > > holes. These are good and useful f

Re: [RFC PATCH 4/4] kern/efi/sb: Use shim to verify font files

2022-12-06 Thread Michael Chang via Grub-devel
On Tue, Dec 06, 2022 at 11:09:57AM -0500, Robbie Harwood wrote: > Zhang Boyang writes: > > > Since font files can be wrapped as PE images by grub-wrap, use shim to > > verify font files if Secure Boot is enabled. To prevent other PE files > > (e.g. kernel images) used as wrappers, it only allows

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

2023-02-19 Thread Michael Chang via Grub-devel
On Thu, Feb 16, 2023 at 01:02:00PM -0500, Stefan Berger wrote: > > > On 10/7/22 01:37, Michael Chang via Grub-devel wrote: > > This helps to prevent out of memory error when reading large files via > > disabling > > tpm device as verifier has to read all content

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

2023-02-19 Thread Michael Chang via Grub-devel
On Tue, Nov 29, 2022 at 04:11:48PM +0100, Daniel Kiper wrote: > On Fri, Nov 25, 2022 at 03:00:48PM +0800, Michael Chang via Grub-devel wrote: > > On Thu, Nov 24, 2022 at 05:04:48PM +0100, Daniel Kiper wrote: > > > On Mon, Oct 17, 2022 at 01:19:08PM +0800, Michael Chang via Grub-

[PATCH v3] tpm: Disable tpm verifier if tpm is not present

2023-02-19 Thread Michael Chang via Grub-devel
This helps to prevent out of memory error when reading large files via disabling tpm device as verifier has to read all content into memory in one chunk to measure the hash and extend to tpm. For ibmvtpm driver support this change here would be needed. It helps to prevent much memory consuming tpm

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

2023-02-27 Thread Michael Chang via Grub-devel
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 at 04:11:48PM +0100, Daniel Kiper wrote: > > > On Fri, Nov 25,

[PATCH] devmapper: Fix build error on 32bit host

2023-03-01 Thread Michael Chang via Grub-devel
The gcc build has failed for 32bit host (for eg, i386-emu and arm-emu) due to mismatch between format specifier and data type. ../grub-core/osdep/devmapper/getroot.c: In function 'grub_util_pull_devmapper': ../grub-core/osdep/devmapper/getroot.c:265:75: error: format '%lu' expects argument of typ

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

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

2023-03-05 Thread Michael Chang via Grub-devel
On Fri, Mar 03, 2023 at 07:19:56PM +0100, Daniel Kiper wrote: > On Fri, Mar 03, 2023 at 12:18:19PM +0800, Michael Chang wrote: > > 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 > >

Re: strange grub error on ARM64

2023-03-06 Thread Michael Chang via Grub-devel
On Mon, Mar 06, 2023 at 04:22:53PM -0800, Atish Patra wrote: > On Mon, Mar 6, 2023 at 1:25 PM Fabian Vogt wrote: > > > > Hi, > > > > Am Montag, 6. März 2023, 21:59:23 CET schrieb Daniel Kiper: > > > Adding Gary and Michael... > > > > > > Gary, Michael, could you help with this? Or at least forward

Re: strange grub error on ARM64

2023-03-09 Thread Michael Chang via Grub-devel
On Thu, Mar 09, 2023 at 02:10:54AM -0800, Atish Patra wrote: > On Mon, Mar 6, 2023 at 7:21 PM Michael Chang wrote: > > > > On Mon, Mar 06, 2023 at 04:22:53PM -0800, Atish Patra wrote: > > > On Mon, Mar 6, 2023 at 1:25 PM Fabian Vogt wrote: > > > > > > > > Hi, > > > > > > > > Am Montag, 6. März 20

Re: strange grub error on ARM64

2023-03-16 Thread Michael Chang via Grub-devel
On Fri, Mar 10, 2023 at 01:15:40PM +0800, Michael Chang via Grub-devel wrote: > On Thu, Mar 09, 2023 at 02:10:54AM -0800, Atish Patra wrote: > > On Mon, Mar 6, 2023 at 7:21 PM Michael Chang wrote: [snip] > > I have a small favor to ask. Is it possible for you to test out the &g

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

2023-03-16 Thread Michael Chang via Grub-devel
On Mon, Mar 13, 2023 at 02:29:41PM +0100, Daniel Kiper wrote: > On Mon, Feb 20, 2023 at 02:36:18PM +0800, Michael Chang via Grub-devel wrote: > > This helps to prevent out of memory error when reading large files via > > disabling tpm device as verifier has to read all content

[PATCH v4] tpm: Disable tpm verifier if tpm is not present

2023-03-20 Thread Michael Chang via Grub-devel
When the TPM module is loaded, the verifier reads the entire file into memory, measures and extends the hash, and uses the verified content as a backing buffer for disk files. However, this process can result in a high memory utilization cost per file operation, sometimes causing the system to run

[PATCH v5] tpm: Disable tpm verifier if tpm is not present

2023-03-21 Thread Michael Chang via Grub-devel
When the TPM module is loaded, the verifier reads the entire file into memory, measures and extends the hash, and uses the verified content as a backing buffer for disk files. However, this process can result in a high memory utilization cost per file operation, sometimes causing the system to run

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

2023-03-21 Thread Michael Chang via Grub-devel
On Tue, Mar 21, 2023 at 03:35:33PM +0100, Daniel Kiper wrote: > On Mon, Mar 20, 2023 at 06:18:26PM +0800, Michael Chang via Grub-devel wrote: > > When the TPM module is loaded, the verifier reads the entire file into > > memory, measures and extends the hash, and uses the verified c

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

2023-03-28 Thread Michael Chang via Grub-devel
On Tue, Mar 28, 2023 at 11:00:01AM +0530, Mukesh Kumar Chaurasiya wrote: > Sometimes, when booting from a very busy SAN, the access to the > disk can fail and then grub will eventually drop to grub prompt. > This scenario is more frequent when deploying many machines at > the same time using the sa

Re: regression in cryptomount -u

2023-08-21 Thread Michael Chang via Grub-devel
On Thu, Aug 17, 2023 at 10:52:58AM +0200, Olaf Hering wrote: > Prior commit 3cf2e848bc03 ("disk/cryptodisk: Allows UUIDs to be compared > in a dash-insensitive manner") the grub.cfg below worked as expected: > create a menu, which if selected tries to open the specified partition > and does further

[PATCH] acpi: skip NULL entries in RSDT and XSDT

2023-09-24 Thread Michael Chang via Grub-devel
During attempts to configure a serial console, a Page Fault Exception and system reset were encountered, specifically on release 2.12-rc1. This issue was not present in prior versions and seemed to affect only a specific machine, potentially pointing to hardware or firmware flaw. After investigati

[PATCH 2/2] mkstandalone: ensure deterministic tar file creation by sorting contents

2023-12-05 Thread Michael Chang via Grub-devel
The add_tar_files() function currently iterates through a directory's content using readdir(), which doesn't guarantee a specific order. This lack of deterministic behavior impacts reproducibility in the build process. This commit resolves the issue by introducing sorting functionality. The list r

[PATCH 1/2] mkstandalone: ensure stable timestamps for generated images

2023-12-05 Thread Michael Chang via Grub-devel
This change mirrors a previous fix [1] but is specific to images generated by grub-mkstandalone. The former fix (85a7be241) focused on utilizing a stable timestamp during binary generation in the util/mkimage context. This commit extends that approach to the images produced by grub-mkstandalone, e

Improving grub-mkstandalone for reproducible build

2023-12-05 Thread Michael Chang via Grub-devel
Enclosed is the description from openSUSE bugzilla entry: While working on reproducible builds for openSUSE, I found that our grub2 package's /usr/share/grub2/x86_64-xen/grub.xen varies across builds. I identified 2 issues: The tar contains changing (octal) mtime values. The tar stores files in r

Re: grub shell: unkown commands alwasy exit with zero code

2024-01-16 Thread Michael Chang via Grub-devel
On Fri, Jan 12, 2024 at 05:58:02PM +0100, Itxaka serrano wrote: > Hey all, > > I opened a bug because this behaviour doesnt seem correct to me: > > https://savannah.gnu.org/bugs/?65154 > > > Example: > > grub> hello > error: ../../grub-core/script/function.c:119:can't find command `hello'. > g

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

2024-01-24 Thread Michael Chang via Grub-devel
On Wed, Jan 24, 2024 at 11:42:30AM +0530, Mukesh Kumar Chaurasiya wrote: > Sometimes, when booting from a very busy SAN, the access to the > disk can fail and then GRUB will eventually drop to GRUB prompt. > This scenario is more frequent when deploying many machines at > the same time using the sa

Re: [PATCH v1 22/37] bootp: New net_bootp6 command

2024-10-08 Thread Michael Chang via Grub-devel
On Mon, Oct 07, 2024 at 12:20:55PM GMT, Leo Sandoval wrote: > From: Michael Chang > > Implement new net_bootp6 command for IPv6 network auto configuration via the > DHCPv6 protocol (RFC3315). This would have marked the fourth attempt to upstream the patch by different people. https://lists.gnu.

Re: [PATCH v1 31/37] btrfs: grub2-btrfs-04-grub2-install

2024-10-08 Thread Michael Chang via Grub-devel
On Tue, Oct 08, 2024 at 10:14:59AM GMT, Vladimir 'phcoder' Serbinenko wrote: > Le mar. 8 oct. 2024, 09:53, Michael Chang via Grub-devel > a écrit : > > > On Tue, Oct 08, 2024 at 08:07:17AM GMT, Vladimir 'phcoder' Serbinenko > > wrote: > > > Agai

Re: [PATCH v3 08/16] normal: Add fw_path variable (revised)

2024-10-14 Thread Michael Chang via Grub-devel
On Thu, Oct 10, 2024 at 03:43:26PM GMT, Leo Sandoval wrote: > From: Paulo Flabiano Smorigo > > This patch makes grub look for its config file on efi where the app was > found. It was originally written by Matthew Garrett, and adapted to fix the > "No modules are loaded on grub2 network boot" issu

Re: [PATCH v2 25/30] btrfs: grub2-btrfs-03-follow_default

2024-10-14 Thread Michael Chang via Grub-devel
On Sat, Oct 12, 2024 at 10:51:09AM GMT, Neal Gompa wrote: > On Fri, Oct 11, 2024 at 6:40 PM Leo Sandoval wrote: > > > > From: Michael Chang > > > > Signed-off-by: Michael Chang > > Signed-off-by: Robbie Harwood > > This needs a real commit message describing what this does. Please > work with

[PATCH v2] lvm: allocate metadata buffer from raw contents

2024-10-08 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] lvm: allocate metadata buffer from raw contents

2024-10-08 Thread Michael Chang via Grub-devel
On Mon, Oct 07, 2024 at 11:49:51AM GMT, ross.philip...@oracle.com wrote: > On 10/3/24 8:40 PM, Michael Chang via Grub-devel wrote: > > On Thu, Oct 03, 2024 at 10:30:15AM GMT, ross.philip...@oracle.com wrote: > > > On 10/3/24 12:23 AM, Michael Chang via Grub-devel wrote: >

Re: [PATCH] efinet: Skip virtual VLAN devices during card enumeration

2024-10-18 Thread Michael Chang via Grub-devel
On Fri, Oct 18, 2024 at 08:08:28AM GMT, zhangqiumiao wrote: > > On Thu, Oct 03, 2024 at 03:23:15PM +0800, Michael Chang via Grub-devel > > wrote: > >> Similar to the fix in commit "c52ae4057 efinet: skip virtual IPv4 and > >> IPv6 devices during card enumer

Re: [PATCH v3 22/29] btrfs: Add ability to boot from subvolumes

2024-10-20 Thread Michael Chang via Grub-devel
On Fri, Oct 18, 2024 at 08:39:01PM GMT, Vladimir 'phcoder' Serbinenko wrote: > Le lun. 14 oct. 2024, 20:10, Leo Sandoval a écrit : > > > From: Jeff Mahoney > > > > This patch adds the ability to specify a different root on a btrfs > > filesystem too boot from other than the default one. > > > Do

Re: [PATCH v3 24/29] btrfs: export btrfs_subvol and btrfs_subvolid

2024-10-20 Thread Michael Chang via Grub-devel
On Sat, Oct 19, 2024 at 01:32:12PM GMT, Vladimir 'phcoder' Serbinenko wrote: > What if I put /boot and /boot/grub in different sub volumes? How do I set > variables then in order to correctly load additional modules from $prefix > and yet load correct kernels? This convoy is needed in order to load

Re: [PATCH v1 31/37] btrfs: grub2-btrfs-04-grub2-install

2024-10-07 Thread Michael Chang via Grub-devel
On Tue, Oct 08, 2024 at 08:07:17AM GMT, Vladimir 'phcoder' Serbinenko wrote: > Again, what do you try to achieve? Why aren't absolute paths enough? The absolute path does not align with the default subvolume. As a result, after running btrfs set-default , the system does not boot the new default s

Re: [PATCH v1 33/37] btrfs: grub2-btrfs-06-subvol-mount

2024-10-07 Thread Michael Chang via Grub-devel
On Mon, Oct 07, 2024 at 09:40:40PM GMT, Vladimir 'phcoder' Serbinenko wrote: > What do you try to achieve with this that can't be achieved with using full > path? We should avoid using hidden state for directory parsing. Solaris > GRUB legacy used it for ZFS and it was a mess. If a path is relativ

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

2024-10-03 Thread Michael Chang via Grub-devel
On Thu, Oct 03, 2024 at 09:17:46PM GMT, Askar Safin wrote: > On Thu, 03 Oct 2024 11:23:08 +0400 Michael Chang via Grub-devel wrote > --- > > A regression in grub 2.12 causes the grub screen to become cluttered > > I just tested. Your patch doesn't fix anything

Re: [PATCH] lvm: allocate metadata buffer from raw contents

2024-10-03 Thread Michael Chang via Grub-devel
On Thu, Oct 03, 2024 at 10:30:15AM GMT, ross.philip...@oracle.com wrote: > On 10/3/24 12:23 AM, Michael Chang via Grub-devel wrote: > > Previously, the buffer for LVM metadata parsing was set to twice the > > size of the metadata area, which caused excessive memory use. > > &

[PATCH] kern/main: Fix cmdpath in root directory

2024-10-29 Thread Michael Chang via Grub-devel
The "cmdpath" environment variable is set at startup to the location from which the grub image is loaded. It includes a device part and, optionally, an absolute directory name if the grub image is booted as a file in a local file-system directory, or in a remote server directory, like TFTP. This e

Re: [PATCH] kern/main: Fix cmdpath in root directory

2024-10-31 Thread Michael Chang via Grub-devel
On Wed, Oct 30, 2024 at 05:12:48PM GMT, Daniel Kiper wrote: > Adding Leo... > > On Tue, Oct 29, 2024 at 03:57:18PM +0800, Michael Chang via Grub-devel wrote: > > The "cmdpath" environment variable is set at startup to the location > > from which the grub image is lo

[PATCH] lvm: allocate metadata buffer from raw contents

2024-10-03 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

[PATCH] Fix screen coud be filled with leftover artifacts

2024-10-03 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] tpm: Skip loopback image measurement

2024-10-03 Thread Michael Chang via Grub-devel
The loopback image is configured to function as a disk by being mapped as a block device. Instead of measuring the entire block device, we should focus on tracking the individual files accessed from it. For example, we do not directly measure block devices like disk hd0, but the files opened from i

[PATCH] efinet: Skip virtual VLAN devices during card enumeration

2024-10-03 Thread Michael Chang via Grub-devel
Similar to the fix in commit "c52ae4057 efinet: skip virtual IPv4 and IPv6 devices during card enumeration", the UEFI PXE driver creates additional VLAN child devices when a VLAN ID is configured on a network interface associated with a physical NIC. These virtual VLAN devices must be skipped durin

Re: [PATCH] kern/main: Fix cmdpath in root directory

2024-11-05 Thread Michael Chang via Grub-devel
On Mon, Nov 04, 2024 at 07:15:33PM GMT, Daniel Kiper wrote: > On Fri, Nov 01, 2024 at 10:03:16AM +0800, Michael Chang wrote: > > On Wed, Oct 30, 2024 at 05:12:48PM GMT, Daniel Kiper wrote: > > > Adding Leo... > > > > > > On Tue, Oct 29, 2024 at 03:57:18PM

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

2025-02-05 Thread Michael Chang via Grub-devel
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 sufficient for > booting. With this 512 MB RMA,

[PATCH 03/10] efinet + bootp: add net_dhcp6 command supporting dhcpv6

2024-12-16 Thread Michael Chang via Grub-devel
Implement a new net_dhcp6 command for IPv6 network auto-configuration using the DHCPv6 protocol (RFC3315). This command is renamed from net_bootp6, which has been used in downstream patches for a long time prior to the addition of the DHCPv4 feature. The net_bootp6 command is retained for backward

[PATCH 08/10] kern/efi/efi: Print URI and DNS device path info

2024-12-16 Thread Michael Chang via Grub-devel
Signed-off-by: Michael Chang --- grub-core/kern/efi/efi.c | 37 + 1 file changed, 37 insertions(+) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c index b93ae3aba..2997ab721 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/kern/efi/efi.c

[PATCH 06/10] efinet: Configure network from UEFI device path

2024-12-16 Thread Michael Chang via Grub-devel
The PXE Base Code protocol, which was previously used to obtain the cached PXE DHCPACK packet, is no longer available for HTTP Boot. HTTP boot configuration must now be retrieved from the device path nodes defined in the following UEFI Specification sections: 9.3.5.12 IPv4 Device Path 9.3.

[PATCH 05/10] bootp: Process DHCPACK packet during HTTP Boot

2024-12-16 Thread Michael Chang via Grub-devel
The vendor class identifier with the string "HTTPClient" is used to indicate that the packet is responding to an HTTP boot request. In the DHCPv4 configuration, the boot_file for HTTP boot specifies the URL of the boot file, while for PXE boot, it specifies the path to the boot file. Consequently,

[PATCH 01/10] net/http: Check result of grub_netbuff_put() in http_receive()

2024-12-16 Thread Michael Chang via Grub-devel
From: Robbie Harwood Co-authored-by: Peter Jones Signed-off-by: Peter Jones Signed-off-by: Robbie Harwood Signed-off-by: Michael Chang --- grub-core/net/http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grub-core/net/http.c b/grub-core/net/http.c index f389bf03d..

[PATCH 00/10] Support UEFI HTTP boot with IPv6 and DNS

2024-12-16 Thread Michael Chang via Grub-devel
This patch series extends GRUB's network boot capabilities to support the following UEFI network boot functions: - UEFI PXE with IPv6 support - UEFI HTTP with IPv4 and IPv6 support - UEFI HTTP with DNS resolution Although GRUB already supports TFTP, HTTP, and DNS, it previously lacked the integra

[PATCH 04/10] grub.texi: Add net_dhcp6 document

2024-12-16 Thread Michael Chang via Grub-devel
Update grub documentation for net_dhcp6 command. Signed-off-by: Michael Chang Signed-off-by: Ken Lin Signed-off-by: Robbie Harwood --- docs/grub.texi | 30 ++ 1 file changed, 30 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index 200e747af..50a779d11 1

[PATCH 02/10] efinet: Add structures for PXE messages

2024-12-16 Thread Michael Chang via Grub-devel
From: Robbie Harwood When a GRUB2 image is booted from UEFI IPv6 PXE, the DHCPv6 Reply packet is cached in the firmware buffer and can be retrieved via the PXE Base Code protocol. The network interface can then be configured using the parameters from the retrieved packet. Augment existing struct

[PATCH 07/10] efinet: Set DNS server from UEFI protocol

2024-12-16 Thread Michael Chang via Grub-devel
In the URI device path node, any string of characters (i.e., a name), rather than a network address, can be used to look up resources. This requires DNS services to resolve the name to an IP address. However, since the DNS device path requires a later UEFI version and may not always be available, w

[PATCH 09/10] kern/efi/efi: Correct endianness in IPv6 device path

2024-12-16 Thread Michael Chang via Grub-devel
Signed-off-by: Michael Chang --- grub-core/kern/efi/efi.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c index 2997ab721..122adf267 100644 --- a/grub-core/kern/efi/efi.c +++ b/grub-core/ker

[PATCH 10/10] bootp: Fix logical operator in DHCP option overload check

2024-12-16 Thread Michael Chang via Grub-devel
Signed-off-by: Michael Chang --- grub-core/net/bootp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c index 8bf0ca782..0bfa3d185 100644 --- a/grub-core/net/bootp.c +++ b/grub-core/net/bootp.c @@ -379,7 +379,7 @@ grub_net_configure

[PATCH RESEND] grub-install: force journal draining to ensure data integrity

2025-01-20 Thread Michael Chang via Grub-devel
In XFS, the system would end up in unbootable state if an abrupt power off after grub-install is occuring. It can be easily reproduced with. grub-install /dev/vda; reboot -f The grub error would show many different kinds of corruption in filesystem and the problem boils down to incompleted jour

Re: [PATCH RESEND] grub-install: force journal draining to ensure data integrity

2025-01-21 Thread Michael Chang via Grub-devel
On Tue, Jan 21, 2025 at 07:41:03AM +0100, Pascal Hambourg wrote: > Le 21/01/2025 à 07:25, Michael Chang via Grub-devel a écrit : > > In XFS, the system would end up in unbootable state if an abrupt power > > off after grub-install is occuring. It can be easily reproduced with. &

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

2025-02-12 Thread Michael Chang via Grub-devel
Hi Avnish, This patch doesn't build: ../grub-core/osdep/linux/ofpath.c: In function ‘of_path_of_nvme’: ../grub-core/osdep/linux/ofpath.c:729:37: error: ‘%x’ directive output may be truncated writing between 1 and 8 bytes into a region of size 7 [-Werror=format-truncation=] 729 |

Re: Arch Linux latest git snapshot has too many issues to be a new release base

2025-02-20 Thread Michael Chang via Grub-devel
On Thu, Feb 20, 2025 at 12:27:12PM +0100, Tobias Powalowski via Grub-devel wrote: > Hi Daniel, > > according to my unanswered mail 2 days ago, we tried to bump grub to latest > git snapshot. > > It failed for my co-maintainer in 2 cases: > > - loopback device seems to be broken Is the loopback

[PATCH] fs/ext2: Rework out-of-bounds read for inline and external extents

2025-02-20 Thread Michael Chang via Grub-devel
Previously, the number of extent entries was not properly capped based on the actual available space. This could lead to insufficient reads for external extents, since the computation was based solely on the inline extent layout. In this patch, when processing the extent header, we determine wheth

Re: [SECURITY PATCH 14/73] fs/ext2: Fix out-of-bounds read for inline extents

2025-02-20 Thread Michael Chang via Grub-devel
Hi Unfortunately this fix did not go through and may cause issues when reading larger files, such as the initial ramdisk. I have posted a new patch in the hope that the problem will be correctly addressed this time. Sorry for the trouble. Michael On Tue, Feb 18, 2025 at 07:00:20PM +0100, Daniel

Re: Arch Linux latest git snapshot has too many issues to be a new release base

2025-02-21 Thread Michael Chang via Grub-devel
On Fri, Feb 21, 2025 at 10:01:11AM +0100, Christian Hesse wrote: > Michael Chang via Grub-devel on Fri, 2025/02/21 15:55: > > On Thu, Feb 20, 2025 at 12:27:12PM +0100, Tobias Powalowski via Grub-devel > > wrote: > > > It failed for my co-maintainer in 2 cases: > > &g

Re: [PATCH v2 2/2] efi: Use shim's loader protocol for EFI image verification and loading

2025-03-24 Thread Michael Chang via Grub-devel
On Mon, Mar 10, 2025 at 09:12:22AM +, Mate Kukri wrote: > - Use shim loader protocol to verify images in the shim_lock verifier. This change makes the shim loader protocol mandatory for GRUB under UEFI Secure Boot. However, I don't think this is a good idea, since the new protocol is only avai

Re: [PATCH v3 2/5] efi/sb: Add support for the shim loader protocol

2025-04-02 Thread Michael Chang via Grub-devel
On Tue, Apr 01, 2025 at 11:26:42AM +0100, Mate Kukri wrote: > Use loader protocol for image verification where available, otherwise > fall back to the old shim lock protocol. > > Signed-off-by: Mate Kukri > --- > grub-core/kern/efi/sb.c | 58 > grub-core

Re: [PATCH] tcp: Fix TCP port number reused on reboot

2025-07-11 Thread Michael Chang via Grub-devel
Hi Subhakar, Thanks for the review. On Fri, Jul 11, 2025 at 11:17:00AM +0530, Sudhakar Kuppusamy wrote: > > > > On 11 Jul 2025, at 9:37 AM, Michael Chang via Grub-devel > > wrote: > > > > GRUB's TCP stack assigns source ports for outgoing connections s

[PATCH v2] tcp: Fix TCP port number reused on reboot

2025-07-11 Thread Michael Chang via Grub-devel
GRUB's TCP stack assigns source ports for outgoing connections starting at 21550 and increments sequentially by 1 (e.g., 21550, 21551, ...). While this generally works, it can lead to failures if the system reboots rapidly and reuses the same source port too soon. This issue was observed on powerp

[PATCH] tcp: Fix TCP port number reused on reboot

2025-07-10 Thread Michael Chang via Grub-devel
GRUB's TCP stack assigns source ports for outgoing connections starting at 21550 and increments sequentially by 1 (e.g., 21550, 21551, ...). While this generally works, it can lead to failures if the system reboots rapidly and reuses the same source port too soon. This issue was observed on powerp

[PATCH] Support environment block in btrfs reserved area

2025-07-10 Thread Michael Chang via Grub-devel
On Btrfs, GRUB cannot update the environment block (grubenv) because file based writes via blocklists are incompatible with Btrfs COW (Copy On Write) design. Although GRUB’s filesystem drivers are read only, environment updates rely on raw block access to fixed locations, which is not safe on Btrfs

<    1   2