From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423921AbcFHXMC (ORCPT ); Wed, 8 Jun 2016 19:12:02 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:36242 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161891AbcFHXMA (ORCPT ); Wed, 8 Jun 2016 19:12:00 -0400 Date: Wed, 8 Jun 2016 16:11:58 -0700 From: Kees Cook To: linux-arm-kernel@lists.infradead.org Cc: Russell King , Ard Biesheuvel , Nicolas Pitre , Chris Brandt , Arnd Bergmann , Alexander Potapenko , Marc Zyngier , linux-kernel@vger.kernel.org Subject: [PATCH] ARM: mm: fix location of _etext Message-ID: <20160608231158.GA12159@www.outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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<