From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: your mail
Date: Tue, 28 Oct 2014 14:19:07 +0000 [thread overview]
Message-ID: <20141028141907.GG9796@leverpostej> (raw)
In-Reply-To: <20141028141325.GE9796@leverpostej>
On Tue, Oct 28, 2014 at 02:13:25PM +0000, Mark Rutland wrote:
> Bcc:
> Subject: Re: [PATCHv4 7/7] arm64: add better page protections to arm64
> Reply-To:
> In-Reply-To: <1414440752-9411-8-git-send-email-lauraa@codeaurora.org>
Apologies for this, I appear to have accidentally inserted a newline and
confused my mail client. I'll resend this with that fixed.
Mark.
>
> Hi Laura,
>
> On Mon, Oct 27, 2014 at 08:12:32PM +0000, Laura Abbott wrote:
> > Add page protections for arm64 similar to those in arm.
> > This is for security reasons to prevent certain classes
> > of exploits. The current method:
> >
> > - Map all memory as either RWX or RW. We round to the nearest
> > section to avoid creating page tables before everything is mapped
> > - Once everything is mapped, if either end of the RWX section should
> > not be X, we split the PMD and remap as necessary
> > - When initmem is to be freed, we change the permissions back to
> > RW (using stop machine if necessary to flush the TLB)
> > - If CONFIG_DEBUG_RODATA is set, the read only sections are set
> > read only.
> >
> > Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
> > ---
> > v4: Combined the Kconfig options
> > ---
> > arch/arm64/Kconfig.debug | 23 +++
> > arch/arm64/include/asm/cacheflush.h | 4 +
> > arch/arm64/kernel/vmlinux.lds.S | 17 ++
> > arch/arm64/mm/init.c | 1 +
> > arch/arm64/mm/mm.h | 2 +
> > arch/arm64/mm/mmu.c | 303 +++++++++++++++++++++++++++++++-----
> > 6 files changed, 314 insertions(+), 36 deletions(-)
>
> With this patch applied to v3.18-rc2, my board to blows up at boot when
> using UEFI (without DEBUG_RODATA selected):
>
> ---->8----
> EFI stub: Booting Linux Kernel...
> Initializing cgroup subsys cpu
> Linux version 3.18.0-rc2+ (mark at leverpostej) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #112 SMP PREEMPT Tue Oct 28 13:58:41 GMT 2014
> CPU: AArch64 Processor [410fd030] revision 0
> Detected VIPT I-cache on CPU0
> bootconsole [uart0] enabled
> efi: Getting EFI parameters from FDT:
> EFI v2.40 by ARM Juno EFI Oct 7 2014 15:05:42
> efi: ACPI=0xfebdc000 ACPI 2.0=0xfebdc014
> cma: Reserved 16 MiB at fd800000
> BUG: failure at arch/arm64/mm/mmu.c:234/alloc_init_pmd()!
> Kernel panic - not syncing: BUG!
> CPU: 0 PID: 0 Comm: swapper Not tainted 3.18.0-rc2+ #112
> Call trace:
> [<ffffffc000087ec8>] dump_backtrace+0x0/0x124
> [<ffffffc000087ffc>] show_stack+0x10/0x1c
> [<ffffffc0004ebd58>] dump_stack+0x74/0xb8
> [<ffffffc0004eb018>] panic+0xe0/0x220
> [<ffffffc0004e8e08>] alloc_init_pmd+0x1cc/0x1dc
> [<ffffffc0004e8e3c>] alloc_init_pud+0x24/0x6c
> [<ffffffc0004e8f54>] __create_mapping+0xd0/0xf0
> [<ffffffc00069a0a0>] create_id_mapping+0x5c/0x68
> [<ffffffc00069964c>] efi_idmap_init+0x54/0xd8
> [<ffffffc0006978a8>] setup_arch+0x408/0x5c0
> [<ffffffc00069566c>] start_kernel+0x94/0x3a0
> ---[ end Kernel panic - not syncing: BUG!
> ---->8----
>
> I've not yet figured out precisely why. I haven't tried a !EFI boot
> because of the way my board is set up at the moment.
>
> Mark.
next prev parent reply other threads:[~2014-10-28 14:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 14:13 No subject Mark Rutland
2014-10-28 14:19 ` Mark Rutland [this message]
[not found] <20191026192359.27687-1-frank-w@public-files.de>
2019-10-26 19:30 ` your mail Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2017-06-04 11:59 No subject Yury Norov
2017-06-14 20:16 ` your mail Yury Norov
2015-04-21 10:18 No subject Ard Biesheuvel
2015-04-21 10:46 ` your mail Dave P Martin
2015-04-21 10:50 ` Ard Biesheuvel
2015-04-21 11:10 ` Dave P Martin
2015-04-21 11:15 ` Ard Biesheuvel
2015-04-21 11:24 ` Russell King - ARM Linux
2015-04-21 12:50 ` Russell King - ARM Linux
2015-04-21 13:10 ` Ard Biesheuvel
2015-04-21 13:21 ` Dave P Martin
2015-04-21 13:28 ` Ard Biesheuvel
2015-04-21 15:51 ` Dave Martin
2015-04-21 14:05 ` Russell King - ARM Linux
2015-04-21 13:18 ` Dave P Martin
2015-04-21 13:55 ` Russell King - ARM Linux
2015-04-21 14:06 ` Ard Biesheuvel
2015-04-21 17:03 ` Dave Martin
2012-06-21 18:26 No subject Paul Walmsley
2012-06-22 8:56 ` your mail Tony Lindgren
2011-12-02 16:01 No subject Will Deacon
2011-12-02 16:11 ` your mail Will Deacon
2011-05-13 19:35 No subject Vadim Bendebury
2011-05-14 3:32 ` your mail Jean-Christophe PLAGNIOL-VILLARD
2010-06-07 17:58 No subject Dave Hylands
2010-06-07 22:10 ` your mail Jamie Lokier
2010-06-07 22:44 ` Dave Hylands
2010-05-18 10:38 No subject Marek Szyprowski
2010-05-19 2:24 ` your mail Ben Dooks
[not found] <1250258343-14203-1-git-send-email-thierry.reding@avionic-design.de>
2009-10-02 14:53 ` Thierry Reding
2010-01-02 12:06 ` Russell King - ARM Linux
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=20141028141907.GG9796@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