linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Fix AT_EXECFN auxv for no-MMU fdpic
@ 2013-02-26 15:09 Mark Salter
  2013-02-26 15:09 ` [PATCH 2/2] Fix /proc/<pid>/auxv for FDPIC binaries Mark Salter
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Salter @ 2013-02-26 15:09 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, linux-kernel, Mark Salter

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@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-26 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-26 15:09 [PATCH 1/2] Fix AT_EXECFN auxv for no-MMU fdpic Mark Salter
2013-02-26 15:09 ` [PATCH 2/2] Fix /proc/<pid>/auxv for FDPIC binaries Mark Salter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).