[PATCH v5 3/6] commands/ls: Show modification time for file paths

2025-02-28 Thread Glenn Washburn
The modification time for paths to files was not being printed because the grub_dirhook_info, which contains the mtime, was initialized to NULL. Instead of calling print_file() directly, use fs->fs_dir() to call print_file() with a properly filled in grub_dirhook_info. This has the added benefit of

[PATCH v5 2/6] commands/ls: Merge print_files_long and print_files into print_file

2025-02-28 Thread Glenn Washburn
Simplify the code by removing logic around which file printer to call. Signed-off-by: Glenn Washburn --- grub-core/commands/ls.c | 35 --- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c index 65b17

[PATCH v5 6/6] commands/ls: Add directory header for dir args

2025-02-28 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. Signed-off-by: Glenn Washburn --- grub-core/commands/ls.c | 17 + 1 file changed, 13 inserti

[PATCH v5 0/6] More ls improvements

2025-02-28 Thread Glenn Washburn
Considering Daniel's feedback on the v2 of this patch series, I've broken up patches #1 and #2 and dropped patch #3 from the original series. These changes make the output of the ls command a little more like the GNU ls output. Glenn Washburn v5: * Rebase onto current master * Change ctx->filen

[PATCH v5 1/6] commands/ls: Return proper GRUB_ERR_* for functions returning type grub_err_t

2025-02-28 Thread Glenn Washburn
Also, remove unused code. Signed-off-by: Glenn Washburn --- grub-core/commands/ls.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/grub-core/commands/ls.c b/grub-core/commands/ls.c index f660946a24e4..65b17768b605 100644 --- a/grub-core/commands/ls.c +++ b/grub-core/com

Re: [PATCH v2] acpi: Use options enum to index command options

2025-02-28 Thread Glenn Washburn
On Fri, 28 Feb 2025 15:39:28 +0100 Daniel Kiper wrote: > On Fri, Jan 03, 2025 at 12:11:14AM -0600, Glenn Washburn wrote: > > Signed-off-by: Glenn Washburn > > --- > > This should be a quick review. > > > > v2: Rebase to current master > > > > Glenn > > --- > > Range-diff against v1: > > 1: fbaf

Re: [PATCH] fs/ntfs: Check at->attr_cur after calling next_attribute()

2025-02-28 Thread B Horn
On 28/02/2025 22:17, Vladimir 'phcoder' Serbinenko wrote: Why do you remove boundary check? Maybe it's better to add the second boundary check from below The issue stems from my original patches being rebased over `fs/ntfs: Fix out-of-bounds read`, with both my patches and that commit fixing

[PATCH 1/2] docs: Document Restricted Filesystems in Lockdown

2025-02-28 Thread Andrew Hamilton
Document which file systems are not allowed when lockdown is enabled to align to recent GRUB changes. Signed-off-by: Andrew Hamilton --- docs/grub.texi | 89 -- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/docs/grub.texi b/docs/gr

[PATCH 0/2] docs: Update Documentation for Lockdown Changes

2025-02-28 Thread Andrew Hamilton
Make some updates to the GRUB documentation around which file systems are allowed / disallowed in lockdown, as well as additional Commands now blocked in lockdown mode. Andrew Hamilton (2): docs: Document Restricted Filesystems in Lockdown docs: Capture Additional Commands Restricted by Lockdo

[PATCH 2/2] docs: Capture Additional Commands Restricted by Lockdown

2025-02-28 Thread Andrew Hamilton
Update documentation to capture that all memrw commands, the minicmd dump command, and raw memory dumping via hexdump are restricted when lockdown is enabled. This aligns to recent GRUB code updates. Signed-off-by: Andrew Hamilton --- docs/grub.texi | 9 + 1 file changed, 9 insertions(+)

Re: [PATCH] fs/ntfs: Check at->attr_cur after calling next_attribute()

2025-02-28 Thread Andreas Klauer
On Fri, Feb 28, 2025 at 01:07:06PM +, B Horn wrote: > On some NTFS volumes GRUB would enter an infinite loop when > next_attribute() returned NULL, which can happen in normal cases when > the end of the attribute list is reached. > This would trigger a NULL deref, but as the null page is mapped

Re: Feedback Request: Implement Fuzzers and Add to OSS-Fuzz

2025-02-28 Thread Andrew Hamilton
Yes that sounds great, I am back from vacation just now so will be generally free any time between 0800 and 2100 Central Standard Time. Thanks, Andrew On Fri, Feb 28, 2025 at 7:33 AM Daniel Kiper wrote: > Adding Daniel Axtens, Lidong and Nils... > > On Thu, Feb 27, 2025 at 01:22:15PM -0500, Andr

Re: [PATCH] script/execute: Don't let trailing blank lines determine the return code

2025-02-28 Thread Daniel Kiper
On Mon, Dec 30, 2024 at 10:52:23AM +, James Le Cuirot wrote: > From: James Le Cuirot > > grub_script_execute_sourcecode() parses and executes code one line at a > time, updating the return code each time because only the last line > determines the final status. However, trailing new lines were

Re: [PATCH] mm.h: duplicate inclusion of

2025-02-28 Thread Daniel Kiper
On Mon, Dec 23, 2024 at 09:47:18PM +0100, Yuri Zaporozhets wrote: > The header is included twice. Fix that. > > Signed-off-by: Yuri Zaporozhets Reviewed-by: Daniel Kiper Daniel ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mail

Re: [PATCH] grub-mkconfig/10_linux: fix zfs root pool-name identification

2025-02-28 Thread Daniel Kiper
On Fri, Dec 27, 2024 at 02:50:58PM +0100, Felix Dörre via Grub-devel wrote: > I've also taken a quick look at a previous patch submitted for this issue > [0], applied to current master and tested it locally. > Regarding this concern: > > > For an unknown reason xgettext hangs during build after th

Re: [PATCH v2] acpi: Use options enum to index command options

2025-02-28 Thread Daniel Kiper
On Fri, Jan 03, 2025 at 12:11:14AM -0600, Glenn Washburn wrote: > Signed-off-by: Glenn Washburn > --- > This should be a quick review. > > v2: Rebase to current master > > Glenn > --- > Range-diff against v1: > 1: fbaf2eb14231 ! 1: 8b14fcf62f88 acpi: Use options enum to index command > options

Re: [PATCH] gitignore: Ignore generated files from libtasn

2025-02-28 Thread Daniel Kiper
On Fri, Jan 10, 2025 at 02:19:41PM -0600, Glenn Washburn wrote: > The commit 504058e8 ("libtasn1: Compile into asn1 module") generates files > into the grub-core/lib/libtasn1-grub directory and commit 99cda678 > ("asn1_test: Test module for libtasn1") generates files into the > grub-core/tests/asn1

Re: [PATCH] powerpc: increase MIN RMA size for CAS negotiation

2025-02-28 Thread Daniel Kiper
On Wed, Jan 15, 2025 at 05:46:05PM +0530, Avnish Chouhan wrote: > Change RMA size from 512 MB to 768 MB which will result > in more memory at boot time for PowerPC. When PowerPC LPAR use/uses vTPM, s#use/uses#uses#? > Secure Boot or FADump, the 512 MB RMA memory is not sufficient for > booting. W

[PATCH] i386: Check for cpuid family when flush cache only on VIA CPUs

2025-02-28 Thread Tony W Wang-oc
Due to company changes, Zhaoxin is currently using the CPU ID CentaurHauls. CPUs designed and developed by Zhaoxin start with a family of 7, and the model may be less than 10. Zhaoxin CPUs do not have cache coherence problems, add this patch to avoid executing wbinvd on Zhaoxin CPUs. Signed-off-b

Re: [SECURITY PATCH 18/73] fs/ntfs: Implement attribute verification

2025-02-28 Thread Andreas Klauer
Hello, (I'm not on this list; hope this message finds you well.) it seems that this patch triggers an infinite loop when trying to access ntfs, so any search command that comes across any ntfs partition gets stuck. Basically this while-loop in find_attr() while (at->attr_cur < mft_end && *a

Re: [PATCH 0/6 v13] LVM Cachevol and Integrity volumes break entire LVM VG

2025-02-28 Thread Daniel Kiper
On Thu, Feb 27, 2025 at 03:20:28PM -0500, Patrick Plenefisch wrote: > I just rebased them with no changes except for line numbers shifting, > and pushed to https://github.com/byteit101/grub2/commits/grub-lvmintegrity/ > and attached them as patches with --thread. I unfortunately don't have > time t

Re: [PATCH v2 RESEND] util/grub.d/30_os-prober.in: Conditionally show or hide chain and efi menu entries

2025-02-28 Thread Daniel Kiper
On Mon, Feb 24, 2025 at 06:10:45PM +0100, Pascal Hambourg wrote: > On systems which support multiple boot platforms such as BIOS and > EFI, it makes no sense to show menu entries which are not supported > by the current boot platform. Menu entries generated from os-prober > 'chain' boot type use bo

Re: Feedback Request: Implement Fuzzers and Add to OSS-Fuzz

2025-02-28 Thread Daniel Kiper via Grub-devel
Adding Daniel Axtens, Lidong and Nils... On Thu, Feb 27, 2025 at 01:22:15PM -0500, Andrew Hamilton wrote: > Hello, > > I’m looking for feedback on whether there would be project interest / support > on me creating an initial fuzz test suite for some core GRUB functions and > then > integrating th

[PATCH] fs/ntfs: Check at->attr_cur after calling next_attribute()

2025-02-28 Thread B Horn
On some NTFS volumes GRUB would enter an infinite loop when next_attribute() returned NULL, which can happen in normal cases when the end of the attribute list is reached. This would trigger a NULL deref, but as the null page is mapped on the majority of firmware, an infinite loop would occur as th

Re: [SECURITY PATCH 18/73] fs/ntfs: Implement attribute verification

2025-02-28 Thread Daniel Kiper via Grub-devel
Huh! B Horn, may I ask you to take a look at this and prepare a fix? Andreas, please help with testing the fix. Daniel On Fri, Feb 28, 2025 at 10:55:46AM +0100, Andreas Klauer wrote: > Hello, > > (I'm not on this list; hope this message finds you well.) > > it seems that this patch triggers an

Re: [SECURITY PATCH 00/73] GRUB2 vulnerabilities - 2025/02/18

2025-02-28 Thread Daniel Kiper via Grub-devel
On Thu, Feb 27, 2025 at 11:03:44AM +0100, Christian Hesse wrote: > Daniel Kiper via Grub-devel on Mon, 2025/02/24 15:34: > > > [...] > > > The current situation is just insane. > > > > I can understand your frustration but I am afraid we are not able to do > > much about it at this point. Sorry...