Re: [PATCH 0/2] Two small fixes to gzip

2024-05-17 Thread Daniel Axtens
Hi Daniel, > Reviewed-by: Daniel Kiper for both patches... Thank you! > I assume I can add your SOB on your behalf... Oh! Yes! Sorry, 2 years of closed source development have apparently caused me to lose my 'git commit -s' habits! The sign-off for both patches is: Signed-off-by: Daniel

Re: [PATCH v14 1/3] safemath: Add ALIGN_UP_OVF() that checks for {over,under}flow

2024-05-17 Thread Gao Xiang
Hi Vladimir, On 2024/5/18 00:38, Vladimir 'phcoder' Serbinenko wrote: I think that given that align is a non zero const we can trust it. From the EROFS specific cases, they are always non-zero values, So I agree with you on this.. Yet Daniel said ".. Be careful with underflows too." in

Re: [PATCH v14 1/3] safemath: Add ALIGN_UP_OVF() that checks for {over, under}flow

2024-05-17 Thread Vladimir 'phcoder' Serbinenko
I think that given that align is a non zero const we can trust it. Le ven. 17 mai 2024, 15:56, Gao Xiang a écrit : > The following EROFS patch will use this helper to handle overflow > ALIGN_UP() cases. > > Signed-off-by: Gao Xiang > --- > include/grub/safemath.h | 16 > 1

Re: [PATCH v14 0/3] Introduce EROFS support

2024-05-17 Thread Yifan Zhao
Reran v14, and it still correctly passes the fs-tester and correctly boots the EROFS kernel image. Thanks, Yifan Zhao On 2024/5/17 20:56, Gao Xiang wrote: [ This is a RESEND version of v13 due to a mis-fix. ] Hi folks, EROFS [1] is a lightweight read-only filesystem designed for

[PATCH v14 2/3] fs/erofs: Add support for EROFS

2024-05-17 Thread Gao Xiang
From: Yifan Zhao EROFS [1] is a lightweight read-only filesystem designed for performance which has already been shipped in most Linux distributions as well as widely used in several scenarios, such as Android system partitions, container images, and rootfs for embedded devices. This patch

[PATCH v14 1/3] safemath: Add ALIGN_UP_OVF() that checks for {over, under}flow

2024-05-17 Thread Gao Xiang
The following EROFS patch will use this helper to handle overflow ALIGN_UP() cases. Signed-off-by: Gao Xiang --- include/grub/safemath.h | 16 1 file changed, 16 insertions(+) diff --git a/include/grub/safemath.h b/include/grub/safemath.h index fbd9b5925..baaea0ef4 100644 ---

[PATCH v14 3/3] fs/erofs: Add tests for EROFS in grub-fs-tester

2024-05-17 Thread Gao Xiang
From: Yifan Zhao In this patch, three tests of EROFS are introduced and they cover compact, extended and chunk-based inodes, respectively. Signed-off-by: Yifan Zhao Reviewed-by: Glenn Washburn Reviewed-by: Daniel Kiper Signed-off-by: Gao Xiang --- .gitignore | 1 +

[PATCH v14 0/3] Introduce EROFS support

2024-05-17 Thread Gao Xiang
[ This is a RESEND version of v13 due to a mis-fix. ] Hi folks, EROFS [1] is a lightweight read-only filesystem designed for performance which has already been shipped in most Linux distributions as well as widely used in several scenarios, such as Android system partitions, container images,

Re: [PATCH v13 0/3] Introduce EROFS support

2024-05-17 Thread Gao Xiang
On 2024/5/17 20:17, Gao Xiang wrote: Hi folks, EROFS [1] is a lightweight read-only filesystem designed for performance which has already been shipped in most Linux distributions as well as widely used in several scenarios, such as Android system partitions, container images, and rootfs for

[PATCH v13 2/3] fs/erofs: Add support for EROFS

2024-05-17 Thread Gao Xiang
From: Yifan Zhao EROFS [1] is a lightweight read-only filesystem designed for performance which has already been shipped in most Linux distributions as well as widely used in several scenarios, such as Android system partitions, container images, and rootfs for embedded devices. This patch

[PATCH v13 0/3] Introduce EROFS support

2024-05-17 Thread Gao Xiang
Hi folks, EROFS [1] is a lightweight read-only filesystem designed for performance which has already been shipped in most Linux distributions as well as widely used in several scenarios, such as Android system partitions, container images, and rootfs for embedded devices. This patch brings EROFS

[PATCH v13 1/3] safemath: Add ALIGN_UP_OVF() that checks for {over, under}flow

2024-05-17 Thread Gao Xiang
The following EROFS patch will use this helper to handle overflow ALIGN_UP() cases. Signed-off-by: Gao Xiang --- include/grub/safemath.h | 16 1 file changed, 16 insertions(+) diff --git a/include/grub/safemath.h b/include/grub/safemath.h index fbd9b5925..baaea0ef4 100644 ---

[PATCH v13 3/3] fs/erofs: Add tests for EROFS in grub-fs-tester

2024-05-17 Thread Gao Xiang
From: Yifan Zhao In this patch, three tests of EROFS are introduced and they cover compact, extended and chunk-based inodes, respectively. Signed-off-by: Yifan Zhao Reviewed-by: Glenn Washburn Reviewed-by: Daniel Kiper Signed-off-by: Gao Xiang --- .gitignore | 1 +

Re: [PATCH v12 1/2] fs/erofs: Add support for EROFS

2024-05-17 Thread Gao Xiang
Hi Daniel, On 2024/5/17 18:22, Daniel Kiper wrote: On Fri, May 17, 2024 at 12:40:53PM +0800, Gao Xiang wrote: From: Yifan Zhao EROFS [1] is a lightweight read-only filesystem designed for performance which has already been shipped in most Linux distributions as well as widely used in several

Re: [PATCH 3/3] keccak: Disable acceleration with SSE asm

2024-05-17 Thread Vladimir 'phcoder' Serbinenko
Le ven. 17 mai 2024, 14:15, Daniel Kiper a écrit : > Why is this patch needed? Should not we disable SSE using compiler flags? > We do but the code in question uses SSE on every x64 platform. So we need to disable this acceleration. At least for now. If we want to enable SSE (maybe we should) we

Re: [PATCH 3/3] keccak: Disable acceleration with SSE asm

2024-05-17 Thread Daniel Kiper
Why is this patch needed? Should not we disable SSE using compiler flags? Daniel On Thu, May 16, 2024 at 09:27:43PM +0300, Vladimir Serbinenko wrote: > --- > grub-core/lib/libgcrypt/cipher/keccak.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 2/3] Adjust import script, definitions and API users for libgcrypt 1.10

2024-05-17 Thread Daniel Kiper
Please add a commit message and SOB... Additionally, please expand "Updating external code" in GRUB dev documentation with a description how to update libgcrypt. On Thu, May 16, 2024 at 09:27:42PM +0300, Vladimir Serbinenko wrote: > --- > autogen.sh | 1 +

Re: [PATCH 1/3] Import libgcrypt 1.10.3

2024-05-17 Thread Daniel Kiper
Adding a few folks who are probably interested in this series... May I ask you to add a few words to the commit message saying why this change is needed? And please do not forget to add your SOB to this and other patches. Ah, and missing cover letter... Daniel

Re: [PATCH 0/2] Two small fixes to gzip

2024-05-17 Thread Daniel Kiper
On Mon, May 13, 2024 at 12:32:07AM +1000, Daniel Axtens wrote: > I've been fuzzing gzip a bit. So far nothing super exciting, but it's helpful > to add some code to bail early on EOF (patch 1) and to avoid some > uninitialised > data warnings from valgrind (patch 2). I'm not aware of any security

Re: [PATCH v12 1/2] fs/erofs: Add support for EROFS

2024-05-17 Thread Daniel Kiper via Grub-devel
On Fri, May 17, 2024 at 12:40:53PM +0800, Gao Xiang wrote: > From: Yifan Zhao > > EROFS [1] is a lightweight read-only filesystem designed for performance > which has already been shipped in most Linux distributions as well as widely > used in several scenarios, such as Android system partitions,

[PATCH vRESEND] MULTIBOOT: Fix handling of errors in broken aout-kludge

2024-05-17 Thread Vladimir Serbinenko
Current code in some codepaths neither discards nor reports errors. Properly surface the error While on it split 2 cases of unrelated variables both named err. Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/multiboot_mbi.c | 9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH vRESEND 4/4] 10_illumos: Use --noescape so that $ZFS_BOOTFS is passed properly

2024-05-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/grub.d/10_illumos.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/grub.d/10_illumos.in b/util/grub.d/10_illumos.in index a133e1b3f..5649e441f 100644 --- a/util/grub.d/10_illumos.in +++ b/util/grub.d/10_illumos.in @@ -47,7

[PATCH vRESEND 2/4] loader/multiboot: Add --noescape option

2024-05-17 Thread Vladimir Serbinenko
This is needed to boot Solaris/Illumos on some boot paths that need quotes. Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/multiboot_mbi.c | 13 grub-core/loader/multiboot.c | 46 --- grub-core/loader/multiboot_mbi2.c | 12 +++

[PATCH vRESEND 3/4] loader/xen: Add --noescape option.

2024-05-17 Thread Vladimir Serbinenko
--- grub-core/loader/i386/xen.c | 43 +++-- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c index d24ef151b..12d920294 100644 --- a/grub-core/loader/i386/xen.c +++

[PATCH vRESEND 1/4] Add "noescape" argument to cmdline creation

2024-05-17 Thread Vladimir Serbinenko
If OS parses in a way different from sh-like that GRUB does, escaping does more harm than good. Note that allows to specify entire command line in a single argument e.g. multiboot --noescape /kernel "a b c". This is needed to boot Solaris/Illumos on some boot paths that need quotes.

[PATCH vRESEND] Improve cbfs detection

2024-05-17 Thread Vladimir Serbinenko
With FMAP and non-continuous SPI old way of reading CBFS pointer is no longer reliable. Hence use new lbio tags to detect the correct cbfs layout Signed-off-by: Vladimir Serbinenko --- grub-core/fs/cbfs.c | 131 --- include/grub/coreboot/lbio.h | 25

[PATCH v2 2/4] loader/bsd: Improve loading of *BSD on EFI platforms

2024-05-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/bsd.c | 515 +++- include/grub/i386/freebsd_linker.h | 39 +++ include/grub/i386/netbsd_bootinfo.h | 12 +- include/grub/i386/openbsd_bootarg.h | 24 ++ 4 files changed, 495 insertions(+), 95

[PATCH v2 4/4] loader/bsd: Add missing zeros

2024-05-17 Thread Vladimir Serbinenko
kern_end is 64-bit and so we need to add this additional zero. entry is unused and is explicitly zero in own FreeBSD bootloader Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/bsd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/i386/bsd.c

[PATCH v2 1/4] smbios: Export grub_smbios_get_eps3 function

2024-05-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/commands/smbios.c | 2 +- include/grub/smbios.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c index 1a9086ddd..8d9b2e548 100644 ---

[PATCH vRESEND] relocator: Switch to own page table while moving chunks on x86-64

2024-05-17 Thread Vladimir Serbinenko
We need to avoid clobering existing table between starting of chunk movers and the moment we install target page table. Generate temporary table for this rather than hoping that we don't clober existing one. Fixes 64-bit GhostBSD on 64-bit EFI Signed-off-by: Vladimir Serbinenko ---

[PATCH v2 3/4] Do NULL memory quirk workaround only when explicitly requested

2024-05-17 Thread Vladimir Serbinenko
It's only needed for DragonFlyBSD and breaks OpenBSD bsd.mp variant Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/bsd.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c index

[PATCH vRESEND] Support openbsd disklabels embed in GPT

2024-05-17 Thread Vladimir Serbinenko
Add support for bsdlabel as it's used by OpenBSD on GPT-partirioned hard drive. Signed-off-by: Vladimir Serbinenko --- grub-core/partmap/bsdlabel.c | 80 +++- include/grub/gpt_partition.h | 7 2 files changed, 76 insertions(+), 11 deletions(-) diff --git