Skip to content

Commit 97b7ac6

Browse files
guoren83palmer-dabbelt
authored andcommitted
riscv: mm: Fixup compat arch_get_mmap_end
When the task is in COMPAT mode, the arch_get_mmap_end should be 2GB, not TASK_SIZE_64. The TASK_SIZE has contained is_compat_mode() detection, so change the definition of STACK_TOP_MAX to TASK_SIZE directly. Cc: stable@vger.kernel.org Fixes: add2cc6 ("RISC-V: mm: Restrict address space for sv39,sv48,sv57") Signed-off-by: Guo Ren <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> Reviewed-by: Leonardo Bras <leobras@redhat.com> Reviewed-by: Charlie Jenkins <charlie@rivosinc.com> Link: https://lore.kernel.org/r/20231222115703.2404036-3-guoren@kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 5f449e2 commit 97b7ac6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/include/asm/processor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#ifdef CONFIG_64BIT
1818
#define DEFAULT_MAP_WINDOW (UL(1) << (MMAP_VA_BITS - 1))
19-
#define STACK_TOP_MAX TASK_SIZE_64
19+
#define STACK_TOP_MAX TASK_SIZE
2020

2121
#define arch_get_mmap_end(addr, len, flags) \
2222
({ \

0 commit comments

Comments
 (0)