[PATCH] arm64: kaslr: don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN

Mark Brown broonie at kernel.org
Fri Feb 24 05:06:16 PST 2023


On Thu, Feb 23, 2023 at 09:41:01PM +0100, Ard Biesheuvel wrote:

> This means that a KASLR offset of less than 2 MiB is simply the product
> of this physical displacement, and no randomization has actually taken
> place. Currently, we use 'kaslr_offset() > 0' to decide whether or not
> randomization has occurred, and so we misidentify this case.

Making an explicit function to check if we've enabled KASLR is also a
nice cleanup in itself.

Reviewed-by: Mark Brown <broonie at kernel.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230224/52d62508/attachment-0001.sig>


More information about the linux-arm-kernel mailing list