[PATCH v4 02/61] arm64: mm: Take potential load offset into account when KASLR is off

Linus Walleij linus.walleij at linaro.org
Wed Sep 20 00:15:04 PDT 2023


On Tue, Sep 12, 2023 at 4:17 PM Ard Biesheuvel <ardb at google.com> wrote:

> From: Ard Biesheuvel <ardb at kernel.org>
>
> We enable CONFIG_RELOCATABLE even when CONFIG_RANDOMIZE_BASE is
> disabled, and this permits the loader (i.e., EFI) to place the kernel
> anywhere in physical memory as long as the base address is 64k aligned.
>
> This means that the 'KASLR' case described in the header that defines
> the size of the statically allocated page tables could take effect even
> when CONFIG_RANDMIZE_BASE=n. So check for CONFIG_RELOCATABLE instead.
>
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>

This makes sense.
Reviewed-by: Linus Walleij <linus.walleij at linaro.org>

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list