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: [email protected] Fixes: add2cc6 ("RISC-V: mm: Restrict address space for sv39,sv48,sv57") Signed-off-by: Guo Ren <[email protected]> Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Leonardo Bras <[email protected]> Reviewed-by: Charlie Jenkins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
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)