Re: GRUB2,ECC

2020-04-22 Thread Daniel Kiper
On Sun, Apr 19, 2020 at 08:47:08PM +0800, 9. wrote: > Hi, have you considered making grub2 support ecc, and if so, when? > Thanks for reading and looking forward to your reply. > > I would like to add a few words to my question > ECC is an algorithm for encryption——Elliptic curve encryption algorit

Re: [PATCH] gitignore: Add a few forgotten files

2020-04-23 Thread Daniel Kiper
On Wed, Apr 22, 2020 at 10:31:35PM +0200, Hans Ulrich Niedermann wrote: > On Wed, 22 Apr 2020 21:54:14 +0200 > John Paul Adrian Glaubitz wrote: > > > On 4/22/20 9:44 PM, Hans Ulrich Niedermann wrote: > > > Signed-off-by: Hans Ulrich Niedermann > > > --- > > > .gitignore | 3 +++ > > > 1 file cha

Re: [PATCH 2/3] docs: Remove docs for non-existing pxe_unload command

2020-04-23 Thread Daniel Kiper
moved in commit > 71a78acb0648d3d73c95ab0f021f907499aacc0 (from 2011-07-05). > > Signed-off-by: Hans Ulrich Niedermann Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: 119 grub commands not documented in grub.texi

2020-04-23 Thread Daniel Kiper
On Wed, Apr 22, 2020 at 09:29:13PM +0200, Hans Ulrich Niedermann wrote: > On Wed, 22 Apr 2020 12:10:31 +0200 > Daniel Kiper wrote: > > > On Sat, Apr 18, 2020 at 12:53:12PM +0200, Hans Ulrich Niedermann > > wrote: > > > I have noticed that there are two commands docum

Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB

2020-04-23 Thread Daniel Kiper
istency with the rest > > > of the script. > > > > > > + exit 77 > > > +fi > > > > Adrian, > > > > thanks. Attached v2 patch. > > Any chance this could be merged ? Thanks. Sorry, somehow I have missed your patch. Next time please u

Re: [PATCH RFC/RFT 0/3] Add grub loader support for RISC-V Linux

2020-04-27 Thread Daniel Kiper
On Mon, Apr 27, 2020 at 08:15:41AM +0200, Ard Biesheuvel wrote: > On Sun, 26 Apr 2020 at 21:40, Atish Patra wrote: > > > > This series adds grub loader support for RISC-V Linux. Thanks to the awesome > > initial RISC-V support added by Alex, we just needed a loader for RISC-V to > > load and execu

Re: [PATCH 1/5] gitignore: Group patterns with and without slash

2020-04-27 Thread Daniel Kiper
On Fri, Apr 24, 2020 at 12:43:47AM +0200, Hans Ulrich Niedermann wrote: > Group the .gitignore patterns into two groups: > > * Patterns including a slash, i.e. matching only relative to the > .gitignore file's directory. > > * Pattern not including a slash, i.e. matching files anywhere in >

Re: [PATCH 3/5] gitignore: Consistent leading slash is easier to read

2020-04-27 Thread Daniel Kiper
On Fri, Apr 24, 2020 at 12:43:49AM +0200, Hans Ulrich Niedermann wrote: > As all gitignore patterns containing a left or middle slash match > only relative to the .gitignore file's directory, we write them > all in the same manner with a leading slash. Ehhh... And this commit message makes me thin

Re: [PATCH 1/5] gitignore: Group patterns with and without slash

2020-04-27 Thread Daniel Kiper
On Mon, Apr 27, 2020 at 01:20:35PM +0200, Daniel Kiper wrote: > On Fri, Apr 24, 2020 at 12:43:47AM +0200, Hans Ulrich Niedermann wrote: > > Group the .gitignore patterns into two groups: > > > > * Patterns including a slash, i.e. matching only relative to the > >

Re: [PATCH 0/5] gitignore: Clean up most of the gitignore mess

2020-04-27 Thread Daniel Kiper
On Fri, Apr 24, 2020 at 12:43:46AM +0200, Hans Ulrich Niedermann wrote: > Daniel Kiper has asked me to provide the following set of four patches: > > 1. Split patterns into two groups. > 2. Alphabetically sort the patterns within each group. > 3. Add / to patterns which

Re: How to submit patches and patchsets via grub-devel

2020-04-27 Thread Daniel Kiper
Daniel and Eli, thank you for nice explanations. I would like to add just a thew things... On Thu, Apr 23, 2020 at 11:17:40AM -0400, Eli Schwartz wrote: > On 4/23/20 10:20 AM, Hans Ulrich Niedermann wrote: > > Hello, > > > > as I am continuing to flood this mailing list with patches, I am > > real

Re: [PATCH] Don't run f2fs test on systems with PAGE_SIZE > 4KB

2020-04-27 Thread Daniel Kiper
On Sun, Apr 26, 2020 at 12:53:35AM -0400, Mike Gilbert wrote: > On Thu, Apr 23, 2020 at 5:10 AM Anatoly Pugachev wrote: > > > > On Tue, Jul 30, 2019 at 3:10 PM Anatoly Pugachev wrote: > > > > > > On Tue, Jul 30, 2019 at 1:00 PM John Paul Adrian Glaubitz > > > wrote: > > > > On 7/30/19 10:11 AM,

[GRUB PATCH RFC 04/18] i386/memory: Rename PAGE_SHIFT to GRUB_PAGE_SHIFT

2020-05-04 Thread Daniel Kiper
..to avoid potential conflicts and confusion. Signed-off-by: Daniel Kiper --- grub-core/lib/i386/xen/relocator.S | 6 +++--- grub-core/lib/x86_64/xen/relocator.S | 4 ++-- grub-core/loader/i386/xen.c | 28 ++-- include/grub/i386/memory.h | 2 +- 4

[GRUB PATCH RFC 17/18] i386/txt: Add Intel TXT verification routines

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- grub-core/loader/i386/txt/verify.c | 297 + 1 file changed, 297 insertions(+) create mode 100644 grub-core/loader/i386/txt/verify.c diff --git a/grub-core/loader/i386/txt

[GRUB PATCH RFC 16/18] i386/txt: Add Intel TXT ACM module support

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- grub-core/loader/i386/txt/acmod.c | 575 ++ 1 file changed, 575 insertions(+) create mode 100644 grub-core/loader/i386/txt/acmod.c diff --git a/grub-core/loader/i386/txt

[GRUB PATCH RFC 02/18] i386/msr: Rename grub_msr_read() and grub_msr_write()

2020-05-04 Thread Daniel Kiper
.. to grub_rdmsr() and grub_wrmsr() respectively. New names are more obvious than older ones. Signed-off-by: Daniel Kiper --- grub-core/commands/i386/rdmsr.c | 2 +- grub-core/commands/i386/wrmsr.c | 2 +- include/grub/i386/msr.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions

[GRUB PATCH RFC 07/18] i386/tpm: Rename tpm module to tpm_verifier

2020-05-04 Thread Daniel Kiper
..to avoid naming collision with TPM TIS and CRB driver introduced by subsequent patch. Signed-off-by: Daniel Kiper --- docs/grub.texi | 15 --- grub-core/Makefile.core.def | 4 ++-- grub-core/commands/{tpm.c => tpm_verifier.c} |

[GRUB PATCH RFC 05/18] i386/memory: Rename PAGE_SIZE to GRUB_PAGE_SIZE and make it global

2020-05-04 Thread Daniel Kiper
Subsequent patches will use that constant. Signed-off-by: Daniel Kiper --- grub-core/loader/i386/xen.c | 35 +-- include/grub/i386/memory.h | 1 + 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader

[GRUB PATCH RFC 03/18] i386/msr: Extract and improve MSR support detection code

2020-05-04 Thread Daniel Kiper
GRUB_ERR_BAD_DEVICE instead of GRUB_ERR_BUG to signal an error because errors encountered by this new routine are not bugs. Signed-off-by: Daniel Kiper --- grub-core/commands/i386/rdmsr.c | 21 + grub-core/commands/i386/wrmsr.c | 21 + include/grub/i386/msr.h | 29

[GRUB PATCH RFC 00/18] i386: Intel TXT secure launcher

2020-05-04 Thread Daniel Kiper
Hi, This is an RFC patchset for the GRUB introducing the Intel TXT secure launcher. This is a part of larger work known as the TrenchBoot. Patchset can be split into two distinct parts: - 01-12: preparatory patches, - 13-18: the Intel TXT secure launcher itself. The initial implementation of

[GRUB PATCH RFC 09/18] efi: Make shim_lock GUID and protocol type public

2020-05-04 Thread Daniel Kiper
The GUID will be used to properly detect and report UEFI Secure Boot status to the x86 Linux kernel. The functionality will be added by subsequent patches. The shim_lock protocol type is made public for completeness. Additionally, fix formatting of four preceding GUIDs. Signed-off-by: Daniel

[GRUB PATCH RFC 01/18] i386/msr: Merge rdmsr.h and wrmsr.h into msr.h

2020-05-04 Thread Daniel Kiper
It does not make sense to have separate headers for separate static functions. Additionally, we have to add some constants with MSR addresses in subsequent patches. So, make one common place to store them. Signed-off-by: Daniel Kiper --- grub-core/commands/i386/rdmsr.c | 2 +- grub-core

[GRUB PATCH RFC 06/18] mmap: Add grub_mmap_get_lowest() and grub_mmap_get_highest()

2020-05-04 Thread Daniel Kiper
The functions calculate lowest and highest available RAM addresses respectively. Both functions are needed to calculate PMR boundaries for Intel TXT secure launcher introduced by subsequent patches. Signed-off-by: Daniel Kiper --- grub-core/mmap/mmap.c | 64

[GRUB PATCH RFC 14/18] i386/txt: Add Intel TXT definitions header file

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- include/grub/i386/txt.h | 690 1 file changed, 690 insertions(+) create mode 100644 include/grub/i386/txt.h diff --git a/include/grub/i386/txt.h b/include/grub

[GRUB PATCH RFC 10/18] efi: Return grub_efi_status_t from grub_efi_get_variable()

2020-05-04 Thread Daniel Kiper
This is needed to properly detect and report UEFI Secure Boot status to the x86 Linux kernel. The functionality will be added by subsequent patches. Signed-off-by: Daniel Kiper --- grub-core/commands/efi/efifwsetup.c | 8 grub-core/kern/efi/efi.c| 16 +--- grub

[GRUB PATCH RFC 08/18] i386/tpm: Add TPM TIS and CRB driver

2020-05-04 Thread Daniel Kiper
It will be used by Intel TXT secure launcher introduced by subsequent patches. Signed-off-by: Daniel Kiper --- grub-core/commands/i386/tpm.c | 182 ++ include/grub/i386/tpm.h | 36 + 2 files changed, 218 insertions(+) create mode 100644

[GRUB PATCH RFC 11/18] efi: Add a function to read EFI variables with attributes

2020-05-04 Thread Daniel Kiper
It will be used to properly detect and report UEFI Secure Boot status to the x86 Linux kernel. The functionality will be added by subsequent patches. Signed-off-by: Ignat Korchagin Signed-off-by: Daniel Kiper --- grub-core/kern/efi/efi.c | 16 +--- include/grub/efi/efi.h | 5

[GRUB PATCH RFC 12/18] i386/efi: Report UEFI Secure Boot status to the Linux kernel

2020-05-04 Thread Daniel Kiper
Otherwise the kernel does not know its state and cannot enable various security features depending on UEFI Secure Boot. Signed-off-by: Ignat Korchagin Signed-off-by: Daniel Kiper --- grub-core/loader/i386/linux.c | 86 ++- include/grub/i386/linux.h

[GRUB PATCH RFC 13/18] i386/slaunch: Add basic platform support for secure launch

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- include/grub/i386/cpuid.h | 13 include/grub/i386/crfr.h | 186 ++ include/grub/i386/mmio.h | 90 ++ include/grub/i386/msr.h | 61

[GRUB PATCH RFC 18/18] i386/slaunch: Add secure launch framework and commands

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- grub-core/Makefile.am| 3 + grub-core/Makefile.core.def | 15 +++ grub-core/lib/i386/relocator32.S | 8 ++ grub-core/loader/i386/bsd.c | 7 ++ grub-core/loader/i386/linux.c| 206

[GRUB PATCH RFC 15/18] i386/txt: Add Intel TXT core implementation

2020-05-04 Thread Daniel Kiper
From: Ross Philipson Signed-off-by: Ross Philipson Signed-off-by: Daniel Kiper --- grub-core/loader/i386/txt/txt.c | 887 include/grub/i386/memory.h | 5 + 2 files changed, 892 insertions(+) create mode 100644 grub-core/loader/i386/txt/txt.c

Re: [GRUB PATCH RFC 12/18] i386/efi: Report UEFI Secure Boot status to the Linux kernel

2020-05-06 Thread Daniel Kiper
On Tue, May 05, 2020 at 10:29:05AM -0700, Matthew Garrett wrote: > On Mon, May 4, 2020 at 4:25 PM Daniel Kiper wrote: > > > > Otherwise the kernel does not know its state and cannot enable various > > security features depending on UEFI Secure Boot. > > I think this

Re: [GRUB PATCH RFC 12/18] i386/efi: Report UEFI Secure Boot status to the Linux kernel

2020-05-07 Thread Daniel Kiper
On Wed, May 06, 2020 at 11:36:49AM -0700, Matthew Garrett wrote: > On Wed, May 6, 2020 at 6:33 AM Daniel Kiper wrote: > > > > On Tue, May 05, 2020 at 10:29:05AM -0700, Matthew Garrett wrote: > > > On Mon, May 4, 2020 at 4:25 PM Daniel Kiper > > > wrote: > >

Re: [GRUB PATCH RFC 00/18] i386: Intel TXT secure launcher

2020-05-07 Thread Daniel Kiper
Hi Łukasz, On Tue, May 05, 2020 at 04:38:02PM +0200, Lukasz Hawrylko wrote: > On Tue, 2020-05-05 at 01:21 +0200, Daniel Kiper wrote: > > Hi, > > > > This is an RFC patchset for the GRUB introducing the Intel TXT secure > > launcher. > > This is a part of la

Re: [PATCH 4/5 v2] gitignore: Add leading slashes where appropriate

2020-05-07 Thread Daniel Kiper
would split this patch into two. Other patches looks good. So, if you split this patch you can add to all patches Reviewed-by: Daniel Kiper > Some gitignore patterns like ".deps/" or "Makefile" clearly should > match everywhere, so those definitively need no leading slas

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

2020-05-07 Thread Daniel Kiper
On Thu, Apr 16, 2020 at 03:56:08PM -0700, Zide Chen wrote: > 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. First of all, the commit message should say what the patch does and why. Just i

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

2020-05-11 Thread Daniel Kiper
On Thu, May 07, 2020 at 09:31:24PM +, Chen, Zide wrote: > Hi Daniel, > > Thank you very much for your review! Comments inline: > > Best Regards, > Zide > > > -Original Message- > > From: Daniel Kiper > > Sent: Thursday, May 7, 2020 5:54 AM

Re: [PATCH v4 0/6] gitignore: Clean up most of the gitignore mess

2020-05-11 Thread Daniel Kiper
On Thu, May 07, 2020 at 11:33:14PM +0200, Hans Ulrich Niedermann wrote: > This cleans up most of the gitignore mess according to Daniel Kiper's > suggestions: > > 1. Consistently add leading slash to all patterns matching relative > to .gitignore > 2. Group patterns matching everywhere in

Re: Call to grub_file_read fails in grub_multiboot_load_elf64

2020-05-11 Thread Daniel Kiper
Adding Leif and Ard, On Sun, May 03, 2020 at 09:17:50PM +0100, Chris Plant via Grub-devel wrote: > Hello, > > I'm fairly new to grub coding, and I'm trying to get multiboot2 working > on the arm64-efi target for an OS project. However, I'm running up > against an issue with a call to grub_file_rea

Re: [PATCH] mips/cache: Add missing nop's in delay slots

2020-05-11 Thread Daniel Kiper
On Mon, Apr 27, 2020 at 05:31:46PM +0200, Vladimir 'phcoder' Serbinenko wrote: > Lack of them causes random instructions to be executed before the > jump really happens. > > Signed-off-by: Vladimir Serbinenko Reviewed-by:

Re: [PATCH v2] Warn if MBR gap is small and user uses advanced modules

2020-05-12 Thread Daniel Kiper
On Mon, Apr 27, 2020 at 05:51:34PM +0200, Vladimir 'phcoder' Serbinenko wrote: > We don't want to support small MBR gap in pair with anything but > the simplest config of biosdisk+part_msdos+simple filesystem. In this > path "simple filesystems" are all current filesystems except zfs and > btrfs.

[PATCH v3 4/5] INSTALL: Update configure example

2020-05-13 Thread Daniel Kiper
..to make it more relevant. Signed-off-by: Daniel Kiper --- INSTALL | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/INSTALL b/INSTALL index 5cea313af..dedf236a8 100644 --- a/INSTALL +++ b/INSTALL @@ -160,12 +160,20 @@ For this example the configure line

[PATCH v3 2/5] configure: Set gnu99 C language standard by default

2020-05-13 Thread Daniel Kiper
x27;s live with gnu99 until we discover that we strongly require a feature from newer C standard. The user is still able to override C language standard using relevant *_CFLAGS variables. Signed-off-by: Daniel Kiper --- v3 - suggestions/fixes: - add a comment before the change in configur

[PATCH v3 1/5] configure: Drop unneeded TARGET_CFLAGS expansion

2020-05-13 Thread Daniel Kiper
Signed-off-by: Daniel Kiper Reviewed-by: Javier Martinez Canillas --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 88c0adbae..b2576b013 100644 --- a/configure.ac +++ b/configure.ac @@ -77,7 +77,7 @@ grub_TRANSFORM([grub-file

[PATCH v3 5/5] autogen: Replace -iname with -ipath in find command

2020-05-13 Thread Daniel Kiper
..because -iname cannot be used to match paths. Signed-off-by: Daniel Kiper Reviewed-by: Javier Martinez Canillas --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index ef43270fc..31b0ced7e 100755 --- a/autogen.sh +++ b/autogen.sh

[PATCH v3 0/5] Various build and doc fixes

2020-05-13 Thread Daniel Kiper
Hey, As in subject... Please review... Daniel INSTALL | 47 +++ autogen.sh | 2 +- configure.ac | 19 ++- 3 files changed, 46 insertions(+), 22 deletions(-) Daniel Kiper (5): configure: Drop unneeded TARGET_CFLAGS

[PATCH v3 3/5] INSTALL/configure: Update install doc and configure comment

2020-05-13 Thread Daniel Kiper
..to reflect the GRUB build reality in them. Additionally, fix text formatting a bit. Signed-off-by: Daniel Kiper --- v3 - suggestions/fixes: - improve wording of changed text (suggested by Leif Lindholm), - drop configure example change from this patch. --- INSTALL | 27

Re: [PATCH] envblk: Fix buffer overrun when attempting to shrink a variable value

2020-05-13 Thread Daniel Kiper
t; malloc(): corrupted top size > Aborted (core dumped) > > $ wc -c env > 0 grubenv > > Reported-by: Renaud Métrich > Signed-off-by: Javier Martinez Canillas Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH] verifiers: Add verify string debug message

2020-05-13 Thread Daniel Kiper
On Wed, May 13, 2020 at 04:53:41PM +0800, Tianjia Zhang wrote: > Like grub_verifiers_open(), the grub_verify_string() should also > display this debug message, which is very helpful for debugging. > > Signed-off-by: Tianjia Zhang Reviewed-by: Daniel Ki

Re: [PATCH] tpm: Remove redundant function grub_tpm_measure

2020-05-13 Thread Daniel Kiper
On Wed, May 13, 2020 at 04:53:53PM +0800, Tianjia Zhang wrote: > The grub_tpm_measure() is only used by tpm.c, and this function > is the simple wrapper of grub_tpm_event_log(). So remove it and > keep the code cleaner. > > Signed-off-by: Tianjia Zhang I would prefer if you drop existing grub_tpm

Re: [PATCH] docs/grub: Support for probing partition UUID on MSDOS disks

2020-05-13 Thread Daniel Kiper
Jacob Kroon ...otherwise Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH v4 2/3] docs: Remove docs for non-existing pxe_unload command

2020-05-13 Thread Daniel Kiper
moved in commit > 71a78acb0648d3d73c95ab0f021f907499aacc0 (from 2011-07-05). It seems to me you though about commit 671a78acb (cleanup pxe and efi network release). I will fix it before push... > Signed-off-by: Hans Ulrich Niedermann Reviewed-by: Daniel Kiper Daniel ___

Re: [PATCH v4 3/3] docs: Remove docs for non-existing uppermem command

2020-05-13 Thread Daniel Kiper
emented despite > former plans to add an uppermem command. > > To reduce user confusion, this even removes the paragraph > describing how GRUB's uppermem command was supposed to > complement the Linux kernel's mem= parameter. > > Signed-off-by: Hans Ulrich N

Re: [PATCH v2] tpm: Rename function grub_tpm_log_event to grub_tpm_measure

2020-05-13 Thread Daniel Kiper
: Tianjia Zhang Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [MULTIBOOT2 SPEC PATCH V2] multiboot2: Add module load and preference tag

2020-05-13 Thread Daniel Kiper
On Thu, May 07, 2020 at 03:09:23PM -0700, Zide Chen wrote: > In the cases of users have preferences over Multiboot2 module load > addresses, currently GRUB has no way to achieve it. > > Similar to the relocatable header tag, this new tag allows users to > specify the minimum and maximum load addres

Re: [MULTIBOOT2 SPEC PATCH v3 1/4] multiboot2: Allow autogen.sh to run with current gnulib

2020-05-13 Thread Daniel Kiper
f 2.59 (release 2.59 tagged in 2003-11, 2.59d in 2006-06) > should not affect too many systems in 2020. > > Signed-off-by: Hans Ulrich Niedermann Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.

Re: [MULTIBOOT2 SPEC PATCH v3 2/4] multiboot2: Use .gitignore files

2020-05-13 Thread Daniel Kiper
On Fri, May 08, 2020 at 06:50:47AM +0200, Hans Ulrich Niedermann wrote: > Add .gitignore file and remove the obsolete .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 the su

Re: [MULTIBOOT2 SPEC PATCH v3 3/4] multiboot2: Make example kernel build at least for i386

2020-05-13 Thread Daniel Kiper
On Fri, May 08, 2020 at 06:50:48AM +0200, Hans Ulrich Niedermann wrote: > The example kernel has assembly language boot code for both > i386 and mips, but the mips assembly code used to be built > unconditionally, even if the build is using non-mips build > tools such as for x86_64 or i386. > > Thi

Re: [MULTIBOOT2 SPEC PATCH v3 4/4] multiboot2: fix example kernel header tag alignment

2020-05-13 Thread Daniel Kiper
On Fri, May 08, 2020 at 06:50:49AM +0200, Hans Ulrich Niedermann wrote: > Properly align all Multiboot2 header tags to 8 byte > boundaries as per the Multiboot2 specification. > > Note that the assembler directive ".align 8" is machine > dependent: On i386, it means "align to 8 byte boundary". > On

Re: [PATCH v3 0/5] Various build and doc fixes

2020-05-15 Thread Daniel Kiper
On Wed, May 13, 2020 at 01:49:59PM +0100, Leif Lindholm wrote: > On Wed, May 13, 2020 at 14:02:46 +0200, Daniel Kiper wrote: > > Hey, > > > > As in subject... Please review... > > Hi Daniel, > > This looks good to me. Great! > For the series: > Reviewed-by

Re: [PATCH v3 2/5] configure: Set gnu99 C language standard by default

2020-05-18 Thread Daniel Kiper
Hi Daniel, Adding Patrick... On Fri, May 15, 2020 at 11:56:56AM +1000, Daniel Axtens wrote: > Hi Daniel, > > > Commit d5a32255d (misc: Make grub_strtol() "end" pointers have safer > > const qualifiers) introduced "restrict" keyword into some functions > > definitions. This keyword was introduced

Re: [PATCH v2] net: break out nested function

2020-05-20 Thread Daniel Kiper
Search for specific > > config files for netboot") added a nested function which caused the build > > to break when compiling with clang. > > > > Break that out into a static helper function to make the code portable > > again. > > Works for me. &

Re: [PATCH] tpm: Enable module for all EFI platforms

2020-05-20 Thread Daniel Kiper
On Tue, May 19, 2020 at 11:20:59AM +0200, Javier Martinez Canillas wrote: > The module is only enabled for x86_64, but there's nothing specific to > x86_64 in the implementation and can be enabled for all EFI platforms. > > Signed-off-by: Javier Martinez Canillas Reviewed

Re: [GRUB PATCH 0/2] Better Xen support

2020-05-20 Thread Daniel Kiper
we are carrying some patches. Here they are > for your consideration. > > Regards, Ian. > > Ian Jackson (2): > 20_linux_xen: Ignore xenpolicy and config files too > 20_linux_xen: Support Xen Security Modules (XSM/FLASK) Reviewed-by: Daniel Kiper Daniel _

Re: [PATCH] Fix 32-bit ARM handling of the CTR register

2020-05-25 Thread Daniel Kiper
Signed-off-by: Marc Zyngier > > This patch has the added benfit that it gets rid of a (gnu-specific) > case range. > > Reviewed-by: Leif Lindholm > Thanks! Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH 6/6] efi/tpm: Fix typo in grub_efi_tpm2_protocol struct

2020-05-25 Thread Daniel Kiper
Rename get_active_pcr_blanks() to get_active_pcr_banks(). Signed-off-by: Daniel Kiper --- include/grub/efi/tpm.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grub/efi/tpm.h b/include/grub/efi/tpm.h index 3ea6b4de1..ec39725c0 100644 --- a/include/grub/efi

[PATCH 1/6] grub-install: Fix inverted test for NLS enabled when copying locales

2020-05-25 Thread Daniel Kiper
From: Martin Whitaker Commit 3d8439da8 (grub-install: Locale depends on nls) attempted to avoid copying locale files to the target directory when NLS was disabled. However the test is inverted, and it does the opposite. Signed-off-by: Martin Whitaker Signed-off-by: Daniel Kiper --- util/grub

[PATCH 4/6] tpm: Drop unneeded code

2020-05-25 Thread Daniel Kiper
Drop unused grub_tpm*_execute() and declaration of nonexistent grub_tpm_init(). Signed-off-by: Daniel Kiper --- grub-core/commands/efi/tpm.c | 97 include/grub/tpm.h | 3 -- 2 files changed, 100 deletions(-) diff --git a/grub-core

[PATCH 2/6] net/http: Return an error on HTTP error responses

2020-05-25 Thread Daniel Kiper
From: Olaf Hering A http transfer will hang if an error is returned. The error branch returns the value GRUB_ERR_NONE which is not expected by the caller. Signed-off-by: Olaf Hering Signed-off-by: Daniel Kiper --- grub-core/net/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 5/6] i386/efi/init: Drop bogus include

2020-05-25 Thread Daniel Kiper
Signed-off-by: Daniel Kiper --- grub-core/kern/i386/efi/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/grub-core/kern/i386/efi/init.c b/grub-core/kern/i386/efi/init.c index da499aba0..a28316cc6 100644 --- a/grub-core/kern/i386/efi/init.c +++ b/grub-core/kern/i386/efi/init.c @@ -27,7

[PATCH 0/6] GRUB: Bundle of various fixes and cleanups

2020-05-25 Thread Daniel Kiper
| 4 ++-- include/grub/efi/tpm.h | 8 include/grub/tpm.h | 3 --- util/grub-install-common.c | 4 ++-- 7 files changed, 9 insertions(+), 111 deletions(-) Daniel Kiper (4): docs: Fix devicetree command description tpm: Drop unneeded code i386/efi

[PATCH 3/6] docs: Fix devicetree command description

2020-05-25 Thread Daniel Kiper
Specifically fix the subsection and drop bogus reference to the GNU/Linux. Reported-by: Patrick Higgins Signed-off-by: Daniel Kiper --- docs/grub.texi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/grub.texi b/docs/grub.texi index 1ce9993a5..83fbc07e8 100644 --- a

Re: Bug#912846: grub2: stop depending on ttf-dejavu-core

2020-05-26 Thread Daniel Kiper
Hi, In general I am OK with the patch. However, I want to ask you to respot it using "git send-email". Additionally, please add proper commit message and your SOB. Daniel On Sat, May 23, 2020 at 06:02:35PM +0200, Fabian Greffrath wrote: > Control: forwarded -1 grub-devel@gnu.org > Control: tags

[BOOTLOADER SPECIFICATION RFC] The bootloader log format for TrenchBoot and others

2020-05-29 Thread Daniel Kiper
Hey, Below you can find my rough idea of the bootloader log format which is generic thing but initially will be used for TrenchBoot work. I discussed this proposal with Ross and Daniel S. So, the idea went through initial sanitization. Now I would like to take feedback from other folks too. So, pl

Re: [PATCH REBASED] verify: search keyid in hashed signature subpackets

2020-05-29 Thread Daniel Kiper
On Fri, May 29, 2020 at 02:10:46PM +1000, Daniel Axtens wrote: > Charles Duffy writes: > > > Amended the test repo to apply this patch; it applies and works-as-intended > > on both 2.04 and current master. > > > > As for the DCO assertions, my portion of the contribution was implemented > > strict

Re: [PATCH 2/6] net/http: Return an error on HTTP error responses

2020-05-29 Thread Daniel Kiper
On Thu, May 28, 2020 at 09:10:59AM +0200, Javier Martinez Canillas wrote: > On 5/25/20 9:02 PM, Daniel Kiper wrote: > > From: Olaf Hering > > > > A http transfer will hang if an error is returned. The error branch > > returns the value GRUB_ERR_NONE which is

Re: [PATCH 4/6] tpm: Drop unneeded code

2020-05-29 Thread Daniel Kiper
On Thu, May 28, 2020 at 09:22:34AM +0200, Javier Martinez Canillas wrote: > On 5/25/20 9:02 PM, Daniel Kiper wrote: > > Drop unused grub_tpm*_execute() and declaration of nonexistent > > grub_tpm_init(). > > > > Signed-off-by: Daniel Kiper > > --- &g

Re: [PATCH] json: Remove invalid typedef redefinition

2020-05-29 Thread Daniel Kiper
, we have exactly > such a forward-declaring typedef in "json.h". If enforcing the GNU99 C > standard, clang may generate a warning about this non-standard > construct. > > Fix the issue by using a simple `struct jsmntok` forward declaration > instead of using a typede

Re: GRUB 2.06 release

2020-05-29 Thread Daniel Kiper
On Wed, Apr 22, 2020 at 12:24:40PM +0200, Daniel Kiper wrote: > On Mon, Mar 16, 2020 at 05:41:29PM +0100, Daniel Kiper wrote: > > On Wed, Mar 11, 2020 at 11:47:35AM +0100, Daniel Kiper wrote: > > > On Tue, Mar 03, 2020 at 06:26:03PM +0100, Daniel Kiper wrote: > > > >

Re: [BOOTLOADER SPECIFICATION RFC] The bootloader log format for TrenchBoot and others

2020-06-01 Thread Daniel Kiper
On Fri, May 29, 2020 at 10:11:40AM -0700, Andy Lutomirski wrote: > > On May 29, 2020, at 4:30 AM, Daniel Kiper wrote: > > > > Hey, > > > > Below you can find my rough idea of the bootloader log format which is > > generic thing but initially will be used for T

[SECURITY PATCH 02/28] safemath: Add some arithmetic primitives that check for overflow

2020-07-29 Thread Daniel Kiper
is not modified. Otherwise, false is returned and the operation is executed. These arithmetic primitives require newer compiler versions. So, bump these requirements in the INSTALL file too. Signed-off-by: Peter Jones Reviewed-by: Daniel Kiper --- INSTALL | 22

[SECURITY PATCH 01/28] yylex: Make lexer fatal errors actually be fatal

2020-07-29 Thread Daniel Kiper
_FATAL_ERROR() to actually be fatal, and the things they do if it returns after calling it are wildly unsafe. Fixes: CVE-2020-10713 Signed-off-by: Peter Jones Reviewed-by: Daniel Kiper --- grub-core/script/yylex.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gr

[SECURITY PATCH 03/28] calloc: Make sure we always have an overflow-checking calloc() available

2020-07-29 Thread Daniel Kiper
-by: Daniel Kiper --- grub-core/kern/emu/misc.c | 12 grub-core/kern/emu/mm.c| 10 ++ grub-core/kern/mm.c| 40 ++ grub-core/lib/libgcrypt_wrap/mem.c | 11 +-- grub-core/lib/posix_wrap/stdlib.h

[SECURITY PATCH 06/28] iso9660: Don't leak memory on realloc() failures

2020-07-29 Thread Daniel Kiper
From: Peter Jones Signed-off-by: Peter Jones Reviewed-by: Daniel Kiper --- grub-core/fs/iso9660.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c index 7ba5b300b..5ec4433b8 100644 --- a/grub-core/fs

[SECURITY PATCH 12/28] term: Fix overflow on user inputs

2020-07-29 Thread Daniel Kiper
is to just to disallow overwrites input_buf, which exactly what this patch does. Fixes: CID 292449 Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Daniel Kiper --- grub-core/term/terminfo.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/grub-core/term/term

[SECURITY PATCH 04/28] calloc: Use calloc() at most places

2020-07-29 Thread Daniel Kiper
luks_recover_key() reported by Chris Coulson, - allocation of integer overflow in grub_lvm_detect() reported by Chris Coulson. Fixes: CVE-2020-14308 Signed-off-by: Peter Jones Reviewed-by: Daniel Kiper --- grub-core/bus/usb/usbhub.c| 8 grub-core/commands/efi

[SECURITY PATCH 08/28] gfxmenu: Fix double free in load_image()

2020-07-29 Thread Daniel Kiper
From: Alexey Makhalov self->bitmap should be zeroed after free. Otherwise, there is a chance to double free (USE_AFTER_FREE) it later in rescale_image(). Fixes: CID 292472 Signed-off-by: Alexey Makhalov Reviewed-by: Daniel Kiper --- grub-core/gfxmenu/gui_image.c | 5 - 1 file changed

[SECURITY PATCH 07/28] font: Do not load more than one NAME section

2020-07-29 Thread Daniel Kiper
Signed-off-by: Daniel Kiper Reviewed-by: Jan Setje-Eilers --- grub-core/font/font.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/grub-core/font/font.c b/grub-core/font/font.c index 5edb477ac..d09bb38d8 100644 --- a/grub-core/font/font.c +++ b/grub-core/font/font.c @@ -532,6 +532,12

[SECURITY PATCH 05/28] malloc: Use overflow checking primitives where we do complex allocations

2020-07-29 Thread Daniel Kiper
: Peter Jones Reviewed-by: Daniel Kiper --- grub-core/commands/legacycfg.c | 29 +++- grub-core/commands/wildcard.c | 36 - grub-core/disk/ldm.c | 32 ++ grub-core/font/font.c | 7 +- grub-core/fs/btrfs.c

[SECURITY PATCH 14/28] multiboot2: Fix memory leak if grub_create_loader_cmdline() fails

2020-07-29 Thread Daniel Kiper
From: Konrad Rzeszutek Wilk Fixes: CID 292468 Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Daniel Kiper --- grub-core/loader/multiboot_mbi2.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c

[SECURITY PATCH 27/28] loader/linux: Avoid overflow on initrd size calculation

2020-07-29 Thread Daniel Kiper
From: Peter Jones Signed-off-by: Peter Jones Reviewed-by: Daniel Kiper --- grub-core/loader/linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grub-core/loader/linux.c b/grub-core/loader/linux.c index 471b214d6..4cd8c20c7 100644 --- a/grub-core/loader/linux.c +++ b

[SECURITY PATCH 10/28] json: Avoid a double-free when parsing fails.

2020-07-29 Thread Daniel Kiper
dates the documentation for it to make it clear that callers are responsible for ensuring that the string outlives the root JSON object. Fixes: CID 292465 Signed-off-by: Chris Coulson Reviewed-by: Daniel Kiper --- grub-core/lib/json/json.c | 9 +++-- grub-core/lib/json/json.h | 5 - 2

[SECURITY PATCH 11/28] lzma: Make sure we don't dereference past array

2020-07-29 Thread Daniel Kiper
far out so we check if the position found is greater or equal kNumLenToPosStates (4) and bail out. N.B.: Upstream LZMA 18.05 and later has this function completely rewritten without any history. Fixes: CID 51526 Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Daniel Kiper --- grub-core/lib/L

[SECURITY PATCH 19/28] script: Avoid a use-after-free when redefining a function during execution

2020-07-29 Thread Daniel Kiper
existing configurations because they can't be dependent on the current behaviour without being broken. Fixes: CVE-2020-15706 Signed-off-by: Chris Coulson Reviewed-by: Daniel Kiper --- grub-core/script/execute.c | 2 ++ grub-core/script/function.c | 16 +--- grub-core/script/par

[SECURITY PATCH 18/28] script: Remove unused fields from grub_script_function struct

2020-07-29 Thread Daniel Kiper
From: Chris Coulson Signed-off-by: Chris Coulson Reviewed-by: Daniel Kiper --- include/grub/script_sh.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h index 360c2be1f..b382bcf09 100644 --- a/include/grub/script_sh.h +++ b/include

[SECURITY PATCH 13/28] udf: Fix memory leak

2020-07-29 Thread Daniel Kiper
From: Konrad Rzeszutek Wilk Fixes: CID 73796 Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Daniel Kiper Reviewed-by: Jan Setje-Eilers --- grub-core/fs/udf.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/grub-core/fs/udf.c b/grub-core/fs/udf.c

[SECURITY PATCH 28/28] linux: Fix integer overflows in initrd size handling

2020-07-29 Thread Daniel Kiper
From: Colin Watson These could be triggered by a crafted filesystem with very large files. Fixes: CVE-2020-15707 Signed-off-by: Colin Watson Reviewed-by: Jan Setje-Eilers Reviewed-by: Daniel Kiper --- grub-core/loader/linux.c | 74 +++- 1 file

[SECURITY PATCH 22/28] lvm: Fix two more potential data-dependent alloc overflows

2020-07-29 Thread Daniel Kiper
them both. Signed-off-by: Peter Jones Signed-off-by: Darren Kenny Reviewed-by: Daniel Kiper --- grub-core/disk/lvm.c | 48 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c index

[SECURITY PATCH 17/28] relocator: Protect grub_relocator_alloc_chunk_align() max_addr against integer underflow

2020-07-29 Thread Daniel Kiper
, size, ...). 2. Introduced UP_TO_TOP32(s) macro for the cases where max_addr is 32-bit top address (0x - size + 1) or similar. Signed-off-by: Alexey Makhalov Reviewed-by: Daniel Kiper --- grub-core/lib/i386/relocator.c| 28 +++- grub-core/lib/mips

[SECURITY PATCH 00/28] Multiple GRUB2 vulnerabilities - BootHole

2020-07-29 Thread Daniel Kiper
tson (1): linux: Fix integer overflows in initrd size handling Daniel Kiper (2): font: Do not load more than one NAME section efi/chainloader: Propagate errors from copy_file_path() Konrad Rzeszutek Wilk (4): lzma: Make sure we don't dereference past array term:

<    5   6   7   8   9   10   11   12   13   14   >