Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b111757c authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Linus Torvalds
Browse files

arch: personality independent stack top



New arch macro STACK_TOP_MAX it gives the larges valid stack address for the
architecture in question.

It differs from STACK_TOP in that it will not distinguish between
personalities but will always return the largest possible address.

This is used to create the initial stack on execve, which we will move down to
the proper location once the binfmt code has figured out where that is.

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarOllie Wild <aaw@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f34e3b61
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -101,6 +101,8 @@ struct exec
#define STACK_TOP \
#define STACK_TOP \
  (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
  (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)


#define STACK_TOP_MAX	0x00120000000UL

#endif
#endif


#endif /* __A_OUT_GNU_H__ */
#endif /* __A_OUT_GNU_H__ */
+1 −0
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@ struct exec
#ifdef __KERNEL__
#ifdef __KERNEL__
#define STACK_TOP	((current->personality == PER_LINUX_32BIT) ? \
#define STACK_TOP	((current->personality == PER_LINUX_32BIT) ? \
			 TASK_SIZE : TASK_SIZE_26)
			 TASK_SIZE : TASK_SIZE_26)
#define STACK_TOP_MAX	TASK_SIZE
#endif
#endif


#ifndef LIBRARY_START_TEXT
#ifndef LIBRARY_START_TEXT
+1 −0
Original line number Original line Diff line number Diff line
@@ -29,6 +29,7 @@ struct exec


#ifdef __KERNEL__
#ifdef __KERNEL__
#define STACK_TOP	TASK_SIZE
#define STACK_TOP	TASK_SIZE
#define STACK_TOP_MAX	STACK_TOP
#endif
#endif


#ifndef LIBRARY_START_TEXT
#ifndef LIBRARY_START_TEXT
+1 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ struct exec
#ifdef __KERNEL__
#ifdef __KERNEL__


#define STACK_TOP	TASK_SIZE
#define STACK_TOP	TASK_SIZE
#define STACK_TOP_MAX	STACK_TOP


#endif
#endif


+1 −0
Original line number Original line Diff line number Diff line
@@ -8,6 +8,7 @@


/* grabbed from the intel stuff  */   
/* grabbed from the intel stuff  */   
#define STACK_TOP TASK_SIZE
#define STACK_TOP TASK_SIZE
#define STACK_TOP_MAX	STACK_TOP




struct exec
struct exec
Loading