Re: AW: AW: Adding --set to videoinfo to retrieve current video resolution

2022-12-13 Thread Zhang Boyang
Hi, On 2022/12/12 19:09, Markus Scholz wrote: Hi, thank you again for your reply and explanation. Despite the different focus, I am still looking forward to try out your additions. Regarding my videoinfo patch I submitted them using git to the mailing list. What is the best way forward here?

Re: [PATCH 1/1] feat: add --set argument to videoinfo to write current resolution to grub env var

2022-12-13 Thread Zhang Boyang
Hi, On 2022/12/6 23:48, Markus Scholz wrote: --- grub-core/commands/videoinfo.c | 92 +++--- 1 file changed, 63 insertions(+), 29 deletions(-) Commit message shouldn't be empty. You need to write something about your changes. You also need to add your Signed-of

Re: [PATCH] templates/linux_xen: fix detecting xsm policy

2022-12-13 Thread Daniel Kiper
On Tue, Dec 13, 2022 at 05:12:35AM +0100, Marek Marczykowski-Górecki wrote: > xsmpolicy variable was left set from previous function call. This > resulted in all-but-first menu entries including XSM policy, even if it > did not exist. > > Fix this by initializing the xenpolicy variable. > > Signed-

Re: [PATCH] loader/i386/linux.c Correct wrong initrd address for debug

2022-12-13 Thread Daniel Kiper
On Fri, Dec 09, 2022 at 12:07:49PM +0800, Jeremy Szu wrote: > From: Jeremy Su > > The 'addr' is used to request the memory with specific ranges but the > real loadable address come from the relocator. > Thus, print the final retrieved addresses (virtual and physical) for > initrd. Missing SOB but

Re: [PATCH] loader/i386/linux.c Correct wrong initrd address for debug

2022-12-13 Thread Jeremy Szu
Hi Daniel, On Tue, Dec 13, 2022 at 8:10 PM Daniel Kiper wrote: > > On Fri, Dec 09, 2022 at 12:07:49PM +0800, Jeremy Szu wrote: > > From: Jeremy Su > > > > The 'addr' is used to request the memory with specific ranges but the > > real loadable address come from the relocator. > > Thus, print the

Re: [PATCH 1/2] mm: Adjust new region size to take management cost into account

2022-12-13 Thread Daniel Kiper
On Tue, Nov 29, 2022 at 10:17:33PM +0800, Zhang Boyang wrote: > When grub_memalign() encounters out-of-memory, it will try > grub_mm_add_region_fn() to request more memory from system firmware. > However, the size passed to it doesn't take region management cost into s/cost/overhead/? If yes then

Re: [PATCH 2/2] mm: Preallocate some space when adding new regions

2022-12-13 Thread Daniel Kiper
On Tue, Nov 29, 2022 at 10:17:34PM +0800, Zhang Boyang wrote: > When grub_memalign() encounters out-of-memory, it will try > grub_mm_add_region_fn() to request more memory from system firmware. > However, it doesn't preallocate memory space for future allocation > requests. In extreme cases, it req

Re: [PATCH v2 1/6] ieee1275: request memory with ibm, client-architecture-support

2022-12-13 Thread Daniel Kiper
On Thu, Dec 01, 2022 at 04:11:56PM -0500, Stefan Berger wrote: > From: Daniel Axtens > > On PowerVM, the first time we boot a Linux partition, we may only get > 256MB of real memory area, even if the partition has more memory. > > This isn't enough to reliably verify a kernel. Fortunately, the Pow

Re: [PATCH v2 2/6] ieee1275: drop len -= 1 quirk in heap_init

2022-12-13 Thread Daniel Kiper
On Thu, Dec 01, 2022 at 04:11:57PM -0500, Stefan Berger wrote: > From: Daniel Axtens > > This was apparently 'required by some firmware': commit dc9468500919 > ("2007-02-12 Hollis Blanchard "). > > It's not clear what firmware that was, and what platform from 14 years ago > which exhibited the b

Re: [PATCH v2 2/6] ieee1275: drop len -= 1 quirk in heap_init

2022-12-13 Thread Vladimir 'phcoder' Serbinenko
What problem are you trying to solve? Is losing 32 bytes a problem? On Thu, Dec 1, 2022 at 10:13 PM Stefan Berger wrote: > > From: Daniel Axtens > > This was apparently 'required by some firmware': commit dc9468500919 > ("2007-02-12 Hollis Blanchard "). > > It's not clear what firmware that wa

Re: [PATCH v2 1/6] ieee1275: request memory with ibm, client-architecture-support

2022-12-13 Thread Vladimir 'phcoder' Serbinenko
> + > + if (grub_strncmp (tmp, "IBM,", 4) == 0) > + grub_ieee1275_set_flag > (GRUB_IEEE1275_FLAG_CAN_TRY_CAS_FOR_MORE_MEMORY); > } Does it work on all IBM? IBM has a long history of PPC machines. What happens when it doesn't? ___ Grub-d

Re: [PATCH v2 2/6] ieee1275: drop len -= 1 quirk in heap_init

2022-12-13 Thread John Paul Adrian Glaubitz
On 12/1/22 22:11, Stefan Berger wrote: From: Daniel Axtens This was apparently 'required by some firmware': commit dc9468500919 ("2007-02-12 Hollis Blanchard "). It's not clear what firmware that was, and what platform from 14 years ago which exhibited the bug then is still both in use and b

Re: [PATCH v2 3/6] ieee1275: support runtime memory claiming

2022-12-13 Thread Daniel Kiper
On Thu, Dec 01, 2022 at 04:11:58PM -0500, Stefan Berger wrote: > From: Daniel Axtens > > On powerpc-ieee1275, we are running out of memory trying to verify > anything. This is because: > > - we have to load an entire file into memory to verify it. This is >difficult to change with appended si

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

2022-12-13 Thread Daniel Kiper
On Thu, Dec 01, 2022 at 04:11:59PM -0500, Stefan Berger wrote: > From: Diego Domingos > > As a legacy support, if the vector 5 is not implemented, Power Hypervisor will > consider the max CPUs as 64 instead 256 currently supported during > client-architecture-support negotiation. > > This patch im

Re: [PATCH v2 5/6] Add memtool module with memory allocation stress-test

2022-12-13 Thread Daniel Kiper
On Thu, Dec 01, 2022 at 04:12:00PM -0500, Stefan Berger wrote: > From: Daniel Axtens > > When working on memory, it's nice to be able to test your work. > > Add a memtest module. When compiled with --enable-mm-debug, it exposes > 3 commands: > > * lsmem - print all allocations and free space in a

Re: [PATCH v2 6/6] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2022-12-13 Thread Daniel Kiper
On Thu, Dec 01, 2022 at 04:12:01PM -0500, Stefan Berger wrote: > Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275 > PowerPC platform. With this patch grub now measures text and binary data > into the TPM's PCRs 8 and 9 in the same way as the x86_64 platform > does. > > This patch r

Re: AW: AW: Adding --set to videoinfo to retrieve current video resolution

2022-12-13 Thread Daniel Kiper
On Tue, Dec 13, 2022 at 07:06:51PM +0800, Zhang Boyang wrote: > Hi, > > On 2022/12/12 19:09, Markus Scholz wrote: > > Hi, > > > > thank you again for your reply and explanation. Despite the different > > focus, I am still looking forward to try out your additions. > > > > Regarding my videoinfo pat

Re: [PATCH 1/5] font: Check return value of grub_malloc() in ascii_glyph_lookup()

2022-12-13 Thread Daniel Kiper
On Mon, Dec 05, 2022 at 07:29:36PM +0800, Zhang Boyang wrote: > There is a problem in ascii_glyph_lookup(). It doesn't check the return > value of grub_malloc(). If memory can't be allocated, then NULL pointer > will be written to. > > This patch fixes the problem by fallbacking to unknown_glyph in

Re: [PATCH v9] plainmount: Support plain encryption mode

2022-12-13 Thread Daniel Kiper
On Sun, Dec 04, 2022 at 01:15:33PM +, Maxim Fomin wrote: > From 1b3ff732fd6f5390e85373cf56ebccb61c60c259 Mon Sep 17 00:00:00 2001 > From: Maxim Fomin > Date: Sat, 3 Dec 2022 15:15:11 + > Subject: [PATCH v9] plainmount: Support plain encryption mode > > This patch adds support for plain enc

Re: [PATCH 2/5] font: Assign null_font to unknown_glyph

2022-12-13 Thread Daniel Kiper
On Mon, Dec 05, 2022 at 07:29:37PM +0800, Zhang Boyang wrote: > Like glyphs in ascii_font_glyph[], assign null_font to > unknown_glyph->font in order to prevent grub_font_get_*() from > dereferencing NULL pointer. > > Signed-off-by: Zhang Boyang Reviewed-by: Daniel Kiper Daniel ___

Re: [PATCH 3/5] font: Reject fonts with negative max_char_width or max_char_height

2022-12-13 Thread Daniel Kiper
On Mon, Dec 05, 2022 at 07:29:38PM +0800, Zhang Boyang wrote: > If max_char_width or max_char_height is negative, bad values might be > propagated by grub_font_get_max_char_width() or > grub_font_get_max_char_height(). Prevent this from happening. > > Signed-off-by: Zhang Boyang Reviewed-by: Dani

Re: [PATCH v2 6/6] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2022-12-13 Thread Stefan Berger
On 12/13/22 11:35, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 04:12:01PM -0500, Stefan Berger wrote: Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275 PowerPC platform. With this patch grub now measures text and binary data into the TPM's PCRs 8 and 9 in the same way as the x8

Re: [PATCH v2 3/6] ieee1275: support runtime memory claiming

2022-12-13 Thread Stefan Berger
On 12/13/22 11:14, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 04:11:58PM -0500, Stefan Berger wrote: From: Daniel Axtens On powerpc-ieee1275, we are running out of memory trying to verify anything. This is because: - we have to load an entire file into memory to verify it. This is di

Re: [PATCH] templates/linux_xen: fix detecting xsm policy

2022-12-13 Thread Marek Marczykowski-Górecki
On Tue, Dec 13, 2022 at 01:02:14PM +0100, Daniel Kiper wrote: > On Tue, Dec 13, 2022 at 05:12:35AM +0100, Marek Marczykowski-Górecki wrote: > > xsmpolicy variable was left set from previous function call. This > > resulted in all-but-first menu entries including XSM policy, even if it > > did not e