From: Thierry Reding <thierry.reding@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>,
linux-mips@linux-mips.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 03/10] binfmt_elf: allow arch code to examine PT_LOPROC ... PT_HIPROC headers
Date: Wed, 12 Nov 2014 14:41:04 +0100 [thread overview]
Message-ID: <20141112134059.GA12619@ulmo> (raw)
In-Reply-To: <1410420623-11691-4-git-send-email-paul.burton@imgtec.com>
[-- Attachment #1: Type: text/plain, Size: 2994 bytes --]
On Thu, Sep 11, 2014 at 08:30:16AM +0100, Paul Burton wrote:
> MIPS is introducing new variants of its O32 ABI which differ in their
> handling of floating point, in order to enable a gradual transition
> towards a world where mips32 binaries can take advantage of new hardware
> features only available when configured for certain FP modes. In order
> to do this ELF binaries are being augmented with a new section that
> indicates, amongst other things, the FP mode requirements of the binary.
> The presence & location of such a section is indicated by a program
> header in the PT_LOPROC ... PT_HIPROC range.
>
> In order to allow the MIPS architecture code to examine the program
> header & section in question, pass all program headers in this range
> to an architecture-specific arch_elf_pt_proc function. This function
> may return an error if the header is deemed invalid or unsuitable for
> the system, in which case that error will be returned from
> load_elf_binary and upwards through the execve syscall.
>
> A means is required for the architecture code to make a decision once
> it is known that all such headers have been seen, but before it is too
> late to return from an execve syscall. For this purpose the
> arch_check_elf function is added, and called once, after all PT_LOPROC
> to PT_HIPROC headers have been passed to arch_elf_pt_proc but before
> the code which invoked execve has been lost. This enables the
> architecture code to make a decision based upon all the headers present
> in an ELF binary and its interpreter, as is required to forbid
> conflicting FP ABI requirements between an ELF & its interpreter.
>
> In order to allow data to be stored throughout the calls to the above
> functions, struct arch_elf_state is introduced.
>
> Finally a variant of the SET_PERSONALITY macro is introduced which
> accepts a pointer to the struct arch_elf_state, allowing it to act
> based upon state observed from the architecture specific program
> headers.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> ---
> fs/Kconfig.binfmt | 3 +++
> fs/binfmt_elf.c | 36 ++++++++++++++++++++++++--
> include/linux/elf.h | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 110 insertions(+), 2 deletions(-)
Hi Ralf,
This commit showed up in linux-next and causes a warning in linux/elf.h
because it doesn't know struct file. I've fixed it locally with this:
---
diff --git a/include/linux/elf.h b/include/linux/elf.h
index 6bd15043a585..dac5caaa3509 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -4,6 +4,8 @@
#include <asm/elf.h>
#include <uapi/linux/elf.h>
+struct file;
+
#ifndef elf_read_implies_exec
/* Executables for which elf_read_implies_exec() returns TRUE will
have the READ_IMPLIES_EXEC personality flag set automatically.
---
Would you mind squashing that into the above commit to get rid of the
warning?
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-11-12 13:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 7:30 [PATCH 00/10] MIPS O32 new FP ABI support Paul Burton
2014-09-11 7:30 ` [PATCH 01/10] binfmt_elf: hoist ELF program header loading to a function Paul Burton
2014-09-11 7:30 ` [PATCH 02/10] binfmt_elf: load interpreter program headers earlier Paul Burton
2014-11-13 12:20 ` Thierry Reding
2014-11-13 17:29 ` Ralf Baechle
2014-09-11 7:30 ` [PATCH 03/10] binfmt_elf: allow arch code to examine PT_LOPROC ... PT_HIPROC headers Paul Burton
2014-11-12 13:41 ` Thierry Reding [this message]
2014-11-13 0:16 ` Ralf Baechle
2014-11-13 12:25 ` Thierry Reding
2014-09-11 7:30 ` [PATCH 04/10] MIPS: define bits introduced for hybrid FPRs Paul Burton
2014-09-11 7:30 ` [PATCH 05/10] MIPS: detect presence of the FRE & UFR bits Paul Burton
2014-09-11 7:30 ` [PATCH 06/10] MIPS: ensure Config5.UFE is clear on boot Paul Burton
2014-09-11 7:30 ` [PATCH 07/10] MIPS: support for hybrid FPRs Paul Burton
2014-12-23 23:21 ` Aaro Koskinen
2014-12-23 23:31 ` James Hogan
2014-12-23 23:51 ` Aaro Koskinen
2014-09-11 7:30 ` [PATCH 08/10] MIPS: ELF: add definition for the .MIPS.abiflags section Paul Burton
2014-09-11 7:30 ` [PATCH 09/10] MIPS: ELF: set FP mode according to .MIPS.abiflags Paul Burton
2014-09-11 7:30 ` [PATCH 10/10] MIPS: Kconfig option to better exercise/debug hybrid FPRs Paul Burton
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=20141112134059.GA12619@ulmo \
--to=thierry.reding@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=paul.burton@imgtec.com \
--cc=ralf@linux-mips.org \
--cc=viro@zeniv.linux.org.uk \
/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