[PATCH 1/2] Fix AT_EXECFN auxv for no-MMU fdpic

From: Mark Salter
Date: Tue Feb 26 2013 - 10:09:43 EST


In the no-MMU case, the FDPIC loader was passing an offset as the value for
the AT_EXECFN auxv. This patch translates that offset into an actual user
address.

Signed-off-by: Mark Salter <msalter@xxxxxxxxxx>
---
fs/binfmt_elf_fdpic.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index cb240dd..af4c9a4 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -496,6 +496,7 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
sp = arch_align_stack(bprm->p);
#else
sp = mm->start_stack;
+ bprm->exec = sp - (MAX_ARG_PAGES * PAGE_SIZE - bprm->exec);

/* stack the program arguments and environment */
if (elf_fdpic_transfer_args_to_stack(bprm, &sp) < 0)
--
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/