]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: Fix TASK_SIZE on 64-bit NOMMU
authorSamuel Holland <samuel.holland@sifive.com>
Tue, 27 Feb 2024 00:34:46 +0000 (16:34 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2024 14:32:49 +0000 (16:32 +0200)
commita0f0dbbb1bc49fa0de18e92c36492ff6d804cdaa
tree0054c0d1e53582ec1751cf626de3ba24d513ed8a
parente4c881d2127c0bb846fcab4656f2e410fe91cb95
riscv: Fix TASK_SIZE on 64-bit NOMMU

[ Upstream commit 6065e736f82c817c9a597a31ee67f0ce4628e948 ]

On NOMMU, userspace memory can come from anywhere in physical RAM. The
current definition of TASK_SIZE is wrong if any RAM exists above 4G,
causing spurious failures in the userspace access routines.

Fixes: 6bd33e1ece52 ("riscv: add nommu support")
Fixes: c3f896dcf1e4 ("mm: switch the test_vmalloc module to use __vmalloc_node")
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Bo Gan <ganboing@gmail.com>
Link: https://lore.kernel.org/r/20240227003630.3634533-2-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/include/asm/pgtable.h