From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEC90C3F2CD for ; Thu, 5 Mar 2020 15:39:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE1942073B for ; Thu, 5 Mar 2020 15:39:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726846AbgCEPjl (ORCPT ); Thu, 5 Mar 2020 10:39:41 -0500 Received: from smtprelay0184.hostedemail.com ([216.40.44.184]:42472 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726048AbgCEPjl (ORCPT ); Thu, 5 Mar 2020 10:39:41 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id DAB2B1802558A; Thu, 5 Mar 2020 15:39:39 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: coach66_70fd47f5d3b57 X-Filterd-Recvd-Size: 2111 Received: from XPS-9350.home (unknown [47.151.143.254]) (Authenticated sender: joe@perches.com) by omf15.hostedemail.com (Postfix) with ESMTPA; Thu, 5 Mar 2020 15:39:36 +0000 (UTC) Message-ID: <31d1567c4c195f3bc5c6b610386cf0f559f9094f.camel@perches.com> Subject: Re: [PATCH] sh: Stop printing the virtual memory layout From: Joe Perches To: John Paul Adrian Glaubitz , Arvind Sankar , Kees Cook Cc: "Tobin C . Harding" , Tycho Andersen , kernel-hardening@lists.openwall.com, Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 05 Mar 2020 07:38:01 -0800 In-Reply-To: References: <202003021038.8F0369D907@keescook> <20200305151010.835954-1-nivedita@alum.mit.edu> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-03-05 at 16:18 +0100, John Paul Adrian Glaubitz wrote: > On 3/5/20 4:10 PM, Arvind Sankar wrote: > > For security, don't display the kernel's virtual memory layout. > > > > Kees Cook points out: > > "These have been entirely removed on other architectures, so let's > > just do the same for ia32 and remove it unconditionally." > > > > 071929dbdd86 ("arm64: Stop printing the virtual memory layout") > > 1c31d4e96b8c ("ARM: 8820/1: mm: Stop printing the virtual memory layout") > > 31833332f798 ("m68k/mm: Stop printing the virtual memory layout") > > fd8d0ca25631 ("parisc: Hide virtual kernel memory layout") > > adb1fe9ae2ee ("mm/page_alloc: Remove kernel address exposure in free_reserved_area()") > Aww, why wasn't this made configurable? I found these memory map printouts > very useful for development. It could be changed from pr_info to pr_devel. A #define DEBUG would have to be added to emit it.