From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/2] arm64: EFI stub isolation
Date: Thu, 1 Oct 2015 14:18:19 +0200 [thread overview]
Message-ID: <1443701901-17625-1-git-send-email-ard.biesheuvel@linaro.org> (raw)
We need to ensure that the EFI stub only uses parts of the kernel proper
that are safe to use when the kernel virtual mapping is not active yet.
So move all C code dependencies to the libstub, and do a verification pass
to ensure that no absolute relocations are used.
On the arm64 side, annotate all the stub's dependencies as safe for PI
(position independent
Changes since v1:
- add .size and .type directives to correctly annotate the __pi_xxx aliases
as functions of the correct size
- add '#ifndef __HAVE_ARCH_STRSTR' around strstr() definition
- added linux-efi/Matt to cc
Ard Biesheuvel (2):
arm64: use ENDPIPROC() to annotate position independent assembler
routines
arm64/efi: isolate EFI stub from the kernel proper
arch/arm64/include/asm/assembler.h | 11 ++++
arch/arm64/kernel/Makefile | 12 ++++-
arch/arm64/kernel/efi-entry.S | 10 ++--
arch/arm64/kernel/head.S | 14 ++---
arch/arm64/kernel/image.h | 27 ++++++++++
arch/arm64/lib/memchr.S | 2 +-
arch/arm64/lib/memcmp.S | 2 +-
arch/arm64/lib/memcpy.S | 2 +-
arch/arm64/lib/memmove.S | 2 +-
arch/arm64/lib/memset.S | 2 +-
arch/arm64/lib/strlen.S | 2 +-
arch/arm64/lib/strncmp.S | 2 +-
arch/arm64/mm/cache.S | 10 ++--
drivers/firmware/efi/libstub/Makefile | 31 +++++++++--
drivers/firmware/efi/libstub/string.c | 57 ++++++++++++++++++++
15 files changed, 157 insertions(+), 29 deletions(-)
create mode 100644 drivers/firmware/efi/libstub/string.c
--
1.9.1
next reply other threads:[~2015-10-01 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 12:18 Ard Biesheuvel [this message]
2015-10-01 12:18 ` [PATCH v2 1/2] arm64: use ENDPIPROC() to annotate position independent assembler routines Ard Biesheuvel
2015-10-01 12:18 ` [PATCH v2 2/2] arm64/efi: isolate EFI stub from the kernel proper Ard Biesheuvel
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=1443701901-17625-1-git-send-email-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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).