Commit 60c8a2d4 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Felix Fu
Browse files

ARM: decompressor: add KASLR support

maillist inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8KNA9
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?h=arm-kaslr-latest&id=b152e5c5054c3937211a541be50d8a7c98a59974



-------------------------------------------------

Update <generated/utsversion.h> depend in OLK-6.6

Add support to the decompressor to load the kernel at a randomized
offset, and invoke the kernel proper while passing on the information
about the offset at which the kernel was loaded.

This implementation will extract some pseudo-randomness from the low
bits of the generic timer (if available), and use CRC-16 to combine
it with the build ID string and the device tree binary (which ideally
has a /chosen/kaslr-seed property, but may also have other properties
that differ between boots). This seed is used to select one of the
candidate offsets in the lowmem region that don't overlap the zImage
itself, the DTB, the initrd and /memreserve/s and/or /reserved-memory
nodes that should be left alone.

When booting via the UEFI stub, it is left up to the firmware to supply
a suitable seed and select an offset.

Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarCui GaoSheng <cuigaosheng1@huawei.com>
Signed-off-by: default avatarYe Bin <yebin10@huawei.com>

Conflicts:
    Merge OLK-5.10 fix patch 1cd67b23
    Merge OLK-5.10 fix patch bbfbad16
    Merge OLK-5.10 fix patch a67342ed
    Merge OLK-5.10 fix patch 53a643ec
    Merge OLK-5.10 fix patch 4699c8e4
    Merge OLK-5.10 fix patch 4c19869f

Signed-off-by: default avatarFelix Fu <fuzhen5@huawei.com>
parent f9a36bda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment