Re: [PATCH] ZFS/other CoW FS save_env support

2020-02-25 Thread Michael Chang
On Mon, Feb 24, 2020 at 10:30:36AM -0800, Paul Dagnelie wrote: > On Mon, Feb 24, 2020 at 3:03 AM Daniel Kiper wrote: > > > > > > Why "root" not "boot"? > That was a typo on my part; the code uses grub_guess_root_device to > find the devices backing the default grub directory, but in most > configu

Re: [PATCH 2/2] build: Disable PIE in TARGET_CCASFLAGS if needed

2020-02-25 Thread Paul Menzel
Dear Matt, Thank you for upstreaming the patches. On 2020-02-20 07:51, Matt Turner wrote: > From: Mike Gilbert > > PIE should be disabled in assembly sources as well, or else grub will > fail to boot. Could you please extend this with the list, on what architectures it fails to boot? It seems

Re: [PATCH 2/2] build: Disable PIE in TARGET_CCASFLAGS if needed

2020-02-25 Thread John Paul Adrian Glaubitz
On 2/25/20 11:58 AM, Paul Menzel wrote: >> PIE should be disabled in assembly sources as well, or else grub will >> fail to boot. > > Could you please extend this with the list, on what architectures it > fails to boot? It seems to work on x86, doesn’t it? This issue has been observed on SPARC onl

[PATCH 08/10] kern: Make grub_error() more verbose

2020-02-25 Thread Javier Martinez Canillas
From: Peter Jones Add file and line to grub_error() output to make troubleshooting easier. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas --- grub-core/kern/efi/mm.c | 17 ++--- grub-core/kern/err.c| 13 +++-- include/grub/err.h | 5 - 3

[PATCH 06/10] efi/gop: Add support for BLT_ONLY adapters

2020-02-25 Thread Javier Martinez Canillas
From: Alexander Graf EFI GOP has support for multiple different bitness types of frame buffers and for a special "BLT only" type which is always defined to be RGBx. Because grub2 doesn't ever directly access the frame buffer but instead only renders graphics via the BLT interface anyway, we can

[PATCH 10/10] efi: Fix the type of grub_efi_status_t

2020-02-25 Thread Javier Martinez Canillas
From: Peter Jones Currently, in some builds with some checkers, we see: 1. grub-core/disk/efi/efidisk.c:601: error[shiftTooManyBitsSigned]: Shifting signed 64-bit value by 63 bits is undefined behaviour This is because grub_efi_status_t is defined as grub_efi_intn_t, which is signed, and shift

[PATCH 00/10] A set of trivial patches from the Fedora package

2020-02-25 Thread Javier Martinez Canillas
Hello, This is another set of patches that we have been carrying in the Fedora package for some time. The changes are mostly trivial and I guess won't be that controversial. The paches don't have dependency with each other and can be independently applied. I'm posting it as a set because I think

[PATCH 03/10] Makefile: Make libgrub.pp depend on config-util.h

2020-02-25 Thread Javier Martinez Canillas
From: Peter Jones If you build with "make -j48" a lot, sometimes you see: gcc -E -DHAVE_CONFIG_H -I. -I.. -Wall -W -DGRUB_UTIL=1 -D_FILE_OFFSET_BITS=64 -I./include -DGRUB_FILE=\"grub_script.tab.h\" -I. -I.. -I. -I.. -I../include -I./include -I../grub-core/lib/libgcrypt-grub/src/ -I../grub-co

[PATCH 09/10] video: Add more debug output on GOP and UGA probing

2020-02-25 Thread Javier Martinez Canillas
From: Peter Jones Add debug information to EFI GOP and UGA video drivers probing function. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas --- grub-core/video/efi_gop.c | 8 +++- grub-core/video/efi_uga.c | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff

Re: [PATCH] ZFS/other CoW FS save_env support

2020-02-25 Thread Daniel Kiper
On Mon, Feb 24, 2020 at 10:30:36AM -0800, Paul Dagnelie wrote: > On Mon, Feb 24, 2020 at 3:03 AM Daniel Kiper wrote: > > > > Why "root" not "boot"? > That was a typo on my part; the code uses grub_guess_root_device to > find the devices backing the default grub directory, but in most > configurati

Re: [PATCH] ZFS/other CoW FS save_env support

2020-02-25 Thread Daniel Kiper
On Tue, Feb 25, 2020 at 06:33:09PM +0800, Michael Chang wrote: > On Mon, Feb 24, 2020 at 10:30:36AM -0800, Paul Dagnelie wrote: > > On Mon, Feb 24, 2020 at 3:03 AM Daniel Kiper wrote: > > > > > > > > > Why "root" not "boot"? > > That was a typo on my part; the code uses grub_guess_root_device to >

[PATCH 01/10] linux/getroot: Handle rssd storage device names

2020-02-25 Thread Javier Martinez Canillas
From: Peter Jones The Micron PCIe SSDs Linux driver (mtip32xx) exposes block devices as /dev/rssd[a-z]+[0-9]*. Add support for these rssd device names. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas --- grub-core/osdep/linux/getroot.c | 13 + 1 file changed, 1

[PATCH 02/10] efi: Print more debug info in our module loader

2020-02-25 Thread Javier Martinez Canillas
From: Peter Jones The function that searches the mods section base address does not have any debug information. Add some debugging outputs that could be useful. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas --- grub-core/kern/efi/efi.c | 16 +--- 1 file chang

[PATCH 04/10] kern: Add grub_debug_enabled()

2020-02-25 Thread Javier Martinez Canillas
From: Peter Jones Add a grub_debug_enabled() helper function instead of open coding it. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas --- grub-core/kern/misc.c | 21 - include/grub/misc.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) di

[PATCH 05/10] normal/completion: Fix possible NULL pointer dereference

2020-02-25 Thread Javier Martinez Canillas
From: Peter Jones Coverity Scan reports that the grub_strrchr() function can return NULL if the character is not found. Check if that's the case for dirfile pointer. Signed-off-by: Peter Jones Signed-off-by: Javier Martinez Canillas --- grub-core/normal/completion.c | 3 ++- 1 file changed,

[PATCH 07/10] efi/uga: Use 64 bit for fb_base

2020-02-25 Thread Javier Martinez Canillas
From: Andrei Borzenkov We get 64 bit from PCI BAR but then truncate by assigning to 32 bit. Make sure to check that pointer does not overflow on 32 bit platform. Closes: 50931 Signed-off-by: Andrei Borzenkov Signed-off-by: Javier Martinez Canillas --- grub-core/video/efi_uga.c | 31

Re: GRUB 2.06 release

2020-02-25 Thread John Paul Adrian Glaubitz
Hi! On 2/20/20 9:46 AM, John Paul Adrian Glaubitz wrote: > On 2/19/20 4:01 PM, Daniel Kiper wrote: >> As I told during my FOSDEM 2020 presentation we are preparing for >> GRUB 2.06 release. Tentative schedule is below: >> - code freeze: 15th of March, 23:59:59 UTC; everything posted after >>

[PATCH 3/4] Add ZFS envblock functions

2020-02-25 Thread Paul Dagnelie
This patch adds a ZFS implementation of the new envblock functions, storing the data for the envblock in the second padding area of the label. This data is protected by an embedded checksum and is stored redundantly, so even though it is not part of the block tree it provides reasonable reliability

[PATCH 1/4] Add envblk open functions to grub file interface

2020-02-25 Thread Paul Dagnelie
These functions are added to support the remainder of this patch set. In order to add these special functions we have to refactor out the logic that applies file filters so that it can be applied to both the normal and envblk open functions. commit 45ee383e11ecd15ac2820131d410a434eeea47a1 Author:

[PATCH 2/4] Add envblk reading/writing functionality to GRUB

2020-02-25 Thread Paul Dagnelie
We leverage the grub envblk file and fs functions to read from and write to the envblk. We also tweak the editenv code by factoring out the logic that creates the buffer with the envblk contents so it can be reused. We also add the grubenv_src variable, which can be used to force grub to load the

[PATCH 4/4] Update grub editenv to support modifying envblk

2020-02-25 Thread Paul Dagnelie
This patch adds the capability for the editenv utility to modify the envblk, and adds ZFS-specific handlers that will be built if GRUB is built with libzfs support. It also adds logic that editenv uses to detect GRUB's (root) filesystem. One question I have related to this patch is if there is som

Re: [PATCH 1/2] Cryptomount support LUKS detached header

2020-02-25 Thread Patrick Steinhardt
On Mon, Feb 24, 2020 at 12:12:37PM +0100, Daniel Kiper wrote: > Adding Patrick... > > On Fri, Feb 21, 2020 at 10:03:48PM +0100, Denis 'GNUtoo' Carikli wrote: > > From: John Lane > > Both patches require explanation what they do and more importantly why > they are needed... And it would be nice t