Re: [tip:x86/urgent] [x86/kaslr] dfb3911c36: kernel_BUG_at_arch/x86/mm/physaddr.c
From: Thomas Gleixner
Date: Tue Aug 20 2024 - 10:44:44 EST
On Tue, Aug 20 2024 at 13:57, Thomas Gleixner wrote:
> On Tue, Aug 20 2024 at 15:16, kernel test robot wrote:
> /*
> * KASLR trims the maximum possible size of the
> * direct-map. Update the physmem_end boundary.
> + * No rounding required as the region starts
> + * PUD aligned and size is in units of TB.
> */
> if (kaslr_regions[i].end)
> - *kaslr_regions[i].end = __pa(vaddr) - 1;
> + *kaslr_regions[i].end = __pa_nodebug(vaddr - 1);
> +
> + /* Add a minimum padding based on randomization alignment. */
> + vaddr = round_up(vaddr + 1, PUD_SIZE);
Due to the guaranteed PUD alignment of vaddr this round_up() is actually
pointless and just should be
vaddr += PUD_SIZE;
No?
Thanks,
tglx