kernel/arch: Put KERNEL_USER_DATA_BASE at USER_STACK_REGION.
x86_64 already does this and it seems to work fine. Since stack areas grow downwards and should always have a guard page, overruns shouldn't be too much of a concern (for that matter, randomization still makes a difference here also, it seems.) This allows us to regain another ~256 MB or so of contiguous address space (areas smaller than that could still be inserted in the 0x6.. to 0x7.. block, but if you had 10MB of free address space below 0x6.., and 246MB above it, you couldn't allocate a 256MB block.) Part of #19592.
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
#define USER_SIZE (0x80000000 - (0x10000 + USER_BASE))
|
||||
#define USER_TOP (USER_BASE + (USER_SIZE - 1))
|
||||
|
||||
#define KERNEL_USER_DATA_BASE 0x60000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define KERNEL_USER_DATA_BASE 0x70000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define USER_STACK_REGION_SIZE ((USER_TOP - USER_STACK_REGION) + 1)
|
||||
|
||||
#endif /* _KERNEL_ARCH_ARM_KERNEL_H */
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#define USER_SIZE (0x80000000 - (0x10000 + USER_BASE))
|
||||
#define USER_TOP (USER_BASE + (USER_SIZE - 1))
|
||||
|
||||
#define KERNEL_USER_DATA_BASE 0x60000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define KERNEL_USER_DATA_BASE 0x70000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define USER_STACK_REGION_SIZE ((USER_TOP - USER_STACK_REGION) + 1)
|
||||
|
||||
#endif /* _KERNEL_ARCH_M68K_KERNEL_H */
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#define USER_SIZE (0x80000000 - (0x10000 + USER_BASE))
|
||||
#define USER_TOP (USER_BASE + (USER_SIZE - 1))
|
||||
|
||||
#define KERNEL_USER_DATA_BASE 0x60000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define KERNEL_USER_DATA_BASE 0x70000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define USER_STACK_REGION_SIZE ((USER_TOP - USER_STACK_REGION) + 1)
|
||||
|
||||
#endif /* _KERNEL_ARCH_MIPSEL_KERNEL_H */
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#define USER_SIZE (0x80000000 - (0x10000 + USER_BASE))
|
||||
#define USER_TOP (USER_BASE + (USER_SIZE - 1))
|
||||
|
||||
#define KERNEL_USER_DATA_BASE 0x60000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define KERNEL_USER_DATA_BASE 0x70000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define USER_STACK_REGION_SIZE ((USER_TOP - USER_STACK_REGION) + 1)
|
||||
|
||||
#endif /* _KERNEL_ARCH_PPC_KERNEL_H */
|
||||
|
||||
@@ -61,8 +61,7 @@
|
||||
#define USER32_SIZE 0x100000000
|
||||
#define USER32_TOP (USER_BASE + (USER32_SIZE - 1))
|
||||
|
||||
#define KERNEL_USER32_DATA_BASE 0x60000000
|
||||
|
||||
#define KERNEL_USER32_DATA_BASE 0x70000000
|
||||
#define USER32_STACK_REGION 0x70000000
|
||||
#define USER32_STACK_REGION_SIZE ((USER32_TOP - USER32_STACK_REGION) + 1)
|
||||
|
||||
@@ -89,7 +88,7 @@
|
||||
#define USER_SIZE (KERNEL_BASE - (0x10000 + USER_BASE))
|
||||
#define USER_TOP (USER_BASE + (USER_SIZE - 1))
|
||||
|
||||
#define KERNEL_USER_DATA_BASE 0x60000000
|
||||
#define KERNEL_USER_DATA_BASE 0x70000000
|
||||
#define USER_STACK_REGION 0x70000000
|
||||
#define USER_STACK_REGION_SIZE ((USER_TOP - USER_STACK_REGION) + 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user