From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 8/8] ARM: mm: allow text and rodata sections to be read-only
Date: Mon, 11 Aug 2014 14:30:55 +0100 [thread overview]
Message-ID: <20140811133055.GA15853@arm.com> (raw)
In-Reply-To: <1407423713-4160-9-git-send-email-keescook@chromium.org>
On Thu, Aug 07, 2014 at 04:01:53PM +0100, Kees Cook wrote:
> This introduces CONFIG_DEBUG_RODATA, making kernel text and rodata
> read-only. Additionally, this splits rodata from text so that rodata can
> also be NX, which may lead to wasted memory when aligning to SECTION_SIZE.
> The read-only areas are made writable during ftrace updates and kexec.
[...]
> diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c
> index 1ac184f2bdd8..4423a565ef6f 100644
> --- a/arch/arm/kernel/machine_kexec.c
> +++ b/arch/arm/kernel/machine_kexec.c
> @@ -164,11 +164,11 @@ void machine_kexec(struct kimage *image)
> reboot_code_buffer = page_address(image->control_code_page);
>
> /* Prepare parameters for reboot_code_buffer*/
> + set_kernel_text_rw();
> kexec_start_address = image->start;
> kexec_indirection_page = page_list;
> kexec_mach_type = machine_arch_type;
> - kexec_boot_atags = dt_mem ?: image->start
> - - KEXEC_ARM_ZIMAGE_OFFSET
> + kexec_boot_atags = dt_mem ?: image->start - KEXEC_ARM_ZIMAGE_OFFSET
> + KEXEC_ARM_ATAGS_OFFSET;
Minor nit: but this patch and the kexec patch earlier in the series seem to
move this line around in different ways without actually changing the code.
I guess you just got a screwy rebase?
Will
next prev parent reply other threads:[~2014-08-11 13:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 15:01 [PATCH v2 0/8] arm: support CONFIG_RODATA Kees Cook
2014-08-07 15:01 ` [PATCH 1/8] arm: use generic fixmap.h Kees Cook
2014-08-07 17:38 ` Leif Lindholm
2014-08-07 17:47 ` Kees Cook
2014-08-07 15:01 ` [PATCH 2/8] arm: fixmap: implement __set_fixmap() Kees Cook
2014-08-07 15:01 ` [PATCH 3/8] arm: mm: reduce fixmap kmap from 32 to 16 CPUS Kees Cook
2014-08-07 22:18 ` Rob Herring
2014-08-08 10:16 ` Leif Lindholm
2014-08-09 0:11 ` Kees Cook
2014-08-07 15:01 ` [PATCH 4/8] arm: use fixmap for text patching when text is RO Kees Cook
2014-08-07 15:01 ` [PATCH 5/8] ARM: kexec: Make .text R/W in machine_kexec Kees Cook
2014-08-07 15:01 ` [PATCH 6/8] arm: kgdb: Handle read-only text / modules Kees Cook
2014-08-07 15:01 ` [PATCH 7/8] ARM: mm: allow non-text sections to be non-executable Kees Cook
2014-08-07 15:01 ` [PATCH 8/8] ARM: mm: allow text and rodata sections to be read-only Kees Cook
2014-08-11 13:30 ` Will Deacon [this message]
2014-08-11 15:41 ` Kees Cook
2014-08-07 20:43 ` [PATCH v2 0/8] arm: support CONFIG_RODATA Laura Abbott
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=20140811133055.GA15853@arm.com \
--to=will.deacon@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;
as well as URLs for NNTP newsgroup(s).