From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbcFPRII (ORCPT ); Thu, 16 Jun 2016 13:08:08 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37084 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754114AbcFPRIG (ORCPT ); Thu, 16 Jun 2016 13:08:06 -0400 MIME-Version: 1.0 In-Reply-To: References: <20160615202447.GA5005@www.outflux.net> From: Kees Cook Date: Thu, 16 Jun 2016 10:08:03 -0700 X-Google-Sender-Auth: nFcosARU-qd4_W5dPLmtP6gDhoE Message-ID: Subject: Re: [PATCH v2] ARM: mm: fix location of _etext To: Ard Biesheuvel Cc: Russell King , "linux-kernel@vger.kernel.org" , Matt Fleming , Pratyush Anand , Nicolas Pitre , Vladimir Murzin , Toshi Kani , Stephen Boyd , Chris Brandt , Alexander Potapenko , Marc Zyngier , Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 16, 2016 at 5:04 AM, Ard Biesheuvel wrote: > On 15 June 2016 at 22:24, Kees Cook wrote: >> 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 >> --- >> v2: >> - Switched resource tracker to using __init_begin, rmk > > Actually, Linus removed the x86 /proc/iomem resources for kernel segments in > > c4004b02f8e5 ("x86: remove the kernel code/data/bss resources from /proc/iomem") > > so I wonder if we should not just do the same for ARM and arm64? Nope, that got reverted. Removing it breaks things. 4046d6e81f33b7ef50d6668b78076d54c5e066b6 -Kees -- Kees Cook Chrome OS & Brillo Security