Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Vladimir 'phcoder' Serbinenko
> > . > > Ard thinks that a 64 bit alignment for EFI GUIDs is a mistake - see [1] > and [2]. Hence Linux uses `__aligned(__alignof__(u32))` for "efi_guid_t" > since 2019. > My patch presents a reliability paradigm: accept all inputs, produce outputs that are always aligned to 8-byte. It can make s

[PATCH 0/2] Add serial test

2023-08-14 Thread Glenn Washburn
Pretty self explanatory. The first patch allows explicitly telling grub-shell which terminal output device to use so we can test that the right bytes are getting written there. The second patch, which is the serial test, runs grub-shell once before the real test to identify the PCI id of the serial

[PATCH 1/2] tests/util/grub-shell: Allow explicitly using other serial ports for output

2023-08-14 Thread Glenn Washburn
While here, move "-qemu=*" case to be next to the "--qemu-opts=*" case. This causes no change in logic, but is more logically located. Signed-off-by: Glenn Washburn --- tests/util/grub-shell.in | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/util/grub-shell.in b/t

[PATCH 2/2] tests: Add serial_test

2023-08-14 Thread Glenn Washburn
This test is meant to test output via various serial devices. Currently, only the PCI serial device is tested. Signed-off-by: Glenn Washburn --- Makefile.util.def| 6 + tests/serial_test.in | 55 2 files changed, 61 insertions(+) create mode

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Pedro Miguel Justo
Quoting Vladimir 'phcoder' Serbinenko (2023-08-14 13:56:31) I uploaded the entire branch (patches) to my GitHub copy: [1]https://github.com/phcoder/GRUB/tree/rb1 Vladimir, I can confirm that, with the code presently in this branch, my Itanium system boots fine. The regressi

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Pedro Miguel Justo
> On Aug 14, 2023, at 21:38, Frank Scheiner wrote: > > Hi Steffen, Ard, > >> On 14.08.23 21:59, Oliver Steffen wrote: >> Quoting Vladimir 'phcoder' Serbinenko (2023-08-13 09:46:45) >>> Full analysis: gpt_partentry can be marked as aligned8. But following are >>> problem: >>> * protocols_per_h

Re: [PATCH] efi: Add efiload module to allow loading EFI drivers

2023-08-14 Thread Glenn Washburn
Please, disregard this. It was accidentally sent and definitely has issues. I'll be submitting this later when things are ironed out and tested. Glenn On Mon, 14 Aug 2023 14:46:31 -0500 Glenn Washburn wrote: > Signed-off-by: Glenn Washburn > --- > grub-core/Makefile.core.def | 6 + > g

[PATCH] efi: Change grub_efi_boolean_t from char to enum

2023-08-14 Thread Glenn Washburn
This allows using GRUB_EFI_TRUE and GRUB_EFI_FALSE with proper type and value checking. The UEFI 2.10 specification, in section 2.3.1, table 2.3, says the size of the boolean is 1 byte and may only contain the values 0 or 1. In order to have the enum be 1-byte in size instead of the default int-siz

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Frank Scheiner
Hi Steffen, Ard, On 14.08.23 21:59, Oliver Steffen wrote: Quoting Vladimir 'phcoder' Serbinenko (2023-08-13 09:46:45) Full analysis: gpt_partentry can be marked as aligned8. But following are problem: * protocols_per_handle may return unaligned guids * configuration_tables array may be unaligne

Re: GRUB 2.12~rc1 released

2023-08-14 Thread Olaf Hering
Mon, 10 Jul 2023 18:35:50 +0200 Daniel Kiper : > Please test this release candidate. If we do not spot major issues we are > going > to release 2.12 in a month or so. A regression in building the documentation was introduced between e67a551a4..857af0e17: https://lists.gnu.org/archive/html/bug-

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Oliver Steffen
Quoting Vladimir 'phcoder' Serbinenko (2023-08-13 09:46:45) > Full analysis: gpt_partentry can be marked as aligned8. But following are > problem: > * protocols_per_handle may return unaligned guids > * configuration_tables array may be unaligned. On efi32 every entry is 20 > bytes, so guids can't

[PATCH] tests/util/grub-shell-luks-tester: Do not remove generated files when test fails to allow debugging

2023-08-14 Thread Glenn Washburn
Signed-off-by: Glenn Washburn --- tests/util/grub-shell-luks-tester.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/util/grub-shell-luks-tester.in b/tests/util/grub-shell-luks-tester.in index 850a20d6a7a8..3f9d1be17644 100644 --- a/tests/util/grub-shell-luks-teste

[PATCH] tests/util/grub-shell: Convert spaces to TABs

2023-08-14 Thread Glenn Washburn
Signed-off-by: Glenn Washburn --- tests/util/grub-shell.in | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in index e066105de917..29c7e936e740 100644 --- a/tests/util/grub-shell.in +++ b/tests/util/grub-shell.

[PATCH] efi: Add efiload module to allow loading EFI drivers

2023-08-14 Thread Glenn Washburn
Signed-off-by: Glenn Washburn --- grub-core/Makefile.core.def | 6 + grub-core/commands/efi/efiload.c | 212 +++ 2 files changed, 218 insertions(+) create mode 100644 grub-core/commands/efi/efiload.c diff --git a/grub-core/Makefile.core.def b/grub-core/Makefil

[PATCH 0/4] More ls improvements

2023-08-14 Thread Glenn Washburn
Currently when given a path to a file, ls will open the file to determine if its is valid and then run the appropriate print function, in contrast to directory arguments that use the directory iterator and callback on each file. One issue with this is that opening a file does not allow access to it

[PATCH 3/4] commands/ls: Add directory header for dir args and print full paths for file args

2023-08-14 Thread Glenn Washburn
Like the GNU ls first print a line with the directory path before printing files in the directory, which will not have a directory component, but only if there is more than one argument. Also, for arguments that are paths to files, print the full path of the file. Signed-off-by: Glenn Washburn --

[PATCH 4/4] commands/ls: Proper line breaks between arguments

2023-08-14 Thread Glenn Washburn
There should be a blank line before each directory argument and before each file arugment that come after a directory argument. This brings the ls command more inline with GNU's ls. Although one key difference still is that GNU's ls reorders the output of arguments so that all file arguments are gr

[PATCH 2/4] commands/ls: Allow printing mtime for file arguments

2023-08-14 Thread Glenn Washburn
File arguments were processed differently than files listed from directory arguments. A side effect of this was that mtime was not shown for file arguments when long listing was enabled. Refactor to have the same code path for printing files that are arguments and ones that are contained in directo

[PATCH 1/4] disk: Reset grub_errno upon entering grub_disk_read()

2023-08-14 Thread Glenn Washburn
The grub_disk_read() function returns grub_errno. Without resetting grub_errno when entering the function, grub_disk_read() might return a previously set error code when it should return success. Signed-off-by: Glenn Washburn --- grub-core/kern/disk.c | 2 ++ 1 file changed, 2 insertions(+) dif

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread John Paul Adrian Glaubitz
Hi Pedro! On Mon, 2023-08-14 at 14:33 +, Pedro Miguel Justo wrote: > en I try to build from your branch, I eventually get this error: > > ``` > done > mv syminfo.lst.new syminfo.lst > cat syminfo.lst | sort | mawk -f ./genmoddep.awk > moddep.lst || (rm -f > moddep.lst; exit 1) > mawk: ./genm

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Pedro Miguel Justo
> On Aug 14, 2023, at 05:47, Oliver Steffen wrote: > > Quoting Vladimir 'phcoder' Serbinenko (2023-08-14 13:56:31) >> I uploaded the entire branch (patches) to my GitHub copy: >> [1]https://github.com >> /phcoder/GRUB/tree/rb1 Hi Vladimir. When I try to build from your branch, I eventually

Re: [PATCH] commands/ls: Print ???????????? if unable to get file size

2023-08-14 Thread Daniel Kiper
On Mon, Aug 14, 2023 at 01:20:29AM -0500, Glenn Washburn wrote: > In long list mode, if the file can not be opened, the file is not printed. > Instead, print the file but print the size as . > > Signed-off-by: Glenn Washburn Reviewed-by: Daniel Kiper Daniel

Re: [PATCH] commands/ls: Send correct dirname to print funcions

2023-08-14 Thread Daniel Kiper
On Mon, Aug 14, 2023 at 01:16:53AM -0500, Glenn Washburn wrote: > For each non-directory path argument to the ls command, the full path was > being sent to the print functions, instead of the dirname. The long output > print function expected dirname to be the directory containing the file > and so

Re: [PATCH] archelp: If path given to grub_archelp_dir is not a directory return error

2023-08-14 Thread Daniel Kiper
On Mon, Aug 14, 2023 at 01:03:41AM -0500, Glenn Washburn wrote: > Specifically, return GRUB_ERR_BAD_FILE_TYPE because this is what is > expected by the ls command when it is given a path to a non-directory. > This fixes a bug where calling ls with a list of non-directory paths > outputs a blank lin

Re: [PATCH] commands/videoinfo: Prevent crash when run while video driver already active

2023-08-14 Thread Daniel Kiper
On Fri, Aug 11, 2023 at 04:30:04PM -0500, Glenn Washburn wrote: > The videoinfo command will initialize all non-active video adapters. Video > drivers tend to zero out the global framebuffer object on initialization. > This is not a problem when there is no active video adapter. However, when > the

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Oliver Steffen
Quoting Vladimir 'phcoder' Serbinenko (2023-08-14 13:56:31) > I uploaded the entire branch (patches) to my GitHub copy:  > [1]https://github.com > /phcoder/GRUB/tree/rb1 87532c5b Deduplicate configuration table search function is the reason for the rejection. Thanks, Vladimir! -Oliver > > Le lu

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Pedro Miguel Justo
Perfect! Thank you. On Aug 14, 2023, at 12:56, Vladimir 'phcoder' Serbinenko wrote:  I uploaded the entire branch (patches) to my GitHub copy: https://github.com/phcoder/GRUB/tree/rb1 Le lun. 14 août 2023, 13:07, Pedro Miguel Justo mailto:pm...@texair.net>> a écrit : Hi Vladimir. I got a

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Vladimir 'phcoder' Serbinenko
I uploaded the entire branch (patches) to my GitHub copy: https://github.com/phcoder/GRUB/tree/rb1 Le lun. 14 août 2023, 13:07, Pedro Miguel Justo a écrit : > > Hi Vladimir. > > I got a conplict while applying 0003. Out of expedience, instead of me > trying to resolve the conflict, can you just

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Pedro Miguel Justo
Hi Vladimir. I got a conplict while applying 0003. Out of expedience, instead of me trying to resolve the conflict, can you just share your baseline commit# over which these will apply cleanly? ``` pmsjt@itanium:~/grub$ patch -p1 < ../0001-Add-missing-static-qualifier.patch patching file grub-

Re: [PATCH v9 02/11] Unify GUID types

2023-08-14 Thread Pedro Miguel Justo
Hi Vladimir. Thanks for the analysis and for providing the candidate patches. I'll be away from my computer for a couple of days but will give it a try as soon as I can find a sliver of time. Pedro On Aug 13, 2023, at 08:47, Vladimir 'phcoder' Serbinenko wrote:  Full analysis: gpt_partentr