Re: [PATCH] Fix integer overflow in badram_iter

2024-08-17 Thread Arjun
The surrounding code already uses ULL instead of grub_uint64_t. ULL already is guaranteed >= 64 bits so I would expect this to work fine as is. Could you explain why grub_uint64_t cast is recommended? Amended patch with signoff below. Signed-off-by: Arjun Barrett --- grub-core/mmap/mmap.c | 5 +

Re: [PATCH] Fix integer overflow in badram_iter

2024-08-13 Thread Daniel Kiper
On Mon, Jul 29, 2024 at 09:07:48PM -0700, Arjun wrote: > Fixes support for 64-bit badram entries. Previously, whenever the start > address > of an mmap region exceeded the maximum address attainable via an addr,mask > pair, > GRUB would erroneously attempt to binary-search up to the integer limit

[PATCH] Fix integer overflow in badram_iter

2024-07-29 Thread Arjun
Fixes support for 64-bit badram entries. Previously, whenever the start address of an mmap region exceeded the maximum address attainable via an addr,mask pair, GRUB would erroneously attempt to binary-search up to the integer limit for an unsigned 64-bit integer in search of the "start" of its ite