diff options
author | Kees Cook <keescook@chromium.org> | 2016-06-23 22:28:47 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-07-02 12:01:30 +0200 |
commit | 14c4a533e0996f95a0a64dfd0b6252d788cebc74 (patch) | |
tree | adf6541d18a25971d9155e3f1502fd75a5aa658f /arch/arm/kernel/setup.c | |
parent | ARM: 8582/1: remove unused CONFIG_ARCH_HAS_BARRIERS (diff) | |
download | linux-14c4a533e0996f95a0a64dfd0b6252d788cebc74.tar.xz linux-14c4a533e0996f95a0a64dfd0b6252d788cebc74.zip |
ARM: 8583/1: mm: fix location of _etext
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. Just to be conservative, leave the kernel resource as
it was, using __init_begin instead of _etext as the end mark.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r-- | arch/arm/kernel/setup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 7b5350060612..dd84f03dc2d4 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -844,7 +844,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc) struct resource *res; kernel_code.start = virt_to_phys(_text); - kernel_code.end = virt_to_phys(_etext - 1); + kernel_code.end = virt_to_phys(__init_begin - 1); kernel_data.start = virt_to_phys(_sdata); kernel_data.end = virt_to_phys(_end - 1); |