From patchwork Fri Jan 12 21:57:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 10161759 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DA47E60327 for ; Fri, 12 Jan 2018 21:57:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB6F528A55 for ; Fri, 12 Jan 2018 21:57:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C01B228A61; Fri, 12 Jan 2018 21:57:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 397F528A55 for ; Fri, 12 Jan 2018 21:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965212AbeALV50 (ORCPT ); Fri, 12 Jan 2018 16:57:26 -0500 Received: from mout.gmx.net ([212.227.17.22]:55158 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965193AbeALV5Z (ORCPT ); Fri, 12 Jan 2018 16:57:25 -0500 Received: from ls3530.fritz.box ([193.159.16.33]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LhB9P-1fFCcj1Rt1-00oa7u; Fri, 12 Jan 2018 22:57:18 +0100 Date: Fri, 12 Jan 2018 22:57:15 +0100 From: Helge Deller To: Kees Cook , linux-parisc@vger.kernel.org, James Bottomley , John David Anglin Subject: Re: [GIT PULL] parisc architecture fixes for 4.15-rc7 Message-ID: <20180112215715.GA8246@ls3530.fritz.box> References: <20180107162123.GA9715@ls3530.fritz.box> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Provags-ID: V03:K0:LHQaVed9FKUrkb0fZobIra+LK54I4RpbH6GJr8HuNyCYePXS3Pg 6YPpL9lr5Ftz7AMMgkCHSfjUOat3aAs6ny5q1okQVX5oMtbkUXvzB9iV3QTMnYQHesoofBE P55h3ho3hKOYvAvvFNx1bFpcC23N+BX7QnSejuC8hS009rqjYII9Hn3h1TQUlgDRS1BXXl/ bF93QbxeVZQ9qflLYtyRA== X-UI-Out-Filterresults: notjunk:1; V01:K0:67xUldYXZbc=:KqUs0D2jUKbuOLlX4qPPeF V3rVTfyTKXiEUV1Qo9EvqBEULdLOuxQ252jTSjUdrgFmnhf5Mtzc6Mts513u+a7xlgDw2QIMy dBwIEr/7vaT/V94Nm227ZWRDpTE7PGZk2gjkn4yJS0LdT/Vwd9HVOY+ENa26PRUqrJMnJKg9R WBSTG/PxyyREJDgfM+s14VKm91FH+xyP35pKpmkoc1uQdx9Knymk4oU68PoCS3pFzO1dCumxU DtPzgp2wUThZ2SpOzMsPmzTHBM2i2MGfLK/DKpIVpd/XnPEJuH6/dQvfjMs/LIYE7UGP1ZpG/ m/6R1PyMxGq/ciNiGR+9f0svZJAWqEupQWVGQ//rcNhyjdy3b0Y3Lf9IuzTMFEFNjASkBSbhS 2WzsjHViAJxwOXLl5zEfstKzfdQGvBcFiic4JveG2m7fDP++J7n0L3SGZZEyMOtxiBsaIw3kT FrZsMSX3izWAlEXV8NKzg8oo82bl1JEkdma5P3i/h2PUM7GS2hNbtUtp3BAOP/1Ga+KYvUIsX DGqoS1K9Fhkb1eJXhi2bybW5C1XKzkviJna/zh/VzngHzk6kdElqx9wU1pWxwc8dLJZLhTuOy GWKpsQdvywSj5qcajF2uqC+wrpTnkWu0wRxOjoeXaZoDi30Dtv0ibpaIxY8Y7uNs41wnJssLm As6y6U5ABeUJczv7UcpTHau7ZiV3V0zYtBi9OqNw40p2v211rfcmQORGWts/dR+ARfihkHTxO QVGTMLJvwqOqykHjxNGP2LoawxJkxMfUpco8D/FUFHtXyMhGGZoscCGfCplsf5xQxuWUgn/b6 FNush/lRmDoEW/3Dc/Xl+OuqDlHUg== Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Subject: [PATCH] parisc: Hide virtual kernel memory layout For security reasons do not expose the virtual kernel memory layout to userspace. Signed-off-by: Helge Deller Suggested-by: Kees Cook Cc: stable@vger.kernel.org # 4.15 Reviewed-by: Kees Cook --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index 48f41399fc0b..cab32ee824d2 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c @@ -629,7 +629,12 @@ void __init mem_init(void) #endif mem_init_print_info(NULL); -#ifdef CONFIG_DEBUG_KERNEL /* double-sanity-check paranoia */ + +#if 0 + /* + * Do not expose the virtual kernel memory layout to userspace. + * But keep code for debugging purposes. + */ printk("virtual kernel memory layout:\n" " vmalloc : 0x%px - 0x%px (%4ld MB)\n" " memory : 0x%px - 0x%px (%4ld MB)\n"