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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux