[PATCH] multiboot2: Implement the new module_relocatable_tag

2020-04-16 Thread Zide Chen
In contrast to Mulitboot, in Mulitboot2, there is currently no way to control where to load the modules to. This could be a problem, e.g., the OS loaded by Multiboot2 needs to reserve low address for some particular purposes and not for loading modules. This new tag gives it flexibility to control

[PATCH] multiboot2: Add module relocatable tag to support modules relocation

2020-04-16 Thread Zide Chen
Also change the name from "relocatable header tag" to "kernel relocatable tag" to make it less confusing. These two tags are independent from each other. Signed-off-by: Zide Chen --- doc/multiboot.texi | 51 +- doc/multiboot2.h | 11 ++ 2 fil

RE: [PATCH V3] multiboot2: Implement quirk-modules-after-kernel

2020-04-16 Thread Chen, Zide
> -Original Message- > From: Lukasz Hawrylko > Sent: Tuesday, April 7, 2020 2:20 AM > To: The development of GNU GRUB > Cc: Chen, Zide > Subject: Re: [PATCH V3] multiboot2: Implement quirk-modules-after-kernel > > On Mon, 2020-04-06 at 23:30 -0700, Zide Chen wrote: > > @@ -392,11 +395,

RE: [PATCH V4] multiboot2: Implement quirk-modules-after-kernel

2020-04-16 Thread Chen, Zide
Hi Daniel, > -Original Message- > From: Chen, Zide > Sent: Thursday, April 16, 2020 10:41 AM > To: 'Daniel Kiper' > Cc: grub-devel@gnu.org > Subject: RE: [PATCH V4] multiboot2: Implement quirk-modules-after-kernel > > > > +--+ > > > u16 | type = 22 |

RE: [PATCH V4] multiboot2: Implement quirk-modules-after-kernel

2020-04-16 Thread Chen, Zide
> -Original Message- > From: Daniel Kiper > Sent: Thursday, April 16, 2020 6:29 AM > To: Chen, Zide > Cc: grub-devel@gnu.org > Subject: Re: [PATCH V4] multiboot2: Implement quirk-modules-after-kernel > > > Yes, a new tag would give it more flexibility for loading modules. But my > > ma

[PATCH v2 0/2] Improve LUKS2 error reporting

2020-04-16 Thread Patrick Steinhardt
Hi, this is the second version of my patch that has the aim of improving error reporting for LUKS2 in case decryption of the disk fails. There's no functional changes, but I've split up the single patch into two as proposed by Daniel. @Daniel: Note that I've added your Reviewed-by to the second p

[PATCH v2 1/2] luks2: Propagate error when reading area key fails

2020-04-16 Thread Patrick Steinhardt
When decrypting a given keyslot, all error cases except for one set up an error and return the error code. The only exception is when we try to read the area key: instead of setting up an error message, we directly print it via `grub_dprintf()`. Convert the outlier to use `grub_error()` to allow m

[PATCH v2 2/2] luks2: Improve error reporting when recovering keys

2020-04-16 Thread Patrick Steinhardt
While we already set up error messages in both `luks2_verify_key()` and `luks2_decrypt_key()`, we do not ever print them in the calling function `luks2_recover_key()`. This makes it really hard to discover why a given key actually failed to decrypt a disk. Improve this by including the error messa

[PATCH v2 2/3] multiboot2: Use .gitignore files

2020-04-16 Thread Hans Ulrich Niedermann
Add /.gitignore file and remove the /.bzrignore file. The /doc/.gitignore file is generated by gnulib-tool so we keep that file in addition to the top-level /.gitignore file which covers everything else in subdirectories as well. Signed-off-by: Hans Ulrich Niedermann --- .bzrignore | 30 ---

[PATCH 2/2] multiboot: Use .gitignore files

2020-04-16 Thread Hans Ulrich Niedermann
Add /.gitignore file and remove the /.bzrignore file. The /doc/.gitignore file is generated by gnulib-tool so we keep that file in addition to the top-level /.gitignore file which covers everything else in subdirectories as well. Signed-off-by: Hans Ulrich Niedermann --- .bzrignore | 30 ---

[PATCH 1/2] multiboot: Allow running autogen.sh

2020-04-16 Thread Hans Ulrich Niedermann
Current gnulib's gnulib-tool only runs if configure.ac contains AC_PREREQ(2.63). As Autoconf 2.63 has been released in 2008-09, this should not affect too many systems in 2020. Signed-off-by: Hans Ulrich Niedermann --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: [PATCH 0/1] docs: Fix numerous minor mistakes in grub.info

2020-04-16 Thread Hans Ulrich Niedermann
On Thu, 16 Apr 2020 16:27:02 +0200 Daniel Kiper wrote: > On Thu, Apr 16, 2020 at 03:03:43PM +0200, Hans Ulrich Niedermann > wrote: > > This patch does not change the intended meaning of the text > > and only touches about the first 1300 of about 7000 lines > > in docs/grub.texi. If there is inter

RE: [PATCH v2] version: add a module to get GRUB version

2020-04-16 Thread Flavio Suligoi
Hi Daniel, > > grub> help version > > Usage: version [OPTIONS] > > > > Print GRUB or GRUB+OEM version. > > If --set is specified, the version is assigned to variable. > > > > -s, --set=VARNAME Assign return value to variable VARNAME. > > -o, --oem Add OEM version. > > -h, --hel

[PATCH 3/3] multiboot2: Make example kernel build at least for i386

2020-04-16 Thread Hans Ulrich Niedermann
Document both boot_i386.S and boot_mips.S, and build at least boot_i386.S. Building a mips kernel if a mips compiler is actually available still needs some work. Signed-off-by: Hans Ulrich Niedermann --- .gitignore | 2 ++ configure.ac| 29 ++ d

[PATCH 1/3] multiboot2: Allow running autogen.sh

2020-04-16 Thread Hans Ulrich Niedermann
Current gnulib's gnulib-tool only runs if configure.ac contains AC_PREREQ(2.63). As Autoconf 2.63 has been released in 2008-09, this should not affect too many systems in 2020. Signed-off-by: Hans Ulrich Niedermann --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH 2/3] multiboot2: Use .gitignore files

2020-04-16 Thread Hans Ulrich Niedermann
Add /.gitignore file and remove the /.bzrignore file. The /doc/.gitignore file is generated by gnulib-tool so we keep that file in addition to the top-level /.gitignore file which covers everything else in subdirectories as well. Signed-off-by: Hans Ulrich Niedermann --- .bzrignore | 30 ---

Re: [PATCH v2] version: add a module to get GRUB version

2020-04-16 Thread Daniel Kiper
On Wed, Apr 15, 2020 at 02:04:36PM +0200, Flavio Suligoi wrote: > Sometimes, writing a custom grub.cfg configuration file, > especially with embedded systems, it is indispensable > to know the version of the running GRUB. > This is essential for every automatic sw update procedure. > > Additionally

Re: [PATCH 0/1] docs: Fix numerous minor mistakes in grub.info

2020-04-16 Thread Daniel Kiper
Hi Hans, On Thu, Apr 16, 2020 at 03:03:43PM +0200, Hans Ulrich Niedermann wrote: > This patch does not change the intended meaning of the text > and only touches about the first 1300 of about 7000 lines > in docs/grub.texi. If there is interest in picking up this > patch, I intend to read through

Re: [PATCH V4] multiboot2: Implement quirk-modules-after-kernel

2020-04-16 Thread Daniel Kiper
On Tue, Apr 14, 2020 at 09:39:17PM +, Chen, Zide wrote: > Hi Daniel, > > > Subject: Re: [PATCH V4] multiboot2: Implement quirk-modules-after-kernel > > On Tue, Apr 07, 2020 at 02:08:59PM -0700, Zide Chen wrote: > > > In contrast to Mulitboot, in Mulitboot2, there is currently no way to > > > co

[PATCH 0/1] docs: Fix numerous minor mistakes in grub.info

2020-04-16 Thread Hans Ulrich Niedermann
This patch does not change the intended meaning of the text and only touches about the first 1300 of about 7000 lines in docs/grub.texi. If there is interest in picking up this patch, I intend to read through the rest of grub.texi as well to find more of these easy fixes while adding remarks for bi

[PATCH] docs: Fix numerous minor mistakes in grub.info

2020-04-16 Thread Hans Ulrich Niedermann
Fix minor mistakes like spelling errors, missing articles like 'a' and 'the', wrong word order, unnecessary trailing spaces, missing periods, and similar things. This patch does not change the intended meaning of the text and only touches about the first 1300 of about 7000 lines in docs/grub.texi.

Re: [PATCH] luks2: Improve error reporting when decrypting/verifying key

2020-04-16 Thread Daniel Kiper
On Thu, Apr 16, 2020 at 02:36:10PM +0200, Patrick Steinhardt wrote: > On Thu, Apr 16, 2020 at 02:27:02PM +0200, Daniel Kiper wrote: > > On Thu, Apr 16, 2020 at 12:19:55PM +0200, Patrick Steinhardt wrote: > > > While we already set up error messages in both `luks2_verify_key()` and > > > `luks2_decr

RE: XHCI support for grub2

2020-04-16 Thread Wim Vervoorn
Hi Daniel, I think the big issue here is to find the funds required to spend a lot of time making the changes required. Unless someone has a lot of spare time to do this. Best Regards, Wim Vervoorn -Original Message- From: Grub-devel [mailto:grub-devel-bounces+wvervoorn=eltan@gnu.

Re: [PATCH 1/2] json: Update jsmn library to upstream commit 053d3cd

2020-04-16 Thread Daniel Kiper
On Thu, Apr 16, 2020 at 02:34:57PM +0200, Patrick Steinhardt wrote: > On Thu, Apr 16, 2020 at 02:29:43PM +0200, Daniel Kiper wrote: > > On Thu, Apr 16, 2020 at 12:19:48PM +0200, Patrick Steinhardt wrote: > > > Update our embedded version of the jsmn library to upstream commit > > > 053d3cd (Merge p

Re: XHCI support for grub2

2020-04-16 Thread Daniel Kiper
Hi, On Wed, Apr 15, 2020 at 06:30:23PM +0200, Aleš Nesrsta wrote: > Hi, > > just note: > > There was done some work mainly by Bjørn Forsman - but, AFAIK, it is > probably unfinished, see e.g. here: > https://lists.gnu.org/archive/html/grub-devel/2017-03/msg9.html > > From my point of view, the

Re: [PATCH] luks2: Improve error reporting when decrypting/verifying key

2020-04-16 Thread Patrick Steinhardt
On Thu, Apr 16, 2020 at 02:27:02PM +0200, Daniel Kiper wrote: > On Thu, Apr 16, 2020 at 12:19:55PM +0200, Patrick Steinhardt wrote: > > While we already set up error messages in both `luks2_verify_key()` and > > `luks2_decrypt_key()`, we do not ever print them. This makes it really > > hard to disc

Re: [PATCH 1/2] json: Update jsmn library to upstream commit 053d3cd

2020-04-16 Thread Patrick Steinhardt
On Thu, Apr 16, 2020 at 02:29:43PM +0200, Daniel Kiper wrote: > On Thu, Apr 16, 2020 at 12:19:48PM +0200, Patrick Steinhardt wrote: > > Update our embedded version of the jsmn library to upstream commit > > 053d3cd (Merge pull request #175 from pks-t/pks/struct-type, > > 2020-04-02). > > Does this

Re: [PATCH v3 0/6] Improvements to EFI console and terminal drivers for Flicker Free Boot

2020-04-16 Thread Daniel Kiper
On Wed, Apr 15, 2020 at 12:26:16PM +0200, Javier Martinez Canillas wrote: > Hello, > > This is a v3 of a patch-set that contains improvements for the EFI console and > terminal drivers that allows to avoid the switch to text-mode until is needed. > > This is part of the patches we have in Fedora to

Re: [PATCH v3] templates: Output a menu entry for firmware setup on UEFI FastBoot systems

2020-04-16 Thread Daniel Kiper
On Wed, Apr 15, 2020 at 12:32:17PM +0200, Javier Martinez Canillas wrote: > From: Steve Langasek > > The fwsetup command allows to reboot into the EFI firmware setup menu, add > a template to include a menu entry on EFI systems that makes use of that > command to reboot into the EFI firmware setti

Re: [PATCH 2/2] json: Get rid of casts for `jsmntok_t`

2020-04-16 Thread Daniel Kiper
On Thu, Apr 16, 2020 at 12:20:15PM +0200, Patrick Steinhardt wrote: > With the upstream change having landed that adds a name to the > previously anonymous `jsmntok` typedef, we can now add a forward > declaration for that struct in our code. As a result, we no longer have > to store the `tokens` m

Re: [PATCH 1/2] json: Update jsmn library to upstream commit 053d3cd

2020-04-16 Thread Daniel Kiper
On Thu, Apr 16, 2020 at 12:19:48PM +0200, Patrick Steinhardt wrote: > Update our embedded version of the jsmn library to upstream commit > 053d3cd (Merge pull request #175 from pks-t/pks/struct-type, > 2020-04-02). Does this commit contain all changes listed below? No more no less? If yes Reviewed

Re: [PATCH] luks2: Improve error reporting when decrypting/verifying key

2020-04-16 Thread Daniel Kiper
On Thu, Apr 16, 2020 at 12:19:55PM +0200, Patrick Steinhardt wrote: > While we already set up error messages in both `luks2_verify_key()` and > `luks2_decrypt_key()`, we do not ever print them. This makes it really > hard to discover why a given key actually failed to decrypt a disk. > > Improve th

[PATCH] luks2: Improve error reporting when decrypting/verifying key

2020-04-16 Thread Patrick Steinhardt
While we already set up error messages in both `luks2_verify_key()` and `luks2_decrypt_key()`, we do not ever print them. This makes it really hard to discover why a given key actually failed to decrypt a disk. Improve this by including the error message in the user-visible output. Signed-off-by:

[PATCH 2/2] json: Get rid of casts for `jsmntok_t`

2020-04-16 Thread Patrick Steinhardt
With the upstream change having landed that adds a name to the previously anonymous `jsmntok` typedef, we can now add a forward declaration for that struct in our code. As a result, we no longer have to store the `tokens` member of `struct grub_json` as a void pointer but can instead use the forwar

[PATCH 0/2] Update jsmn library to get rid of casts

2020-04-16 Thread Patrick Steinhardt
Hi, this is the first breakout of my previous patch series that updated jsmn and improved error reporting for luks2. I've split up the update of the embedded jsmn library header and our own changes to better explain why there's seemingly unrelated changes in the jsmn header that we don't really ne

[PATCH 1/2] json: Update jsmn library to upstream commit 053d3cd

2020-04-16 Thread Patrick Steinhardt
Update our embedded version of the jsmn library to upstream commit 053d3cd (Merge pull request #175 from pks-t/pks/struct-type, 2020-04-02). Signed-off-by: Patrick Steinhardt --- grub-core/lib/json/jsmn.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/grub-core/lib/js

Re: [PATCH 1/2] luks2: Improve error reporting when decrypting/verifying key

2020-04-16 Thread Patrick Steinhardt
On Thu, Apr 16, 2020 at 11:52:17AM +0200, Daniel Kiper wrote: > On Wed, Apr 15, 2020 at 10:52:53PM +0200, Patrick Steinhardt wrote: > > On Tue, Apr 14, 2020 at 08:12:22PM +0200, Daniel Kiper wrote: > > > On Tue, Apr 07, 2020 at 06:02:23PM +0200, Patrick Steinhardt wrote: > > > > While we already se

Re: [PATCH 1/2] luks2: Improve error reporting when decrypting/verifying key

2020-04-16 Thread Daniel Kiper
On Wed, Apr 15, 2020 at 10:52:53PM +0200, Patrick Steinhardt wrote: > On Tue, Apr 14, 2020 at 08:12:22PM +0200, Daniel Kiper wrote: > > On Tue, Apr 07, 2020 at 06:02:23PM +0200, Patrick Steinhardt wrote: > > > While we already set up error messages in both `luks2_verify_key()` and > > > `luks2_decr

Re: [PATCH 2/2] json: Update jsmn library to get rid of casts

2020-04-16 Thread Daniel Kiper
On Wed, Apr 15, 2020 at 10:55:51PM +0200, Patrick Steinhardt wrote: > On Tue, Apr 14, 2020 at 08:19:01PM +0200, Daniel Kiper wrote: > > On Tue, Apr 07, 2020 at 06:02:29PM +0200, Patrick Steinhardt wrote: > > > @@ -80,7 +80,7 @@ typedef struct { > > > * JSON parser. Contains an array of token bloc