git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
fs
/
binfmt_aout.c
diff --git
a/fs/binfmt_aout.c
b/fs/binfmt_aout.c
index
9bda8b9
..
ee8feb0
100644
(file)
--- a/
fs/binfmt_aout.c
+++ b/
fs/binfmt_aout.c
@@
-24,10
+24,10
@@
#include <linux/binfmts.h>
#include <linux/personality.h>
#include <linux/init.h>
#include <linux/binfmts.h>
#include <linux/personality.h>
#include <linux/init.h>
+#include <linux/vs_memory.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-#include <asm/pgalloc.h>
#include <asm/cacheflush.h>
static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs);
#include <asm/cacheflush.h>
static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs);
@@
-141,14
+141,14
@@
static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file)
/* make sure we actually have a data and stack area to dump */
set_fs(USER_DS);
#ifdef __sparc__
/* make sure we actually have a data and stack area to dump */
set_fs(USER_DS);
#ifdef __sparc__
- if (verify_area(VERIFY_READ, (void
*)
START_DATA(dump), dump.u_dsize))
+ if (verify_area(VERIFY_READ, (void
__user *)
START_DATA(dump), dump.u_dsize))
dump.u_dsize = 0;
dump.u_dsize = 0;
- if (verify_area(VERIFY_READ, (void
*)
START_STACK(dump), dump.u_ssize))
+ if (verify_area(VERIFY_READ, (void
__user *)
START_STACK(dump), dump.u_ssize))
dump.u_ssize = 0;
#else
dump.u_ssize = 0;
#else
- if (verify_area(VERIFY_READ, (void
*)
START_DATA(dump), dump.u_dsize << PAGE_SHIFT))
+ if (verify_area(VERIFY_READ, (void
__user *)
START_DATA(dump), dump.u_dsize << PAGE_SHIFT))
dump.u_dsize = 0;
dump.u_dsize = 0;
- if (verify_area(VERIFY_READ, (void
*)
START_STACK(dump), dump.u_ssize << PAGE_SHIFT))
+ if (verify_area(VERIFY_READ, (void
__user *)
START_STACK(dump), dump.u_ssize << PAGE_SHIFT))
dump.u_ssize = 0;
#endif
dump.u_ssize = 0;
#endif
@@
-194,17
+194,18
@@
end_coredump:
* memory and creates the pointer tables from them, and puts their
* addresses on the "stack", returning the new stack pointer value.
*/
* memory and creates the pointer tables from them, and puts their
* addresses on the "stack", returning the new stack pointer value.
*/
-static unsigned long
* create_aout_tables(char *
p, struct linux_binprm * bprm)
+static unsigned long
__user *create_aout_tables(char __user *
p, struct linux_binprm * bprm)
{
{
- char **argv, **envp;
- unsigned long * sp;
+ char __user * __user *argv;
+ char __user * __user *envp;
+ unsigned long __user *sp;
int argc = bprm->argc;
int envc = bprm->envc;
int argc = bprm->argc;
int envc = bprm->envc;
- sp = (
unsigned long *)
((-(unsigned long)sizeof(char *)) & (unsigned long) p);
+ sp = (
void __user *)
((-(unsigned long)sizeof(char *)) & (unsigned long) p);
#ifdef __sparc__
/* This imposes the proper stack alignment for a new process. */
#ifdef __sparc__
/* This imposes the proper stack alignment for a new process. */
- sp = (
unsigned long
*) (((unsigned long) sp) & ~7);
+ sp = (
void __user
*) (((unsigned long) sp) & ~7);
if ((envc+argc+3)&1) --sp;
#endif
#ifdef __alpha__
if ((envc+argc+3)&1) --sp;
#endif
#ifdef __alpha__
@@
-221,9
+222,9
@@
static unsigned long * create_aout_tables(char * p, struct linux_binprm * bprm)
put_user(0x3e9, --sp);
#endif
sp -= envc+1;
put_user(0x3e9, --sp);
#endif
sp -= envc+1;
- envp = (char
*
*) sp;
+ envp = (char
__user * __user
*) sp;
sp -= argc+1;
sp -= argc+1;
- argv = (char
*
*) sp;
+ argv = (char
__user * __user
*) sp;
#if defined(__i386__) || defined(__mc68000__) || defined(__arm__) || defined(__arch_um__)
put_user((unsigned long) envp,--sp);
put_user((unsigned long) argv,--sp);
#if defined(__i386__) || defined(__mc68000__) || defined(__arm__) || defined(__arch_um__)
put_user((unsigned long) envp,--sp);
put_user((unsigned long) argv,--sp);
@@
-308,8
+309,10
@@
static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
current->mm->brk = ex.a_bss +
(current->mm->start_brk = N_BSSADDR(ex));
current->mm->free_area_cache = TASK_UNMAPPED_BASE;
current->mm->brk = ex.a_bss +
(current->mm->start_brk = N_BSSADDR(ex));
current->mm->free_area_cache = TASK_UNMAPPED_BASE;
-
- current->mm->rss = 0;
+ /* unlimited stack is larger than TASK_SIZE */
+ current->mm->non_executable_cache = current->mm->mmap_top;
+ // current->mm->rss = 0;
+ vx_rsspages_sub(current->mm, current->mm->rss);
current->mm->mmap = NULL;
compute_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
current->mm->mmap = NULL;
compute_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
@@
-421,7
+424,7
@@
beyond_if:
}
current->mm->start_stack =
}
current->mm->start_stack =
- (unsigned long) create_aout_tables((char *) bprm->p, bprm);
+ (unsigned long) create_aout_tables((char
__user
*) bprm->p, bprm);
#ifdef __alpha__
regs->gp = ex.a_gpvalue;
#endif
#ifdef __alpha__
regs->gp = ex.a_gpvalue;
#endif