Re: [PATCH v2 02/15] mm: assert that we preserve header vs region alignment

2022-04-06 Thread Daniel Kiper
On Mon, Mar 28, 2022 at 05:22:27PM +1100, Daniel Axtens wrote: > grub_mm_region_init() does: > > h = (grub_mm_header_t) (r + 1); > > where h is a grub_mm_header_t and r is a grub_mm_region_t. > > Cells are supposed to be GRUB_MM_ALIGN aligned, but while grub_mm_dump > ensures this vs the region h

[PATCH v2 02/15] mm: assert that we preserve header vs region alignment

2022-03-27 Thread Daniel Axtens
grub_mm_region_init() does: h = (grub_mm_header_t) (r + 1); where h is a grub_mm_header_t and r is a grub_mm_region_t. Cells are supposed to be GRUB_MM_ALIGN aligned, but while grub_mm_dump ensures this vs the region header, grub_mm_region_init() does not. It's better to be explicit than impl