projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parisc,metag: Do not hardcode maximum userspace stack size
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
arch
/
parisc
/
kernel
/
sys_parisc.c
diff --git
a/arch/parisc/kernel/sys_parisc.c
b/arch/parisc/kernel/sys_parisc.c
index
b7cadc4
..
e1ffea2
100644
(file)
--- a/
arch/parisc/kernel/sys_parisc.c
+++ b/
arch/parisc/kernel/sys_parisc.c
@@
-45,7
+45,7
@@
static int get_offset(unsigned int last_mmap)
{
static int get_offset(unsigned int last_mmap)
{
- return (last_mmap & (SHM
LBA
-1)) >> PAGE_SHIFT;
+ return (last_mmap & (SHM
_COLOUR
-1)) >> PAGE_SHIFT;
}
static unsigned long shared_align_offset(unsigned int last_mmap,
}
static unsigned long shared_align_offset(unsigned int last_mmap,
@@
-57,8
+57,8
@@
static unsigned long shared_align_offset(unsigned int last_mmap,
static inline unsigned long COLOR_ALIGN(unsigned long addr,
unsigned int last_mmap, unsigned long pgoff)
{
static inline unsigned long COLOR_ALIGN(unsigned long addr,
unsigned int last_mmap, unsigned long pgoff)
{
- unsigned long base = (addr+SHM
LBA-1) & ~(SHMLBA
-1);
- unsigned long off = (SHM
LBA
-1) &
+ unsigned long base = (addr+SHM
_COLOUR-1) & ~(SHM_COLOUR
-1);
+ unsigned long off = (SHM
_COLOUR
-1) &
(shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT);
return base + off;
(shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT);
return base + off;
@@
-72,10
+72,10
@@
static unsigned long mmap_upper_limit(void)
{
unsigned long stack_base;
{
unsigned long stack_base;
- /* Limit stack size
to 1GB
- see setup_arg_pages() in fs/exec.c */
+ /* Limit stack size - see setup_arg_pages() in fs/exec.c */
stack_base = rlimit_max(RLIMIT_STACK);
stack_base = rlimit_max(RLIMIT_STACK);
- if (stack_base >
(1 << 30)
)
- stack_base =
1 << 30
;
+ if (stack_base >
STACK_SIZE_MAX
)
+ stack_base =
STACK_SIZE_MAX
;
return PAGE_ALIGN(STACK_TOP - stack_base);
}
return PAGE_ALIGN(STACK_TOP - stack_base);
}
@@
-101,7
+101,7
@@
unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED) {
if ((flags & MAP_SHARED) && last_mmap &&
(addr - shared_align_offset(last_mmap, pgoff))
if (flags & MAP_FIXED) {
if ((flags & MAP_SHARED) && last_mmap &&
(addr - shared_align_offset(last_mmap, pgoff))
- & (SHM
LBA
- 1))
+ & (SHM
_COLOUR
- 1))
return -EINVAL;
goto found_addr;
}
return -EINVAL;
goto found_addr;
}
@@
-122,7
+122,7
@@
unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
info.length = len;
info.low_limit = mm->mmap_legacy_base;
info.high_limit = mmap_upper_limit();
info.length = len;
info.low_limit = mm->mmap_legacy_base;
info.high_limit = mmap_upper_limit();
- info.align_mask = last_mmap ? (PAGE_MASK & (SHM
LBA
- 1)) : 0;
+ info.align_mask = last_mmap ? (PAGE_MASK & (SHM
_COLOUR
- 1)) : 0;
info.align_offset = shared_align_offset(last_mmap, pgoff);
addr = vm_unmapped_area(&info);
info.align_offset = shared_align_offset(last_mmap, pgoff);
addr = vm_unmapped_area(&info);
@@
-161,7
+161,7
@@
arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (flags & MAP_FIXED) {
if ((flags & MAP_SHARED) && last_mmap &&
(addr - shared_align_offset(last_mmap, pgoff))
if (flags & MAP_FIXED) {
if ((flags & MAP_SHARED) && last_mmap &&
(addr - shared_align_offset(last_mmap, pgoff))
- & (SHM
LBA
- 1))
+ & (SHM
_COLOUR
- 1))
return -EINVAL;
goto found_addr;
}
return -EINVAL;
goto found_addr;
}
@@
-182,7
+182,7
@@
arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
info.length = len;
info.low_limit = PAGE_SIZE;
info.high_limit = mm->mmap_base;
info.length = len;
info.low_limit = PAGE_SIZE;
info.high_limit = mm->mmap_base;
- info.align_mask = last_mmap ? (PAGE_MASK & (SHM
LBA
- 1)) : 0;
+ info.align_mask = last_mmap ? (PAGE_MASK & (SHM
_COLOUR
- 1)) : 0;
info.align_offset = shared_align_offset(last_mmap, pgoff);
addr = vm_unmapped_area(&info);
if (!(addr & ~PAGE_MASK))
info.align_offset = shared_align_offset(last_mmap, pgoff);
addr = vm_unmapped_area(&info);
if (!(addr & ~PAGE_MASK))