From: Kees Cook <keescook@chromium.org>
To: linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@armlinux.org.uk>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Nicolas Pitre <nico@linaro.org>,
Chris Brandt <chris.brandt@renesas.com>,
Arnd Bergmann <arnd@arndb.de>,
Alexander Potapenko <glider@google.com>,
Marc Zyngier <marc.zyngier@arm.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] ARM: mm: fix location of _etext
Date: Wed, 8 Jun 2016 16:11:58 -0700 [thread overview]
Message-ID: <20160608231158.GA12159@www.outflux.net> (raw)
The _etext position is defined to be the end of the kernel text code,
and should not include any part of the data segments. This interferes
with things that might check memory ranges and expect executable code
up to _etext.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
arm64 needs this fixed too, but it has other assumptions built onto
_etext that should be using different markers.
---
arch/arm/kernel/vmlinux.lds.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index e2c6da096cef..99420fc1f066 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -125,6 +125,8 @@ SECTIONS
#ifdef CONFIG_DEBUG_ALIGN_RODATA
. = ALIGN(1<<SECTION_SHIFT);
#endif
+ _etext = .; /* End of text section */
+
RO_DATA(PAGE_SIZE)
. = ALIGN(4);
@@ -155,8 +157,6 @@ SECTIONS
NOTES
- _etext = .; /* End of text and rodata section */
-
#ifdef CONFIG_DEBUG_RODATA
. = ALIGN(1<<SECTION_SHIFT);
#else
--
2.7.4
--
Kees Cook
Chrome OS & Brillo Security
next reply other threads:[~2016-06-08 23:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 23:11 Kees Cook [this message]
2016-06-13 20:23 ` Kees Cook
2016-06-13 21:25 ` Russell King - ARM Linux
2016-06-13 23:17 ` 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=20160608231158.GA12159@www.outflux.net \
--to=keescook@chromium.org \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=chris.brandt@renesas.com \
--cc=glider@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=nico@linaro.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
all inboxes | Powered by JetHome®