[PATCH v2] bli: Fix crash in get_part_uuid

2024-07-16 Thread Michael Chang via Grub-devel
prevent the boot process from continuing. Fixes: e0fa7dc84 (bli: Add a module for the Boot Loader Interface) Signed-off-by: Michael Chang Reviewed-By: Oliver Steffen --- grub-core/commands/bli.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/grub-core/comma

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

[PATCH] bli: Fix crash in get_part_uuid

2024-07-15 Thread Michael Chang via Grub-devel
from continuing. Fixes: e0fa7dc84 (bli: Add a module for the Boot Loader Interface) Signed-off-by: Michael Chang --- grub-core/commands/bli.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/grub-core/commands/bli.c b/grub-core/commands/bli.c index e0d8

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 to

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 &

[PATCH] Fix screen coud be filled with leftover artifacts

2024-06-19 Thread Michael Chang via Grub-devel
utput. The issue is fixed by ensuring grub_console_cls() to work through lazy mode-setting, while also avoiding screen clearing for the hidden menu, which the flicker-free patch aims to improve. Fixes: 2d7c3abd8 (efi/console: Do not set text-mode until we actually need it) Signed-off-by: Michael

[PATCH] lvm: allocate metadata buffer from raw contents

2024-06-19 Thread Michael Chang via Grub-devel
allocate just what’s needed for the raw metadata. This change effectively reduces the buffer size while still working correctly. In my test system on openSUSE, the buffer size for LVM metadata dropped from 2,088,960 bytes to 1,119 bytes, which is a big improvement. Signed-off-by: Michael Chang

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

2024-05-26 Thread Michael Chang via Grub-devel
our internal lab and QA. Thanks, Michael On Mon, May 06, 2024 at 10:34:22AM GMT, Michael Chang wrote: > 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 inte

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

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
the metadata area, how many LVs and VGs are connected to the PV and whichever would take part in the size of active raw metadata block within the area. I managed to use the attached shell script to prepare a LVM disk where the metadata area is in wrapped state. It took about 100 cycles for me. With that,

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

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

2024-05-05 Thread Michael Chang via Grub-devel
polling interval, rather than needing a timeout for receiving a response. For these reasons, we believe the timeout in get_card_packet should be effectively removed. According to test results, the delay has disappeared, and it is now much easier to use interactively. Signed-Off-by: Michael Chang

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

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

2024-03-15 Thread Michael Chang via Grub-devel
searches where memdisk may mistakenly take precedence over system disks. Signed-off-by: Michael Chang --- include/grub/disk.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/grub/disk.h b/include/grub/disk.h index fbf23df7f..b3e4f1c8b 100644 --- a/include/grub

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

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

[PATCH] gfxmenu: resolve false grub_errno disrupting boot process

2024-02-18 Thread Michael Chang via Grub-devel
not be always chosen. grub_video_bitmap_load (&box->raw_pixmaps[i], path); grub_free (path); /* Ignore missing pixmaps. */ grub_errno = GRUB_ERR_NONE; In any case, we cannot account on such random behavior and should only return grub_errno if it is justified. Signed

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

Improving grub-mkstandalone for reproducible build

2023-12-05 Thread Michael Chang via Grub-devel
rocessing. Furthermore, both patches were developed to address the aforementioned issues individually. We hope to contribute them to upstream if the enhancement sounds appealing to others as well. Thanks. Michael Chang (2): mkstandalone: ensure stable timestamps for generated images mkstandalon

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

2023-12-05 Thread Michael Chang via Grub-devel
. The list retrieved by readdir() is now sorted alphabetically before incorporation into the tar archive, ensuring consistent and predictable file ordering within the archive. Signed-off-by: Michael Chang Signed-off-by: Bernhard Wiedemann --- util/grub-mkstandalone.c | 26 +++-

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

2023-12-05 Thread Michael Chang via Grub-devel
, ensuring consistency and stability in timestamps across all generated binaries. [1] 85a7be241 util/mkimage: Use stable timestamp when generating binaries. Signed-off-by: Michael Chang Signed-off-by: Bernhard Wiedemann --- util/grub-mkstandalone.c | 10 +- 1 file changed, 5 insertions

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

2023-09-24 Thread Michael Chang via Grub-devel
ACPI SPCR table when available to configure serial [2] 0f929fbf0 ACPICA: Tables: Add new mechanism to skip NULL entries in RSDT and XSDT. Signed-off-by: Michael Chang --- grub-core/kern/acpi.c | 8 1 file changed, 8 insertions(+) diff --git a/grub-core/kern/acpi.c b/grub-core/kern/ac

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

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

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

2023-03-21 Thread Michael Chang via Grub-devel
e not necessary. Signed-off-by: Michael Chang Signed-off-by: Stefan Berger --- grub-core/commands/efi/tpm.c | 37 +++ grub-core/commands/ieee1275/ibmvtpm.c | 20 +++ grub-core/commands/tpm.c | 11 include/grub/tpm.h

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

2023-03-20 Thread Michael Chang via Grub-devel
en no real measure boot functionality is performed. This patch also provides users with the option to disable the TPM device to free up memory in scenarios where the system can't afford the high memory utilization cost. Signed-off-by: Michael Chang Signed-off-by: Stefan Berger --- grub-core/co

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

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

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: [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
rmat=] This patch fixes the problem by casting the type of calculated offset to grub_size_t and use platform PRIuGRUB_SIZE as format specifier. Signed-off-by: Michael Chang --- grub-core/osdep/devmapper/getroot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/

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
tpm subsystem from being activated when no vtpm device present. Signed-off-by: Michael Chang Signed-off-by: Stefan Berger --- grub-core/commands/efi/tpm.c | 37 +++ grub-core/commands/ieee1275/ibmvtpm.c | 20 +++ grub-core/commands/tpm.c

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 content

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 f

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

[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-24 Thread Michael Chang via Grub-devel
successful image embedding so that boot failure is incurred due to inconsistent state. Signed-off-by: Michael Chang --- util/grub-install.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub-install.c b/util/grub-install.c index 7b04bd3c53..1c0ece7f19 100644 --- a/util/grub-install.c

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

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

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

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

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

2022-03-28 Thread Michael Chang via Grub-devel
2] https://elixir.bootlin.com/linux/v5.16.14/source/include/linux/compiler.h#L180 [3] https://elixir.bootlin.com/linux/v5.16.14/source/include/linux/compiler-gcc.h#L31 Signed-off-by: Michael Chang --- grub-core/bus/cs5536.c| 4 ++-- grub-core/commands/acpi.c | 4 ++--

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

2022-03-28 Thread Michael Chang via Grub-devel
pointer type in grub_absolute_pointer 5. Use asm keyword instead of __asm__ 6. Mention RELOC_HIDE() macro in the comment of grub_absolute_pointer Thanks, Michael Michael Chang (3): mkimage: Fix dangling pointer may be used error Fix -Werror=array-bounds array subscript 0 is outside arra

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

2022-03-28 Thread Michael Chang via Grub-devel
* const gf_powx ATTRIBUTE_TEXT = (void *) 0x10; For the reason given above, use gcc diagnostic pragmas to suppress the array-bounds warning. Signed-off-by: Michael Chang Reviewed-by: Daniel Kiper --- grub-core/lib/reed_solomon.c | 9 + 1 file changed, 9 insertions(+) diff --git a

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

2022-03-28 Thread Michael Chang via Grub-devel
PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size); ../util/mkimage.c:857:28: note: 'tmp_' declared here 857 | __typeof__((o64)->field) tmp_;\ | ^~~~ Signed-off-by: Michael Chang Reviewed-by: Daniel Kiper --- util/m

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-16 Thread Michael Chang via Grub-devel
* const gf_powx ATTRIBUTE_TEXT = (void *) 0x10; For the reason given above, use gcc diagnostic pragmas to suppress the array-bounds warning. Signed-off-by: Michael Chang --- grub-core/lib/reed_solomon.c | 9 + 1 file changed, 9 insertions(+) diff --git a/grub-core/lib/reed_solomon.c

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

2022-03-16 Thread Michael Chang via Grub-devel
] https://elixir.bootlin.com/linux/v5.16.14/source/include/linux/compiler-gcc.h#L31 Signed-off-by: Michael Chang --- grub-core/bus/cs5536.c| 4 ++-- grub-core/commands/acpi.c | 4 ++-- grub-core/commands/efi/loadbios.c | 9 + grub-core/commands/i386/pc/dri

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

2022-03-16 Thread Michael Chang via Grub-devel
PE_OHDR (o32, o64, header_size) = grub_host_to_target32 (header_size); ../util/mkimage.c:857:28: note: 'tmp_' declared here 857 | __typeof__((o64)->field) tmp_;\ | ^~~~ Signed-off-by: Michael Chang --- util/mkimage.c | 21 +

[PATCH 0/3] Fix GCC 12 build error

2022-03-16 Thread Michael Chang via Grub-devel
running into similar problems. Thanks, Michael Michael Chang (3): mkimage: Fix dangling pointer may be used error Fix -Werror=array-bounds array subscript 0 is outside array bounds reed_solomon: Fix array subscript 0 is outside array bounds grub-core/bus/cs5536.c| 4 ++

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 v2] Use full btrfs bootloader area

2021-12-12 Thread Michael Chang via Grub-devel
ER_SUPPORT Signed-off-by: Michael Chang --- grub-core/fs/btrfs.c | 91 +--- include/grub/disk.h | 2 + 2 files changed, 80 insertions(+), 13 deletions(-) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index c908b460f..e58dcf242 100644 --- a/grub-core/

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

2021-12-03 Thread Michael Chang via Grub-devel
file content. This presents a low confidentiality risk as grub.cfg may contain non-secured plain-text passwords. This patch restores the missing umask and set the file mode of creation to 0600 preventing unprivileged access. Fixes: CVE-2021-3981 Signed-off-by: Michael Chang --- util/grub-mkconf

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 a

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
and > it does solve the mentioned issues. > > Tested-by: Javier Martinez Canillas Same with SUSE/openSUSE. Tested-by: Michael Chang Thanks, Michael > > Best regards, > -- > Javier Martinez Canillas > Linux Engineering > Red Hat > > > _

[PATCH] Use full btrfs bootloader area

2021-11-02 Thread Michael Chang via Grub-devel
f overflow and it's tracing. This patch has been tested to provide out of the box support to btrfs zstd compression with which grub has been installed to the partition. [1] https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs(5)#BOOTLOADER_SUPPORT Signed-off-by: Michael Chang --- 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

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
essage catalogs that will consequently result in the unpleasant message. error: file `/boot/grub/locale/POSIX.gmo' not found Signed-off-by: Michael Chang --- util/grub.d/00_header.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/grub.d/00_header.in b/util/grub.

[PATCH v3] Fix build error in binutils 2.36

2021-09-27 Thread Michael Chang via Grub-devel
t-segment", 0x40)); . = SEGMENT_START("text-segment", 0x40) + SIZEOF_HEADERS; [2] Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=27377 [3] Ref: https://bugs.gentoo.org/787221 Signed-off-by: Michael Chang --- configure.ac | 14 ++ 1 file changed, 14 i

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
t-segment", 0x40)); . = SEGMENT_START("text-segment", 0x40) + SIZEOF_HEADERS; [2] Ref: https://bugs.gentoo.org/787221 [3] Ref: https://sourceware.org/bugzilla/show_bug.cgi?id=27377 Signed-off-by: Michael Chang --- configure.ac | 14 ++ 1 file changed, 14 i

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

2021-09-27 Thread Michael Chang via Grub-devel
tem-root from the example above, thus grub-install will not error out because the excessive encrypted device to boot the root device is not configured. Signed-off-by: Michael Chang Tested-by: Olav Reinert --- grub-core/disk/diskfilter.c | 61 ++--- 1 file change

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
tem-root from the example above, thus grub-install will not error out because the excessive encrypted device to boot the root device is not configured. Signed-off-by: Michael Chang Tested-by: Olav Reinert --- grub-core/disk/diskfilter.c | 60 ++--- 1 file change

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

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
ocess of running grub-install through inserting btrfs_zstd module to the on-disk image, otherwise a warning will be logged on screen to indicate user that zstd support for btrfs is disabled due to the size limit. Signed-off-by: Michael Chang --- Makefile.util.def | 1 + grub

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 in

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 m

  1   2   3   4   >