[PATCH 09/10] kern: Make it possible to subtract conditions from debug=

2020-03-13 Thread Javier Martinez Canillas
From: Peter Jones This makes it so you can do set debug to "all,-scripting,-lexer" and get the obvious outcome. Any negation present will take preference over that conditional, so "all,-scripting,scripting" is the same thing as "all,-scripting". Signed-off-by: Peter Jones Signed-off-by: Javier

[PATCH 10/10] module-verifier: make it possible to run checkers on grub-module-verifierxx.c

2020-03-13 Thread Javier Martinez Canillas
From: Peter Jones This makes it so you can treat grub-module-verifierxx.c as a file you can build directly, so syntax checkers like vim's "syntastic" plugin, which uses "gcc -x c -fsyntax-only" to build it, will work. One still has to do whatever setup is required to make it pick the right inclu

[PATCH 08/10] templates: Output a menu entry for firmware setup on UEFI FastBoot systems

2020-03-13 Thread Javier Martinez Canillas
From: Steve Langasek If fastboot is enabled in the BIOS then often it is not possible to enter the firmware setup menu, add a menu entry for this. hdegoede: Cherry picked the Ubuntu patch from: https://git.launchpad.net/~ubuntu-core-dev/grub/+git/ubuntu/tree/debian/patches/uefi_firmware_setup.pa

[PATCH 07/10] kern/term: Accept ESC, F4 and holding SHIFT as user interrupt keys

2020-03-13 Thread Javier Martinez Canillas
From: Hans de Goede On some devices the ESC key is the hotkey to enter the BIOS/EFI setup screen, making it really hard to time pressing it right. Besides that ESC is also pretty hard to discover for a user who does not know it will unhide the menu. This commit makes F4, which used to be the hot

[PATCH 06/10] kern/term: Make grub_getkeystatus helper funtion available everywhere

2020-03-13 Thread Javier Martinez Canillas
From: Hans de Goede Move the grub_getkeystatus helper function from grub-core/commands/keystatus.c to grub-core/kern/term.c and export it so that it can be used outside of the keystatus command code too. Signed-off-by: Hans de Goede Signed-off-by: Javier Martinez Canillas --- grub-core/comm

[PATCH 05/10] efi/console: Implement getkeystatus() support

2020-03-13 Thread Javier Martinez Canillas
From: Hans de Goede Implement getkeystatus() support. Note that if a non-modifier key gets pressed and repeated calls to getkeystatus() are made then it will return the modifier status at the time of the non-modifier key, until that key-press gets consumed by a getkey() call. This is a side-eff

[PATCH 04/10] efi/console: Add grub_console_read_key_stroke() helper function

2020-03-13 Thread Javier Martinez Canillas
From: Hans de Goede This is a preparation patch for adding getkeystatus() support to the EFI console terminal input driver. We can get modifier status through the simple_text_input read_key_stroke method, but if a non-modifier key is (also) pressed the read_key_stroke call will consume that key

[PATCH 00/10] Another set of patches from Fedora

2020-03-13 Thread Javier Martinez Canillas
Hello, This is another set of somewhat small patches that we have been carrying in the Fedora package. I found that some of them have already been posted to the list, so for those patches I tried to address the issues pointed out in that version. I'm including all patches in the same set because

[PATCH 01/10] i386: Make pmtimer tsc calibration not take 51 seconds to fail

2020-03-13 Thread Javier Martinez Canillas
From: Peter Jones On my laptop running at 2.4GHz, if I run a VM where tsc calibration using pmtimer will fail presuming a broken pmtimer, it takes ~51 seconds to do so (as measured with the stopwatch on my phone), with a tsc delta of 0x1cd1c85300, or around 125 billion cycles. If instead of tryi

[PATCH 03/10] efi/console: Do not set text-mode until we actually need it

2020-03-13 Thread Javier Martinez Canillas
From: Hans de Goede If we're running with a hidden menu we may never need text mode, so do not change the video-mode to text until we actually need it. Signed-off-by: Hans de Goede Signed-off-by: Javier Martinez Canillas --- grub-core/term/efi/console.c | 74 +++-

[PATCH 02/10] efi/console: Move grub_console_set{colorstate, cursor} higher in the file

2020-03-13 Thread Javier Martinez Canillas
This is just a preparatory patch to move the functions higher in the file, since these will be called by the grub_prepare_for_text_output() function that will be introduced in a subsequent patch. Moving the functions will avoid a forward declaration in that next patch. Signed-off-by: Javier Marti

Re: avoiding quotes in kernel cmdline

2020-03-13 Thread Olaf Hering
Am Fri, 13 Mar 2020 15:26:33 +0100 schrieb Daniel Kiper : > Adding Vladimir. There is a chance that he knows why it was added... I just checked why this did not show up earlier. With 20190718T143316.4e75b2ae3 and command "linux ($root)/file var='str'" nothing is escaped. The command "linux ($ro

Re: avoiding quotes in kernel cmdline

2020-03-13 Thread Daniel Kiper
On Fri, Mar 13, 2020 at 03:20:08PM +0100, Olaf Hering wrote: > Am Fri, 13 Mar 2020 15:07:57 +0100 > schrieb Daniel Kiper : > > > Anyway, could you check what is going on and prepare a patch if needed? > > Sure I can wipe the offending lines from grub_create_loader_cmdline(). > The question is rath

Re: avoiding quotes in kernel cmdline

2020-03-13 Thread Olaf Hering
Am Fri, 13 Mar 2020 15:07:57 +0100 schrieb Daniel Kiper : > Anyway, could you check what is going on and prepare a patch if needed? Sure I can wipe the offending lines from grub_create_loader_cmdline(). The question is rather what the purpose of the new code added in 25953e10553dad2e378541a686

Re: avoiding quotes in kernel cmdline

2020-03-13 Thread Daniel Kiper
On Fri, Mar 13, 2020 at 01:32:12PM +0100, Olaf Hering wrote: > Am Fri, 13 Mar 2020 12:59:32 +0100 > schrieb Daniel Kiper : > > > Both var="\"str\"" and var="'str'" should work. Does not they? Do you > > still get backslashes in ${cmdline}? > > Yes. I think the issue might be the "final expansion" i

Re: [PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB

2020-03-13 Thread Daniel Kiper
On Fri, Mar 13, 2020 at 12:55:08PM +, Leif Lindholm wrote: > On Tue, Mar 10, 2020 at 19:58:28 +0100, Patrick Steinhardt wrote: > > By default, GRUB will allocate a quarter of the pages it got available > > in the EFI subsystem. On many current systems, this will amount to > > roughly 800MB of R

Re: [PATCH v3 3/5] argon2: Import Argon2 from cryptsetup

2020-03-13 Thread Daniel Kiper
On Tue, Mar 10, 2020 at 07:58:30PM +0100, Patrick Steinhardt wrote: > In order to support the Argon2 key derival function for LUKS2, we > obviously need to implement Argon2. It doesn't make a lot of sense to > hand-code any crypto, which is why this commit instead imports Argon2 > from the cryptset

Re: [PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB

2020-03-13 Thread Leif Lindholm
On Tue, Mar 10, 2020 at 19:58:28 +0100, Patrick Steinhardt wrote: > By default, GRUB will allocate a quarter of the pages it got available > in the EFI subsystem. On many current systems, this will amount to > roughly 800MB of RAM assuming an address space of 32 bits. This is > plenty for most use

Re: [PATCH v3 2/5] types.h: add UINT-related macros needed for Argon2

2020-03-13 Thread Daniel Kiper
On Tue, Mar 10, 2020 at 07:58:29PM +0100, Patrick Steinhardt wrote: > For the upcoming import of the Argon2 library, we need the macros > GRUB_UINT32_MAX, GRUB_UINT32_C and GRUB_UINT64_C. Add them as a > preparatory step. > > Signed-off-by: Patrick Steinhardt Reviewed-by: Daniel Kiper Daniel _

Re: [PATCH v3 1/5] efi: Always try to allocate heap size of 1.6GB

2020-03-13 Thread Daniel Kiper
On Tue, Mar 10, 2020 at 07:58:28PM +0100, Patrick Steinhardt wrote: > By default, GRUB will allocate a quarter of the pages it got available > in the EFI subsystem. On many current systems, this will amount to > roughly 800MB of RAM assuming an address space of 32 bits. This is > plenty for most us

Re: avoiding quotes in kernel cmdline

2020-03-13 Thread Olaf Hering
Am Fri, 13 Mar 2020 12:59:32 +0100 schrieb Daniel Kiper : > Both var="\"str\"" and var="'str'" should work. Does not they? Do you > still get backslashes in ${cmdline}? Yes. I think the issue might be the "final expansion" in the menuentry and/or linux command? # grub.cfg insmod part_msdos ins

Re: [PATCH v3 2/2] docs: Document notes on LVM cache booting

2020-03-13 Thread Daniel Kiper
On Wed, Mar 04, 2020 at 02:44:53PM +0800, Michael Chang wrote: > Add notes on LVM cache booting to the GRUB manual to help user understanding > the outstanding issue and status. > > Signed-off-by: Michael Chang Reviewed-by: Daniel Kiper Daniel ___ Gr

Re: [PATCH v3 1/2] lvm: add lvm cache logical volume handling

2020-03-13 Thread Daniel Kiper
On Wed, Mar 04, 2020 at 02:44:52PM +0800, Michael Chang wrote: > The lvm cache logical volume is the logical volume consisting of the original > and the cache pool logical volume. The original is usually on a larger and > slower storage device while the cache pool is on a smaller and faster one. Th

Re: avoiding quotes in kernel cmdline

2020-03-13 Thread Daniel Kiper
On Fri, Mar 13, 2020 at 12:02:50PM +0100, Olaf Hering wrote: > With code like this, the resulting kernel cmdline has backslashes before > either ' or ". > I think var="\"str\"" or var="'str'" has to be used to place either " or ' > into the variable. > How can I avoid the backslash in the kernel

avoiding quotes in kernel cmdline

2020-03-13 Thread Olaf Hering
With code like this, the resulting kernel cmdline has backslashes before either ' or ". I think var="\"str\"" or var="'str'" has to be used to place either " or ' into the variable. How can I avoid the backslash in the kernel cmdline? udev_rule="udev.rule=\"mac=${net_default_mac},name=uplink\""