File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change 1414
1515#include <asm/ptrace.h>
1616
17- /*
18- * addr is a hint to the maximum userspace address that mmap should provide, so
19- * this macro needs to return the largest address space available so that
20- * mmap_end < addr, being mmap_end the top of that address space.
21- * See Documentation/arch/riscv/vm-layout.rst for more details.
22- */
2317#define arch_get_mmap_end (addr , len , flags ) \
2418({ \
25- unsigned long mmap_end; \
26- typeof(addr) _addr = (addr); \
27- if ((_addr) == 0 || is_compat_task() || \
28- ((_addr + len) > BIT(VA_BITS - 1))) \
29- mmap_end = STACK_TOP_MAX; \
30- else \
31- mmap_end = (_addr + len); \
32- mmap_end; \
19+ STACK_TOP_MAX; \
3320})
3421
3522#define arch_get_mmap_base (addr , base ) \
3623({ \
37- unsigned long mmap_base; \
38- typeof(addr) _addr = (addr); \
39- typeof(base) _base = (base); \
40- unsigned long rnd_gap = DEFAULT_MAP_WINDOW - (_base); \
41- if ((_addr) == 0 || is_compat_task() || \
42- ((_addr + len) > BIT(VA_BITS - 1))) \
43- mmap_base = (_base); \
44- else \
45- mmap_base = (_addr + len) - rnd_gap; \
46- mmap_base; \
24+ base; \
4725})
4826
4927#ifdef CONFIG_64BIT
You can’t perform that action at this time.
0 commit comments