From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Nicolas Pitre <nicolas.pitre@linaro.org>,
David Howells <dhowells@redhat.com>,
Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Subject: Re: [PULL REQUEST v2] FDPIC ELF support for ARM
Date: Mon, 8 Jun 2020 23:47:25 +0100 [thread overview]
Message-ID: <20200608224725.GH1605@shell.armlinux.org.uk> (raw)
In-Reply-To: <nycvar.YSQ.7.76.1708292307400.2606@knanqh.ubzr>
Nico,
Al Viro has identified this in include/uapi/linux/elfcore.h:
elf_gregset_t pr_reg; /* GP registers */
#ifdef CONFIG_BINFMT_ELF_FDPIC
/* When using FDPIC, the loadmap addresses need to be communicated
* to GDB in order for GDB to do the necessary relocations. The
* fields (below) used to communicate this information are placed
* immediately after ``pr_reg'', so that the loadmap addresses may
* be viewed as part of the register set if so desired.
*/
unsigned long pr_exec_fdpic_loadmap;
unsigned long pr_interp_fdpic_loadmap;
#endif
int pr_fpvalid; /* True if math co-processor being used. */
which means if CONFIG_BINFMT_ELF_FDPIC is enabled for a target that
also uses ELF, then the ELF coredump format breaks. David Howells
says this evening:
23:42 < dhowells> you weren't meant to use ELF and ELF_FDPIC both
So, we now have a problem; your code has done something that was never
intended to be permitted, and there are configurations where the kernel
breaks the user API. This only affects ARM as this is the only arch
that was silly enough to allow ELF and ELF_FDPIC.
Please address.
Thanks.
On Tue, Aug 29, 2017 at 11:16:13PM -0400, Nicolas Pitre wrote:
> Russell, could you please pull the following:
>
> http://git.linaro.org/people/nicolas.pitre/linux fdpic
>
> This series provides the needed changes to suport the ELF_FDPIC binary
> format on ARM. Both MMU and non-MMU systems are supported. This format
> has many advantages over the BFLT format used on MMU-less systems, such
> as being real ELF that can be parsed by standard tools, can support
> shared dynamic libs, etc.
>
> This is based on v4.13-rc4 not to conflict with changes to signal.c
> that happened in v4.13-rc3.
>
> A complete toolchain and prebuilt packages can be obtained here:
>
> https://github.com/mickael-guene/fdpic_manifest
>
> Changes from v1:
>
> - Reworked the signal return code to be compatible with a non-executable
> stack.
> - Rebased on v4.13-rc4 to pick up latest signal changes.
> - Added MMU support.
> - Fixed crash in the ELF-FDPIC loader when loading an executable with
> shared libs on a system with an MMU.
> - Made the regular ELF loader reject FDPIC binaries.
> - Added ACKs and Reviewed-bys.
>
> diffstat:
>
> arch/arm/include/asm/elf.h | 16 +++++++--
> arch/arm/include/asm/mmu.h | 8 +++++
> arch/arm/include/asm/processor.h | 22 +++++++++----
> arch/arm/include/asm/ucontext.h | 1 +
> arch/arm/include/uapi/asm/ptrace.h | 4 +++
> arch/arm/include/uapi/asm/unistd.h | 1 +
> arch/arm/kernel/asm-offsets.c | 4 +++
> arch/arm/kernel/elf.c | 24 +++++++++++++-
> arch/arm/kernel/signal.c | 53 +++++++++++++++++++++---------
> arch/arm/kernel/signal.h | 11 +++++++
> arch/arm/kernel/sigreturn_codes.S | 56 +++++++++++++++++++++++++++++---
> arch/arm/kernel/traps.c | 3 ++
> fs/Kconfig.binfmt | 4 +--
> fs/binfmt_elf.c | 15 +++++++--
> fs/binfmt_elf_fdpic.c | 13 ++++++--
> 15 files changed, 199 insertions(+), 36 deletions(-)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC for 0.8m (est. 1762m) line in suburbia: sync at 13.1Mbps down 503kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-06-08 22:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 3:16 [PULL REQUEST v2] FDPIC ELF support for ARM Nicolas Pitre
2017-09-19 21:14 ` Nicolas Pitre
2020-06-08 22:47 ` Russell King - ARM Linux admin [this message]
2020-06-09 3:48 ` Nicolas Pitre
2020-06-09 4:19 ` Al Viro
2020-06-09 8:06 ` David Howells
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=20200608224725.GH1605@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=dhowells@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=nicolas.pitre@linaro.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;
as well as URLs for NNTP newsgroup(s).