Re: [PATCH] Support dropin files for Linux kernel parameters

2024-05-02 Thread Julian Andres Klode
On Fri, Mar 01, 2024 at 03:43:50PM +, Simon Rowe wrote: > Kernel parameters actually cover a range of purposes, including > userspace like systemd. They also need setting for a variety of > reasons: > > * as distro defaults > * to provide configuration for a package > * for an admin to

[PATCH] Revert "templates: Reinstate unused version comparison functions with warning"

2024-01-30 Thread Julian Andres Klode
e7a831963e30c6d9c61027a97e50388856c68d03. Cc: Mathieu Desnoyers Cc: Daniel Kiper Signed-off-by: Julian Andres Klode --- util/grub-mkconfig_lib.in | 54 --- 1 file changed, 54 deletions(-) diff --git a/util/grub-mkconfig_lib.in b/util/grub-mkconfig_lib.in index 33e1750ae

Re: [PATCH v3 1/3] Allow explicit module dependencies

2023-12-08 Thread Julian Andres Klode
On Fri, Dec 08, 2023 at 01:20:37PM +0100, Daniel Kiper wrote: > On Wed, Dec 06, 2023 at 05:39:53PM +0100, Daniel Kiper wrote: > > On Wed, Dec 06, 2023 at 04:39:29PM +0100, Olaf Hering wrote: > > > Wed, 6 Dec 2023 16:24:53 +0100 Daniel Kiper : > > > > > > > Could you provide us exact steps to

Re: [PATCH] templates: Reinstate unused version comparison functions w/ warning

2023-11-29 Thread Julian Andres Klode
On Wed, Nov 29, 2023 at 01:42:55PM +0100, Julian Andres Klode wrote: > Revert "templates: Remove unused version comparison functions" > and add a warning to the functions that they are deprecated. > > Removing the functions directly caused a lot of upgrade issues &g

[PATCH] templates: Reinstate unused version comparison functions w/ warning

2023-11-29 Thread Julian Andres Klode
Revert "templates: Remove unused version comparison functions" and add a warning to the functions that they are deprecated. Removing the functions directly caused a lot of upgrade issues w/ custom user scripts that called the functions. In Debian and Ubuntu, grub-mkconfig is invoked as a

Re: [PATCH v2] grub-install: Delay copying files to grubdir after install_device was validated.

2023-11-22 Thread Julian Andres Klode
; grub_strcmp (disk_module, "biosdisk") != 0) > -- > 2.39.2 This looks reasonable to me, there is some more code there writing to the grub dir before the disk has been identified: grub_util_unlink (load_cfg); and following lines; it may make sense to move them later too, I think it

[PATCH v2] efi: Set shim_lock_enabled even if validation is disabled

2023-11-21 Thread Julian Andres Klode
loading and starting protocol, so this is more a temporary workaround. Fixes: 6425c12cd (efi: Fallback to legacy mode if shim is loaded on x86 archs) Cc: Peter Jones Cc: Michael Chang Signed-off-by: Julian Andres Klode --- grub-core/kern/efi/sb.c | 8 1 file changed, 8 insertions

Re: [PATCH] efi: Set shim_lock_enabled even if validation is disabled

2023-11-20 Thread Julian Andres Klode
On Tue, Oct 31, 2023 at 07:19:13PM +0100, Daniel Kiper wrote: > On Wed, Jul 19, 2023 at 03:16:00PM +0200, Julian Andres Klode wrote: > > If validation has been disabled via MokSbState, secure boot on the > > firmware is still enabled, and the kernel fails to boot. > > &g

Re: [PATCH] efi: Set shim_lock_enabled even if validation is disabled

2023-10-10 Thread Julian Andres Klode
On Wed, Jul 19, 2023 at 03:16:00PM +0200, Julian Andres Klode wrote: > If validation has been disabled via MokSbState, secure boot on the > firmware is still enabled, and the kernel fails to boot. > > This is a bit hacky, because shim_lock is not *fully* enabled, but > it triggers

[PATCH] util/grub.d/25_bli.in: Change shebang from /usr/bin/sh to /bin/sh

2023-07-27 Thread Julian Andres Klode
This fixes an error reported by Debian's lintian program. Cc: Oliver Steffen Signed-off-by: Julian Andres Klode --- util/grub.d/25_bli.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/grub.d/25_bli.in b/util/grub.d/25_bli.in index 6e4538716..c54f0dea0 100644

RFC: Signed grub extension images

2023-07-26 Thread Julian Andres Klode
Hi, after some thinking about device trees and secure boot today, I pondered if we should just allow wrapping a filesystem image in a signed PE binary into a "grubext" section perhaps. Use cases can be: - signed fonts packages - signed themes packages - signed device trees This probably needs

[RFC PATCH] efi: Provide wrappers for load_image, start_image, unload_image

2023-07-24 Thread Julian Andres Klode
These can be used to register a different implementation later, for example, when shim provides a protocol with those functions. --- grub-core/kern/efi/efi.c | 56 ++ grub-core/loader/efi/chainloader.c | 13 +++ grub-core/loader/efi/linux.c | 10

Re: [PATCH 1/1] configure.ac: Fix SDL2 typo by referencing value

2023-07-19 Thread Julian Andres Klode
R([SDL2 support for grub-emu was explicitly requested but > can't be compiled ($grub_emu_sdl2_excuse)]) >fi >if test x"$grub_emu_sdl2_excuse" = x ; then > -- > 2.37.3 > Reviewed-by: Julian Andres Klode -- debian developer - deb.li/jak | jak-linux.org - free software dev ubunt

Re: GRUB 2.12~rc1 released

2023-07-19 Thread Julian Andres Klode
On Mon, Jul 10, 2023 at 06:35:50PM +0200, Daniel Kiper wrote: > Hi all, > > The GRUB maintainers are proud to announce the GRUB 2.12~rc1 that has been > just released. > > We would like to thank all the people who have contributed to the project. > > The tarball is available at >

Re: [PATCH v2 1/2] tests: Test aborts due to missing requirements should be marked as error instead of skipped

2023-07-19 Thread Julian Andres Klode
On Thu, Oct 14, 2021 at 03:58:07PM -0500, Glenn Washburn wrote: > Many tests abort due to not being root or missing tools, for instance mkfs > commands for file system tests. The tests are exited with code 77, which > means they were skipped. A skipped test is a test that should not be run, > eg.

[PATCH] efi: Set shim_lock_enabled even if validation is disabled

2023-07-19 Thread Julian Andres Klode
loading and starting protocol, so this is more a temporary workaround. Fixes: 6425c12cd (efi: Fallback to legacy mode if shim is loaded on x86 archs) Signed-off-by: Julian Andres Klode --- grub-core/kern/efi/sb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/kern/efi/sb.c b/grub

[PATCH v2 2/2] grub-emu: Add SDL2 support

2023-06-21 Thread Julian Andres Klode
, it disables SDL1 support automatically. This duplicates the `sdl` module block in Makefile.core.def which may be something to be aware of, but we also don't want to build separate module. Bug-Debian: https://bugs.debian.org/1038035 Signed-off-by: Julian Andres Klode --- configure.ac| 34

[PATCH v2 1/2] grub-emu: SDL style fixes

2023-06-21 Thread Julian Andres Klode
These should be quite obvious and will make the SDL2 patch easier to read then doing it inline there. --- configure.ac | 2 +- grub-core/video/emu/sdl.c | 16 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index

[PATCH v2 0/2] grub-emu: Add SDL2 support

2023-06-21 Thread Julian Andres Klode
. I have not addressed the SDL2_LIBS vs LIBSDL2 controversy in the code: On Wed, Jun 21, 2023 at 02:24:56PM +0200, Daniel Kiper wrote: > On Fri, Jun 16, 2023 at 01:52:27PM +0200, Julian Andres Klode wrote: > > diff --git a/grub-core/Makefile.core.def > > b/grub-core/Makefile.cor

Re: [PATCH v1a] grub-emu: Add SDL2 support

2023-06-16 Thread Julian Andres Klode
On Fri, Jun 16, 2023 at 01:52:27PM +0200, Julian Andres Klode wrote: > So all we did with the surface in SDL1 was split into window, > surface, renderer, and texture. Instead of drawing into the > surface and then flipping, you build your pixels, then update > a texture, and then copy

[PATCH v1a] grub-emu: Add SDL2 support

2023-06-16 Thread Julian Andres Klode
, it disables SDL1 support automatically. This duplicates the `sdl` module block in Makefile.core.def which may be something to be aware of, but we also don't want to build separate module. Bug-Debian: https://bugs.debian.org/1038035 Signed-off-by: Julian Andres Klode --- configure.ac| 34

[PATCH] grub-emu: Add SDL2 support

2023-06-16 Thread Julian Andres Klode
. This does not allow explicit choosing of SDL2 vs SDL1, but seems like it will be less confusing as time goes on and you get SDL3 and so on. Bug-Debian: https://bugs.debian.org/1038035 Signed-off-by: Julian Andres Klode --- configure.ac| 22 +--- grub-core/Makefile.core.def

[PATCH] Generalize MD_MAX_DISKS to GRUB_MDRAID_MAX_DISKS

2023-06-13 Thread Julian Andres Klode
Move the constant from getroot.c to disk.h and then reuse it place of the hardcoded 1024 limit in diskfilter. Fixes: 2a5e3c1f2 (disk/diskfilter: Don't make a RAID array with more than 1024 disks) Cc: Daniel Axtens Cc: Kees Cook --- grub-core/disk/diskfilter.c | 4 ++--

Re: [PATCH] osdep/linux: Fix md array device enumeration

2023-06-06 Thread Julian Andres Klode
On Tue, Jun 06, 2023 at 07:09:26PM +0200, Daniel Kiper wrote: > On Tue, Jun 06, 2023 at 06:15:27PM +0200, Julian Andres Klode wrote: > > On Tue, Jun 06, 2023 at 06:10:21PM +0200, Julian Andres Klode wrote: > > > From: Kees Cook > > > > > > GET_ARR

Re: [PATCH] osdep/linux: Fix md array device enumeration

2023-06-06 Thread Julian Andres Klode
On Tue, Jun 06, 2023 at 06:10:21PM +0200, Julian Andres Klode wrote: > From: Kees Cook > > GET_ARRAY_INFO's info.nr_disks does not map to GET_DISK_INFO's > disk.number, which is an internal kernel index. If an array has had drives > added, removed, etc, there may be gaps in

[PATCH] osdep/linux: Fix md array device enumeration

2023-06-06 Thread Julian Andres Klode
From: Kees Cook GET_ARRAY_INFO's info.nr_disks does not map to GET_DISK_INFO's disk.number, which is an internal kernel index. If an array has had drives added, removed, etc, there may be gaps in GET_DISK_INFO's results. But since the consumer of devicelist cannot tolerate gaps (it expects to

Re: Handling large allocations (bypassing mm?)

2022-12-15 Thread Julian Andres Klode
On Wed, Dec 14, 2022 at 04:11:18PM +0100, Daniel Kiper wrote: > Adding a few folks who may be interested in this discussion too... > > On Wed, Dec 14, 2022 at 02:21:49PM +0100, Julian Andres Klode wrote: > > Hi, > > > > so I want to bring this discussion here th

Handling large allocations (bypassing mm?)

2022-12-14 Thread Julian Andres Klode
Hi, so I want to bring this discussion here that I had mostly with myself in the past days on IRC. As some of you know, we had a couple issues with large initrds in Ubuntu, Jeremy posted a patch series earlier about mmunlimited. I wanted to propose a more fine-grained approach, as well as a

[PATCH] zstd: Require at least 8 byte buffer in entropy_common

2022-01-25 Thread Julian Andres Klode
work to import. Signed-off-by: Julian Andres Klode --- grub-core/lib/zstd/entropy_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grub-core/lib/zstd/entropy_common.c b/grub-core/lib/zstd/entropy_common.c index b12944e1d..834fa4b7d 100644 --- a/grub-core/lib/zstd/entro

Re: GRUB 2.06 release

2020-10-20 Thread Julian Andres Klode
On Tue, Oct 20, 2020 at 03:12:49PM -0400, Eli Schwartz wrote: > On 10/20/20 3:00 PM, Julian Andres Klode wrote: > > On Mon, Oct 19, 2020 at 05:30:41PM +0100, Pete Batard wrote: > >> Just wanted to mention that the 2.06 release (btw, is GRUB jumping straight > >> from 2.

Re: GRUB 2.06 release

2020-10-20 Thread Julian Andres Klode
On Mon, Oct 19, 2020 at 05:30:41PM +0100, Pete Batard wrote: > Hi Daniel, > > On 2020.07.29 18:46, Daniel Kiper wrote: > > I think this link [1] will explain my long absence... Sorry about that. > > > > I am going to go back to GRUB work next week. I will triage all the patches > > and take all

Re: [PATCH] disk/loopback: Don't verify loopback images

2020-06-10 Thread Julian Andres Klode
On Mon, Jun 01, 2020 at 02:03:37PM +0100, Chris Coulson wrote: > When a file is verified, the entire contents of the verified file are > loaded in to memory and retained until the file handle is closed. A > consequence of this is that opening a loopback image can incur a > significant memory cost.

Re: [PATCH] grub.d: Use linuxefi and initrdefi commands if platform is efi

2020-03-23 Thread Julian Andres Klode
On Mon, Mar 23, 2020 at 07:26:59PM +0100, Javier Martinez Canillas wrote: > On 3/23/20 12:53 PM, Tianjia Zhang wrote: > > When the platform is EFI platform, use 'linuxefi' and 'initrdefi' > > commands instead of 'linux' and 'initrd'. > > > > These two commands are added by most distros as a part

Re: [PATCH v2] smbios: Add a --linux argument to apply linux modalias-like filtering

2020-03-03 Thread Julian Andres Klode
On Tue, Mar 03, 2020 at 05:44:54PM +0100, Daniel Kiper wrote: > On Tue, Mar 03, 2020 at 04:06:34PM +0100, Julian Andres Klode wrote: > > @@ -261,6 +279,7 @@ grub_cmd_smbios (grub_extcmd_context_t ctxt, > > > >const grub_uint8_t *structure; > >const char *value;

[PATCH v2] smbios: Add a --linux argument to apply linux modalias-like filtering

2020-03-03 Thread Julian Andres Klode
Linux creates modalias strings by filtering out non-ASCII, space, and colon characters. Provide an option that does the same filtering so people can create a modalias string in grub, and then match their modalias patterns against it. Signed-off-by: Julian Andres Klode --- grub-core/commands

[PATCH] smbios: Add a --linux argument to apply linux modalias-like filtering

2020-03-03 Thread Julian Andres Klode
Linux creates modalias strings by filtering out non-ASCII, space, and colon characters. Provide an option that does the same filtering so people can create a modalias string in grub, and then match their modalias patterns against it. Signed-off-by: Julian Andres Klode --- grub-core/commands

[PATCH v2] ofnet: Initialize structs in bootpath parser

2018-09-03 Thread Julian Andres Klode
is added. This causes $net_default_mac to point to the random one, so, for example, using that variable to load per-mac config files fails. Bug-Ubuntu: https://bugs.launchpad.net/bugs/1785859 Signed-off-by: Julian Andres Klode --- Notes: v2: Rewrote commit message to address review comments and make

Re: [PATCH resend] ofnet: Initialize structs in bootpath parser

2018-08-29 Thread Julian Andres Klode
Aug 23, 2018 at 02:12:56PM +0200, Julian Andres Klode wrote: > > Code later on checks if variables inside the struct are > > 0 to see if they have been set, like if there were addresses > > in the bootpath. > > > > The variables were not initialized however, so the

[PATCH resend] ofnet: Initialize structs in bootpath parser

2018-08-23 Thread Julian Andres Klode
. This caused a weird bug in Ubuntu, because when booting from network, we now had two interfaces with the same name, and net_default_mac pointed to the random one. Bug-Ubuntu: https://bugs.launchpad.net/bugs/1785859 Signed-off-by: Julian Andres Klode --- grub-core/net/drivers/ieee1275/ofnet.c | 4 ++-- 1

[PATCH] ofnet: Initialize structs in bootpath parser

2018-08-23 Thread Julian Andres Klode
Code later on checks if variables inside the struct are 0 to see if they have been set, like if there were addresses in the bootpath. The variables were not initialized however, so the check might suceed with uninitialized data, and a new interface with random addresses has been added. This