[PATCH v2] bli: Fix crash in get_part_uuid

2024-07-17 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

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

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 an

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

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

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

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

[PATCH] Fix screen coud be filled with leftover artifacts

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

[PATCH] lvm: allocate metadata buffer from raw contents

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

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

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

[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

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

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

2024-03-18 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 mod

[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

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

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

[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

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

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

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

[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

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

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

2023-09-25 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

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

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

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 v

[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

[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

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 cont

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 th

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

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

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

[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

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

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-

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 conte

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

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: 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 v4] templates: introduce GRUB_TOP_LEVEL_* vars

2022-10-19 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

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 al

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 conte

[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

[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

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

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 >

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

2022-08-25 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

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

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

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: [RFC PATCH v3 5/5] Cleanup: grub-mkconfig_lib: remove unused version comparison functions

2022-05-27 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

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,

[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[]'}

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

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

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', > >

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

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

2022-03-17 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 2/3] Fix -Werror=array-bounds array subscript 0 is outside array bounds

2022-03-17 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[]'}

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

2022-03-17 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

[PATCH 0/3] Fix GCC 12 build error

2022-03-17 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;

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=] >

[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

[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

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

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

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

[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

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

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-

[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

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

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

[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

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-

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

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

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

[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

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

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 i

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

  1   2   >