mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
linux-user: remove MAX_ARG_PAGES limit
Instead of creating a temporary copy for the whole environment and the arguments, directly copy everything to the target stack. For this to work, we have to change the order of stack creation and copying the arguments. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
84646ee25b
commit
59baae9a62
5 changed files with 55 additions and 75 deletions
|
|
@ -135,10 +135,7 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp,
|
|||
struct linux_binprm *bprm)
|
||||
{
|
||||
int retval;
|
||||
int i;
|
||||
|
||||
bprm->p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int);
|
||||
memset(bprm->page, 0, sizeof(bprm->page));
|
||||
bprm->fd = fdexec;
|
||||
bprm->filename = (char *)filename;
|
||||
bprm->argc = count(argv);
|
||||
|
|
@ -172,9 +169,5 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp,
|
|||
return retval;
|
||||
}
|
||||
|
||||
/* Something went wrong, return the inode and free the argument pages*/
|
||||
for (i=0 ; i<MAX_ARG_PAGES ; i++) {
|
||||
g_free(bprm->page[i]);
|
||||
}
|
||||
return(retval);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue