Re: [PATCH v2 2/2] efi: Put Linux specific magic number in the DOS header

2022-12-06 Thread Xiaotian Wu
在 2022-11-29星期二的 18:56 +0100,Ard Biesheuvel写道: > GRUB currently relies on the magic number in the image header of ARM > and > arm64 EFI kernel images to decide whether or not the image in > question > is a bootable kernel. > > However, the purpose of the magic number is to identify the image as >

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

2022-12-06 Thread Dimitri John Ledkov
Yes yes yes yes. Signed dtb in grub at last. On Wed, 7 Dec 2022, 03:16 Michael Chang via Grub-devel, wrote: > 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 fo

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: [RFC PATCH 4/4] kern/efi/sb: Use shim to verify font files

2022-12-06 Thread Steve McIntyre
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 files

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

2022-12-06 Thread Robbie Harwood
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 files marked as > Windows GUI used as wrappers. Thanks for writing this;

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

2022-12-06 Thread Markus Scholz
Hi, here is my attempt to provide the patch using git format-patch and git send-mail. This extends the videoinfo module to provide a --set argument which contains the currently active video resolution. Documentation could be extended as follows: Command: videoinfo [--set var | [WxH]xD] Retrie

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

2022-12-06 Thread Markus Scholz
--- grub-core/commands/videoinfo.c | 92 +++--- 1 file changed, 63 insertions(+), 29 deletions(-) diff --git a/grub-core/commands/videoinfo.c b/grub-core/commands/videoinfo.c index 5eb969748..75e3b4e9f 100644 --- a/grub-core/commands/videoinfo.c +++ b/grub-core/command

Re: [PATCH] Fix integer overflow at left shift expression

2022-12-06 Thread Daniel Kiper
On Sun, Dec 04, 2022 at 01:43:47PM +, Maxim Fomin wrote: > --- Original Message --- > On Sunday, December 4th, 2022 at 1:06 PM, Maxim Fomin wrote: > > From db82faafba5e7eccd9fd6c0b7314f7322c1aecbd Mon Sep 17 00:00:00 2001 > > From: Maxim Fomin ma...@fomin.one > > Date: Sun, 4 Dec 2022

Re: [PATCH] grub-core/loader/i386: Fix initrd maximum address overflow

2022-12-06 Thread Daniel Kiper
On Sun, Dec 04, 2022 at 08:25:09PM +0800, Jeremy Szu wrote: > The current i386 initrd be limited under 1G memory and it works in most > compressed initrd. (also initrd_addr_max case reported by kernel) > > addr = (addr_max - aligned_size) & ~0xFFF; > > Above line to calculate the reasonable address

Re: [PATCH V3 0/4] bash-completion:fix shellcheck error and warning

2022-12-06 Thread Daniel Kiper
On Tue, Dec 06, 2022 at 09:49:27PM +0800, t.feng via Grub-devel wrote: > Hi, > The patch set fix some warning and error in grub-completion.bash.in. > And shellcheck also provides 'info' and 'style' level check, i think > grub do not need to modify. > > shellcheck -s bash -S warning grub-completion.

Re: [PATCH] kern/file: Fix error handling in grub_file_open()

2022-12-06 Thread Daniel Kiper
On Tue, Dec 06, 2022 at 01:45:11AM +, Steve McIntyre wrote: > grub_file_open() calls grub_file_get_device_name(), but doesn't check > the return. Instead, it checks if grub_errno is set. > > However, nothing initialises grub_errno here when grub_file_open() > starts. This means that trying to o

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

2022-12-06 Thread Markus Scholz
Hi Zhang, now I need to apologize for my very late reply.. sorry! I saw that you also went ahead as you said with committing the highdpi patches. Anyways, regarding the high DPI question: until now we have mostly focused on different screen resolutions in our customer offerings and simply chose

[PATCH V3 1/4] bash-completion:fix shellcheck error

2022-12-06 Thread t.feng via Grub-devel
SC2070 (error): -n doesn't work with unquoted arguments. Quote or use [[ ]]. In grub-completion.bash.in line 130: [ -n $tmp ] && { ^--^ SC2070 (error) More: https://github.com/koalaman/shellcheck/wiki/SC2070 Signed-off-by: "t.feng" --- util/bash-completion.d/grub-

[PATCH V3 3/4] bash-completion:fix shellcheck SC2155-Warning

2022-12-06 Thread t.feng via Grub-devel
SC2155 (warning): Declare and assign separately to avoid masking return values. The exit status of the command is overridden by the exit status of the creation of the local variable. In grub-completion.bash.in line 115: local config_file=$(__grub_dir)/grub.cfg ^-^ SC2155 (w

[PATCH V3 2/4] bash-completion:fix shellcheck SC2207-Warning

2022-12-06 Thread t.feng via Grub-devel
COMPREPLY=($(command)) are doing unquoted command expansion in an array. This will invoke the shell's sloppy word splitting and glob expansion. If we want to split the output into lines or words, use read -r and loops will be better. This prevents the shell from doing unwanted splitting and glob

[PATCH V3 4/4] bash-completion:disable shellcheck SC2120-Warning

2022-12-06 Thread t.feng via Grub-devel
SC2120 (warning): function references arguments, but none are ever passed. In grub-completion.bash.in line 63: __grub_get_options_from_help () { ^-- SC2120 (warning) local prog if [ $# -ge 1 ]; then prog="$1" The arg of __grub_get_options_from_help is optional, so the current

[PATCH V3 0/4] bash-completion:fix shellcheck error and warning

2022-12-06 Thread t.feng via Grub-devel
Hi, The patch set fix some warning and error in grub-completion.bash.in. And shellcheck also provides 'info' and 'style' level check, i think grub do not need to modify. shellcheck -s bash -S warning grub-completion.bash.in shellcheck:https://github.com/koalaman/shellcheck V3: change functions

Re: [PATCH v2 2/2] efi: Put Linux specific magic number in the DOS header

2022-12-06 Thread Atish Patra
On Thu, Dec 1, 2022 at 6:30 AM Daniel Kiper wrote: > > On Tue, Nov 29, 2022 at 06:56:16PM +0100, Ard Biesheuvel wrote: > > GRUB currently relies on the magic number in the image header of ARM and > > arm64 EFI kernel images to decide whether or not the image in question > > is a bootable kernel. >

Re: [v6 PATCH 2/3] RISC-V: Update image header

2022-12-06 Thread Atish Patra
On Wed, Nov 23, 2022 at 1:11 AM Xiaotian Wu wrote: > > Is there a new patch? > Not sure if you are asking about this series or Ard's series [1]. I got busy with other day jobs and did not get time to revise this series as that requires a bit of work to make sure that it doesn't break ARM64 (by re