diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2021-02-05 19:23:00 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2021-03-09 10:25:17 +0000 |
commit | c4e792d1acce31c2eb7b9193ab06ab94de05bf42 (patch) | |
tree | 0854581f938a7eb7c60dfd4143819097bc0272c0 /arch/arm/mm | |
parent | a38fd8748464831584a19438cbb3082b5a2dab15 (diff) | |
download | linux-stable-c4e792d1acce31c2eb7b9193ab06ab94de05bf42.tar.gz linux-stable-c4e792d1acce31c2eb7b9193ab06ab94de05bf42.tar.bz2 linux-stable-c4e792d1acce31c2eb7b9193ab06ab94de05bf42.zip |
ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld
The LLVM ld.lld linker uses a different symbol type for __bss_start,
resulting in the calculation of KBSS_SZ to be thrown off. Up until now,
this has gone unnoticed as it only affects the appended DTB case, but
pending changes for ARM in the way the decompressed kernel is cleaned
from the caches has uncovered this problem.
On a ld.lld build:
$ nm vmlinux |grep bss_
c1c22034 D __bss_start
c1c86e98 B __bss_stop
resulting in
$ readelf -s arch/arm/boot/compressed/vmlinux | grep bss_size
433: c1c86e98 0 NOTYPE GLOBAL DEFAULT ABS _kernel_bss_size
which is obviously incorrect, and may cause the cache clean to access
unmapped memory, or cause the size calculation to wrap, resulting in no
cache clean to be performed at all.
Fix this by updating the sed regex to take D type symbols into account.
Link: https://lore.kernel.org/linux-arm-kernel/6c65bcef-d4e7-25fa-43cf-2c435bb61bb9@collabora.com/
Link: https://lore.kernel.org/linux-arm-kernel/20210205085220.31232-1-ardb@kernel.org/
Cc: <stable@vger.kernel.org> # v4.19+
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/mm')
0 files changed, 0 insertions, 0 deletions