Commit 37ca0d22 authored by Alexandre Ghiti's avatar Alexandre Ghiti Committed by Zheng Zengkai
Browse files

riscv: Get rid of MAX_EARLY_MAPPING_SIZE

stable inclusion
from stable-5.10.21
commit bd9f7dc079f1b754447563acf952a4620b32575f
bugzilla: 50609

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

commit 0f02de44 upstream.

At early boot stage, we have a whole PGDIR to map the kernel, so there
is no need to restrict the early mapping size to 128MB. Removing this
define also allows us to simplify some compile time logic.

This fixes large kernel mappings with a size greater than 128MB, as it
is the case for syzbot kernels whose size was just ~130MB.

Note that on rv64, for now, we are then limited to PGDIR size for early
mapping as we can't use PGD mappings (see [1]). That should be enough
given the relative small size of syzbot kernels compared to PGDIR_SIZE
which is 1GB.

[1] https://lore.kernel.org/lkml/20200603153608.30056-1-alex@ghiti.fr/



Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
Signed-off-by: default avatarAlexandre Ghiti <alex@ghiti.fr>
Tested-by: default avatarDmitry Vyukov <dvyukov@google.com>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 28108e80
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment