[PATCH 1/1] gentpl.py: Remove .interp section from .img files.

2023-01-12 Thread Nicholas Vinson
Whn building .img files, a .interp section from the .image files will sometimes be copied into the .img file. This additional section pushes the .img file beyond the 512-byte limit and causes grub-install to fail to run for i386-pc platforms. Signed-off-by: Nicholas Vinson --- gentpl.py | 2 +-

[PATCH 0/1] Grub2 clang MBR image fix

2023-01-12 Thread Nicholas Vinson
When building grub, the files boot.img and diskboot.img are generated from ELF reference images and have the expectation that they will be 512 bytes inside each. However, when GRUB is built with clang, these files become bigger than 512-bytes because the name of the ELF interpreter is appended to e

[PATCH 1/4] disk/cryptodisk: When cheatmounting, use the sector info of the cheat device

2023-01-12 Thread Glenn Washburn
From: Fabian Vogt When using grub-probe with cryptodisk, the mapped block device from the host is used directly instead of decrypting the source device in GRUB code. In that case, the sector size and count of the host device needs to be used. This is especially important when using luks2, which d

[PATCH 3/4] devmapper/getroot: Set up cheated LUKS2 cryptodisk mount from DM parameters

2023-01-12 Thread Glenn Washburn
From: Josselin Poiret This lets a LUKS2 cryptodisk have its cipher and hash filled out, otherwise they wouldn't be initialized if cheat mounted. Signed-off-by: Josselin Poiret Tested-by: Glenn Washburn --- grub-core/osdep/devmapper/getroot.c | 107 +++- 1 file changed,

[PATCH 2/4] devmapper/getroot: Have devmapper recognize LUKS2

2023-01-12 Thread Glenn Washburn
From: Josselin Poiret Changes UUID comparisons so that LUKS1 and LUKS2 are both recognized as being LUKS cryptodisks. Signed-off-by: Josselin Poiret Tested-by: Glenn Washburn --- grub-core/osdep/devmapper/getroot.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git

[PATCH 4/4] grub-fs-tester: Add luks1 and luks2 support

2023-01-12 Thread Glenn Washburn
From: Pierre-Louis Bonicoli The logical sector size used by LUKS1 is 512 bytes and LUKS2 uses 512 to 4069 bytes. The deafualt password used is "pass", but can be overridden by setting the PASS environment variable. The device mapper name is set to the name of the temp directory so that its easy t

[PATCH 0/4] LUKS1/2 testing in fs-tester and LUKS2 support in grub-probe

2023-01-12 Thread Glenn Washburn
This series adds the testing of LUKS 1 and 2 encrypted container to the user-space fs tester. While this does replicate some of the testing done by grub_cmd_cryptomount, and is less flexible, it is run natively (that is without need for virtualization). It also tests the added LUKS2 support in grub

Re: [PATCH 3/3] serial: Improve detection of duplicate serial ports

2023-01-12 Thread Benjamin Herrenschmidt
On Fri, 2022-12-23 at 12:48 +1100, Benjamin Herrenschmidt wrote: > We currently rely on some pretty fragile comparison by name to > identify wether a serial port being configured is identical Signed-off-by: Benjamin Herrenschmidt --- (Sorry about that ... blame christmas :-) > --- >  grub-core/

Re: [PATCH 0/3] serial: Cleanup & fix port discovery

2023-01-12 Thread Benjamin Herrenschmidt
On Thu, 2023-01-12 at 14:01 +0100, Daniel Kiper wrote: > For all the patches Reviewed-by: Daniel Kiper > ... > > Thank you for fixing the issues! > > Daniel > > PS I will add missing SOB on your behalf to the last patch. I hope > this >    is not big deal... ooops ! Let me reply to the patch wi

Re: [PATCH 0/6] Cryptomount testing

2023-01-12 Thread Daniel Kiper
On Tue, Jan 10, 2023 at 04:08:54PM -0600, Glenn Washburn wrote: > This patch series adds a variety of functional cryptomount LUKS1/2 tests by > creating a LUKS container on the host and verifying that data inside can be > read accurately from a virtualized GRUB. This should be especially useful > w

Re: [PATCH v3 1/2] mm: Adjust new region size to take management overhead into account

2023-01-12 Thread Daniel Kiper
On Thu, Dec 22, 2022 at 05:18:23PM +0800, Zhang Boyang wrote: > When grub_memalign() encounters out-of-memory, it will try > grub_mm_add_region_fn() to request more memory from system firmware. > However, the size passed to it doesn't take region management overhead > into account. Adding a memory

Re: [PATCH v3 2/2] mm: Preallocate some space when adding new regions

2023-01-12 Thread Daniel Kiper
On Thu, Dec 22, 2022 at 05:18:24PM +0800, Zhang Boyang wrote: > When grub_memalign() encounters out-of-memory, it will try > grub_mm_add_region_fn() to request more memory from system firmware. > However, it doesn't preallocate memory space for future allocation > requests. In extreme cases, it req

Re: clang appends an extra string to Grub2 making it not work with MBR systems

2023-01-12 Thread Vladimir 'phcoder' Serbinenko
Can you upload diskboot.exec and boot.exec somewhere? Did you see any errors? Ideally we should have errored out if those files are not 512 bytes On Tue, 3 Jan 2023 at 09:09, Immolo via Grub-devel wrote: > Using Gentoo with clang on a MBR system I have come across an extra string > the content /

Re: clang appends an extra string to Grub2 making it not work with MBR systems

2023-01-12 Thread Daniel Kiper
On Tue, Jan 03, 2023 at 01:15:46AM +, Immolo via Grub-devel wrote: > Using Gentoo with clang on a MBR system I have come across an extra string the > content /lib/ld-linux.so.2 is being added to > /usr/lib/grub/i386-pc/diskboot.img > and /usr/lib/grub/i386-pc/boot.img taking it over 512 bytes

Re: [PATCH 0/3] serial: Cleanup & fix port discovery

2023-01-12 Thread Daniel Kiper
On Fri, Dec 23, 2022 at 12:48:46PM +1100, Benjamin Herrenschmidt wrote: > This series cleans up a few things in serial port discovery > and fixes detection of duplicates in some cases: > > - Existing usage of memcmp to compare strings is replaces >with strncmp > > - Don't lookup ports by name

Re: [PATCH v2 0/8] serial: Add MMIO & SPCR support

2023-01-12 Thread Daniel Kiper
On Fri, Dec 23, 2022 at 12:47:51PM +1100, Benjamin Herrenschmidt wrote: > This series adds support for MMIO serial ports and auto-configuration > via ACPI SPCR. > > This is necessary for the serial port to work on AWS EC2 "metal" x86 > systems. > > An MMIO serial port can be specified explicitely u

Re: Proposal v2: fs/iso9660: Prevent skipping CE or ST at start of continuation area

2023-01-12 Thread Thomas Schmitt
Hi, Lidong Chen wrote: > To test it, I am thinking to add the ISO entry in 40_custom script, then > select > the ISO from Grub menu. Is it the right way to test it? Or, is there a better > way > to it? I have to leave the answer to the experienced GRUB developers. Testing is my weak spot with