Re: [PATCH 8/9] efi: Only register shim_lock verifier if shim_lock protocol is found and SB enabled

2020-12-15 Thread Daniel Kiper
On Mon, Dec 14, 2020 at 09:50:45PM +0800, Michael Chang via Grub-devel wrote: > On Thu, Dec 10, 2020 at 05:50:53PM +0100, Daniel Kiper wrote: > > On Tue, Dec 08, 2020 at 10:20:03AM +0800, Michael Chang via Grub-devel > > wrote: > > > On Thu, Dec 03, 2020 at 04:01:49PM +0100, Javier Martinez Canill

Re: [SPECIFICATION RFC] The firmware and bootloader log specification

2020-12-15 Thread Simon Glass
Hi Daniel, On Fri, 13 Nov 2020 at 19:07, Daniel Kiper wrote: > > Hey, > > This is next attempt to create firmware and bootloader log specification. > Due to high interest among industry it is an extension to the initial > bootloader log only specification. It takes into the account most of the >

Re: [PATCH v8 14/18] luks2: Better error handling when setting up the cryptodisk

2020-12-15 Thread Glenn Washburn
On Sat, 12 Dec 2020 16:19:18 +0100 Daniel Kiper wrote: > On Fri, Dec 11, 2020 at 07:10:18PM -0600, Glenn Washburn wrote: > > On Thu, 10 Dec 2020 17:07:07 +0100 > > Daniel Kiper wrote: > > > > > On Tue, Dec 08, 2020 at 04:45:45PM -0600, Glenn Washburn wrote: > > > > First, check to make sure that

[PATCH v9 1/6] luks2: Convert to crypt sectors from grub native sectors

2020-12-15 Thread Glenn Washburn
The function grub_disk_native_sectors(source) returns the number of sectors of source in grub native (512-byte) sectors, not source sized sectors. So the conversion needs to use GRUB_DISK_SECTOR_BITS. the grub native sector size. Signed-off-by: Glenn Washburn --- grub-core/disk/luks2.c | 2 +- 1

[PATCH v9 5/6] misc: Add grub_log2ull macro for calculating log base 2 of 64-bit integers

2020-12-15 Thread Glenn Washburn
Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper --- include/grub/misc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/grub/misc.h b/include/grub/misc.h index 780a34e90..73a514eb1 100644 --- a/include/grub/misc.h +++ b/include/grub/misc.h @@ -482,4 +482,7 @@ void EXPORT_F

[PATCH v9 0/6] Cryptodisk fixes for v2.06 redux

2020-12-15 Thread Glenn Washburn
This patch series has been rebased onto latest master. The first patch is new and fixes issue where total_sectors was incorrectly converted from source disk sized sectors, when it should've been converted from grub native sector size. The second patch was separated from the previous patch 14. Patch

[PATCH v9 2/6] luks2: Do not handle disks of size GRUB_DISK_SIZE_UNKNOWN for now

2020-12-15 Thread Glenn Washburn
Check to make sure that source disk has a known size. If not, print debug message and return error. There are 4 cases where GRUB_DISK_SIZE_UNKNOWN is set (biosdisk, obdisk, ofdisk, and uboot), and in all those cases processing continues. So this is probably a bit conservative. However, 3 of the cas

[PATCH v9 4/6] mips: Enable __clzdi2()

2020-12-15 Thread Glenn Washburn
This patch is similiar to commit 9dab2f51e (sparc: Enable __clzsi2() and __clzdi2()) but for MIPS target and __clzdi2 only, __clzsi2 was already enabled. Suggested-by: Daniel Kiper Signed-off-by: Glenn Washburn --- grub-core/kern/compiler-rt.c | 2 +- include/grub/compiler-rt.h | 2 +- 2 file

[PATCH v9 3/6] luks2: Better error handling when setting up the cryptodisk

2020-12-15 Thread Glenn Washburn
Do some sanity checking on data coming from the luks header. If segment.size is "dynamic", verify that the offset is not past the end of disk. Otherwise, check for errors from grub_strtoull when converting segment size from string. If a GRUB_ERR_BAD_NUMBER error was returned, then the string was no

[PATCH v9 6/6] luks2: Use grub_log2ull to calculate log_sector_size and improve readability

2020-12-15 Thread Glenn Washburn
Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper --- grub-core/disk/luks2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c index 0e5061243..1ff89089e 100644 --- a/grub-core/disk/luks2.c +++ b/grub-core/disk/luks2.c @@

[PATCH] docs: Add documentation of disk size limitations

2020-12-15 Thread Glenn Washburn
Document the artificially imposed 1 EiB disk size limit and size limitations with LUKS volumes. Fix a few punctuation issues. Signed-off-by: Glenn Washburn --- docs/grub.texi | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/grub.texi b/docs/grub.texi ind