From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: Scott Wood <scottwood@freescale.com>,
Linuxppc-dev Development <linuxppc-dev@ozlabs.org>,
Paul Mackerras <paulus@samba.org>
Subject: Re: issues w/init
Date: Fri, 17 Apr 2009 19:03:11 +0200 [thread overview]
Message-ID: <1239987791.7210.15.camel@pasglop> (raw)
In-Reply-To: <087C29B1-39CA-4A32-81E6-533FAD21A2BC@kernel.crashing.org>
On Fri, 2009-04-17 at 08:23 -0500, Kumar Gala wrote:
> I can and might have already done this, need to double check. But
> what I was seeing from elf_map is that we don't get PROT_EXEC set for
> this PHDR, but get VM_MAY_EXEC. I'm not clear on what VM_MAY_EXEC is
> intended for.
Looking at a 2.6.29 tree here, I don't see any reference to VM_MAY_EXEC
but I see a VM_MAYEXEC :-) Though it shouldn't be relevant here.
What I see, and what should be checked is:
1- In binfmt_elf.c, what happens with this statement ?
if (elf_read_implies_exec(loc->elf_ex, executable_stack))
current->personality |= READ_IMPLIES_EXEC;
(ie. is the personality flag set ?)
2- When the phdr's are mmap'ed, do you hit this:
if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC))
if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
prot |= PROT_EXEC;
(Which should later be turned into VM_EXEC by calc_vm_prot_bits().
If any of these isn't happening, then we need to figure out why.
Cheers,
Ben.
next prev parent reply other threads:[~2009-04-17 17:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-16 18:21 issues w/init Kumar Gala
2009-04-16 18:53 ` Kumar Gala
2009-04-16 19:25 ` Scott Wood
2009-04-16 19:27 ` Kumar Gala
2009-04-17 7:38 ` Benjamin Herrenschmidt
2009-04-17 10:05 ` Paul Mackerras
2009-04-17 10:33 ` Benjamin Herrenschmidt
2009-04-17 10:41 ` Benjamin Herrenschmidt
2009-04-17 13:23 ` Kumar Gala
2009-04-17 17:03 ` Benjamin Herrenschmidt [this message]
2009-04-17 17:40 ` Kumar Gala
2009-04-17 17:51 ` Benjamin Herrenschmidt
2009-04-17 13:59 ` Kumar Gala
2009-04-17 17:04 ` Benjamin Herrenschmidt
2009-04-17 7:37 ` Benjamin Herrenschmidt
2009-04-17 7:33 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1239987791.7210.15.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=scottwood@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).