Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
8aa1cb75
Commit
8aa1cb75
authored
Nov 07, 2002
by
Matthew Wilcox
Committed by
Linus Torvalds
Nov 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] CONFIG_STACK_GROWSUP
Change ARCH_STACK_GROWSUP to CONFIG_STACK_GROWSUP as requested.
parent
4c312efd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
8 deletions
+14
-8
arch/parisc/Kconfig
arch/parisc/Kconfig
+4
-0
fs/binfmt_elf.c
fs/binfmt_elf.c
+2
-2
fs/exec.c
fs/exec.c
+2
-2
include/asm-parisc/pgtable.h
include/asm-parisc/pgtable.h
+0
-2
include/linux/mm.h
include/linux/mm.h
+5
-1
mm/mmap.c
mm/mmap.c
+1
-1
No files found.
arch/parisc/Kconfig
View file @
8aa1cb75
...
...
@@ -22,6 +22,10 @@ config SWAP
bool
default y
config STACK_GROWSUP
bool
default y
config UID16
bool
...
...
fs/binfmt_elf.c
View file @
8aa1cb75
...
...
@@ -109,7 +109,7 @@ static void padzero(unsigned long elf_bss)
}
/* Let's use some macros to make this stack manipulation a litle clearer */
#ifdef
ARCH
_STACK_GROWSUP
#ifdef
CONFIG
_STACK_GROWSUP
#define STACK_ADD(sp, items) ((elf_addr_t *)(sp) + (items))
#define STACK_ROUND(sp, items) \
((15 + (unsigned long) ((sp) + (items))) &~ 15UL)
...
...
@@ -207,7 +207,7 @@ create_elf_tables(struct linux_binprm *bprm, struct elfhdr * exec,
bprm
->
p
=
STACK_ROUND
(
sp
,
items
);
/* Point sp at the lowest address on the stack */
#ifdef
ARCH
_STACK_GROWSUP
#ifdef
CONFIG
_STACK_GROWSUP
sp
=
(
elf_addr_t
*
)
bprm
->
p
-
items
-
ei_index
;
bprm
->
exec
=
(
unsigned
long
)
sp
;
/* XXX: PARISC HACK */
#else
...
...
fs/exec.c
View file @
8aa1cb75
...
...
@@ -331,7 +331,7 @@ int setup_arg_pages(struct linux_binprm *bprm)
struct
mm_struct
*
mm
=
current
->
mm
;
int
i
;
#ifdef
ARCH
_STACK_GROWSUP
#ifdef
CONFIG
_STACK_GROWSUP
/* Move the argument and environment strings to the bottom of the
* stack space.
*/
...
...
@@ -390,7 +390,7 @@ int setup_arg_pages(struct linux_binprm *bprm)
down_write
(
&
mm
->
mmap_sem
);
{
mpnt
->
vm_mm
=
mm
;
#ifdef
ARCH
_STACK_GROWSUP
#ifdef
CONFIG
_STACK_GROWSUP
mpnt
->
vm_start
=
stack_base
;
mpnt
->
vm_end
=
PAGE_MASK
&
(
PAGE_SIZE
-
1
+
(
unsigned
long
)
bprm
->
p
);
...
...
include/asm-parisc/pgtable.h
View file @
8aa1cb75
...
...
@@ -13,8 +13,6 @@
#include <asm/cache.h>
#include <asm/bitops.h>
#define ARCH_STACK_GROWSUP
/*
* kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
* memory. For the return value to be meaningful, ADDR must be >=
...
...
include/linux/mm.h
View file @
8aa1cb75
...
...
@@ -106,7 +106,11 @@ struct vm_area_struct {
#define VM_ACCOUNT 0x00100000
/* Is a VM accounted object */
#define VM_HUGETLB 0x00400000
/* Huge TLB Page VM */
#define VM_STACK_FLAGS (0x00000100 | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
#ifdef CONFIG_STACK_GROWSUP
#define VM_STACK_FLAGS (VM_GROWSUP | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
#else
#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT)
#endif
#define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ)
#define VM_ClearReadHint(v) (v)->vm_flags &= ~VM_READHINTMASK
...
...
mm/mmap.c
View file @
8aa1cb75
...
...
@@ -767,7 +767,7 @@ struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
return
prev
?
prev
->
vm_next
:
vma
;
}
#ifdef
ARCH
_STACK_GROWSUP
#ifdef
CONFIG
_STACK_GROWSUP
/*
* vma is the first one with address > vma->vm_end. Have to extend vma.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment