From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv6 4/8] arm64: Move some head.text functions to executable section
Date: Wed, 26 Nov 2014 16:30:27 +0000 [thread overview]
Message-ID: <20141126163027.GC1819@leverpostej> (raw)
In-Reply-To: <1416606645-25633-5-git-send-email-lauraa@codeaurora.org>
Hi Laura,
On Fri, Nov 21, 2014 at 09:50:41PM +0000, Laura Abbott wrote:
> The head.text section is intended to be run at early bootup
> before any of the regular kernel mappings have been setup.
> Parts of head.text may be freed back into the buddy allocator
> due to TEXT_OFFSET so for security requirements this memory
> must not be executable. The suspend/resume/hotplug code path
> requires some of these head.S functions to run however which
> means they need to be executable. Support these conflicting
> requirements by moving the few head.text functions that need
> to be executable to the text section which has the appropriate
> page table permissions.
>
> Tested-by: Kees Cook <keescook@chromium.org>
> Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Other than a minor nit below this looks good to me, and I'm not seeing
any issues with boot, hotplug, or idle, so:
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Thanks for putting this together!
> ---
> v6: Dropped the latehead.text bit and just moved everything to the regular
> text section
> ---
> arch/arm64/kernel/head.S | 407 ++++++++++++++++++++++++-----------------------
> 1 file changed, 210 insertions(+), 197 deletions(-)
>
> diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
> index 10f5cc0..4b63d7a 100644
> --- a/arch/arm64/kernel/head.S
> +++ b/arch/arm64/kernel/head.S
> @@ -238,7 +238,13 @@ ENTRY(stext)
> mov x0, x22
> bl lookup_processor_type
> mov x23, x0 // x23=current cpu_table
> - cbz x23, __error_p // invalid processor (x23=0)?
> + /*
> + * __error_p may end up out of range for cbz if text areas
> + * are aligned up to section sizes
> + */
Nit: We don't need to align the comment text (we don't for the comment a
few lines later, or any others in this file). It would be nice to keep
that consistent.
Thanks,
Mark.
next prev parent reply other threads:[~2014-11-26 16:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 21:50 [PATCHv6 0/8] Better page protections for arm64 Laura Abbott
2014-11-21 21:50 ` [PATCHv6 1/8] arm64: Treat handle_arch_irq as a function pointer Laura Abbott
2014-11-21 21:50 ` [PATCHv6 2/8] arm64: Switch to adrp for loading the stub vectors Laura Abbott
2014-11-21 21:50 ` [PATCHv6 3/8] arm64: Move cpu_resume into the text section Laura Abbott
2014-11-21 21:50 ` [PATCHv6 4/8] arm64: Move some head.text functions to executable section Laura Abbott
2014-11-26 16:30 ` Mark Rutland [this message]
2014-11-26 17:11 ` Will Deacon
2014-11-21 21:50 ` [PATCHv6 5/8] arm64: Factor out fixmap initialiation from ioremap Laura Abbott
2014-11-21 21:50 ` [PATCHv6 6/8] arm64: use fixmap for text patching when text is RO Laura Abbott
2014-11-25 17:04 ` Mark Rutland
2014-11-25 18:54 ` Laura Abbott
2014-11-26 16:18 ` Mark Rutland
2014-12-02 15:59 ` Catalin Marinas
2014-11-21 21:50 ` [PATCHv6 7/8] arm64: efi: Use ioremap_exec for code sections Laura Abbott
2014-11-25 17:26 ` Mark Rutland
2014-11-25 18:57 ` Laura Abbott
2014-12-02 17:15 ` Catalin Marinas
2014-12-02 17:20 ` Ard Biesheuvel
2014-11-21 21:50 ` [PATCHv6] arm64: add better page protections to arm64 Laura Abbott
2014-12-02 18:28 ` Catalin Marinas
2015-01-14 19:26 ` Laura Abbott
2014-11-25 15:33 ` [PATCHv6 0/8] Better page protections for arm64 Will Deacon
2014-11-25 16:32 ` Kees Cook
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=20141126163027.GC1819@leverpostej \
--to=mark.rutland@arm.com \
--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