Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6183225ybf; Thu, 5 Mar 2020 15:02:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vskm4uYVIvAQX8zeVeNo5Bgt8KWzubHWr/ZcHHDT7dxssuoua5SvtyIbnbQHynIvP1kKPQq X-Received: by 2002:a9d:2264:: with SMTP id o91mr197015ota.328.1583449325763; Thu, 05 Mar 2020 15:02:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583449325; cv=none; d=google.com; s=arc-20160816; b=B+JoVsxrzsYX6yRnUWESMNQEbk4+mC9TihRrO6bkgohMWPpc8qEwLRdArCPTtzFjkP H/HE1JbQkg20pZSslE+sIoBCCGBg0GaPCZ2PkDrflTpZVZ8hsmLXZWfyYzsP3Fl9qrLa st5sMiUBtc3CEZM+uI45KzFrLb28o7y72ygwh63XcWwjYmpHU1zWbvBs9OX64yF9Zt5Y HczabgyxUMSh+Xr7T5+/WmxKbetWLkbsGgzpMMtWCWA06AD5ftrt0DXcCaPwMJ5/bFCh WeB8W9K/jb+0hXy8Kt9559iRtrERvtB/0wzYqmSRzmRqRFq4o4pdoHsgBEt5FKwskGb4 aFcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=PRcodUmFZdyu8wc5+8Pm0Wno/rkfgES0/zSIxo7Gktw=; b=fyc9b5Q5DUMcSpDsxdVgNZQZJIsmvEwkTUgwugwvj1rafmEW3UFqqEWACJJNnyl6Yv ILRRij4RhaX9K0eR4RZ+EYla2swKm8PoTBViULpqjWuB2B4NMh2F0CNXY6cx0POEB2pE Ibr7a6p5pbw2Ct/vPihU9OvkDP4Ey9up5b9c7FctFPiADvMgf61tKI8pdoI4N3Vtz+Ff nrALa0KmondK9KxWHSneqPfY47F+/Izkgtm38mymehPfuCJeeyOvkJdAD+pfh+DKiF5f 9sTPI04y3C+KCaWBFhJLQ4i9xbtQZrWAJ98cGR3C68+R9awFG1YXxaRdLyFdS4jihNi4 XFNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 104si206928otj.252.2020.03.05.15.01.53; Thu, 05 Mar 2020 15:02:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726259AbgCEXBA (ORCPT + 99 others); Thu, 5 Mar 2020 18:01:00 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:51638 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726049AbgCEXA7 (ORCPT ); Thu, 5 Mar 2020 18:00:59 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1j9zU6-0007Gu-3y; Fri, 06 Mar 2020 00:00:54 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id C038F1C1F67; Fri, 6 Mar 2020 00:00:53 +0100 (CET) Date: Thu, 05 Mar 2020 23:00:53 -0000 From: "tip-bot2 for Arvind Sankar" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mm] x86/mm/init/32: Stop printing the virtual memory layout Cc: Arvind Sankar , Thomas Gleixner , Tycho Andersen , Kees Cook , x86 , LKML In-Reply-To: <20200305150152.831697-1-nivedita@alum.mit.edu> References: <20200305150152.831697-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Message-ID: <158344925342.28353.8367194721815610047.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/mm branch of tip: Commit-ID: 681ff0181bbfb183e32bc6beb6ec076304470479 Gitweb: https://git.kernel.org/tip/681ff0181bbfb183e32bc6beb6ec076304470479 Author: Arvind Sankar AuthorDate: Thu, 05 Mar 2020 10:01:52 -05:00 Committer: Thomas Gleixner CommitterDate: Thu, 05 Mar 2020 23:53:55 +01:00 x86/mm/init/32: Stop printing the virtual memory layout For security reasons, 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()") Signed-off-by: Arvind Sankar Signed-off-by: Thomas Gleixner Acked-by: Tycho Andersen Acked-by: Kees Cook Link: https://lkml.kernel.org/r/20200305150152.831697-1-nivedita@alum.mit.edu --- arch/x86/mm/init_32.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 23df488..8ae0272 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c @@ -788,44 +788,6 @@ void __init mem_init(void) x86_init.hyper.init_after_bootmem(); mem_init_print_info(NULL); - printk(KERN_INFO "virtual kernel memory layout:\n" - " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n" - " cpu_entry : 0x%08lx - 0x%08lx (%4ld kB)\n" -#ifdef CONFIG_HIGHMEM - " pkmap : 0x%08lx - 0x%08lx (%4ld kB)\n" -#endif - " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n" - " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n" - " .init : 0x%08lx - 0x%08lx (%4ld kB)\n" - " .data : 0x%08lx - 0x%08lx (%4ld kB)\n" - " .text : 0x%08lx - 0x%08lx (%4ld kB)\n", - FIXADDR_START, FIXADDR_TOP, - (FIXADDR_TOP - FIXADDR_START) >> 10, - - CPU_ENTRY_AREA_BASE, - CPU_ENTRY_AREA_BASE + CPU_ENTRY_AREA_MAP_SIZE, - CPU_ENTRY_AREA_MAP_SIZE >> 10, - -#ifdef CONFIG_HIGHMEM - PKMAP_BASE, PKMAP_BASE+LAST_PKMAP*PAGE_SIZE, - (LAST_PKMAP*PAGE_SIZE) >> 10, -#endif - - VMALLOC_START, VMALLOC_END, - (VMALLOC_END - VMALLOC_START) >> 20, - - (unsigned long)__va(0), (unsigned long)high_memory, - ((unsigned long)high_memory - (unsigned long)__va(0)) >> 20, - - (unsigned long)&__init_begin, (unsigned long)&__init_end, - ((unsigned long)&__init_end - - (unsigned long)&__init_begin) >> 10, - - (unsigned long)&_etext, (unsigned long)&_edata, - ((unsigned long)&_edata - (unsigned long)&_etext) >> 10, - - (unsigned long)&_text, (unsigned long)&_etext, - ((unsigned long)&_etext - (unsigned long)&_text) >> 10); /* * Check boundaries twice: Some fundamental inconsistencies can