From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932794AbeARUSb (ORCPT ); Thu, 18 Jan 2018 15:18:31 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33776 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951AbeARUS3 (ORCPT ); Thu, 18 Jan 2018 15:18:29 -0500 X-Google-Smtp-Source: ACJfBosKEbgtlWPe7PqV9iziwhVfqtAPjt25KYflTFcLLKcFW2sOv6Nkil+94hlKAeuzuPPlPaYkbA== Date: Thu, 18 Jan 2018 23:18:56 +0300 From: Serge Semin To: Florian Fainelli Cc: ralf@linux-mips.org, miodrag.dinic@mips.com, jhogan@kernel.org, goran.ferenc@mips.com, david.daney@cavium.com, paul.gortmaker@windriver.com, paul.burton@mips.com, alex.belits@cavium.com, Steven.Hill@cavium.com, alexander.sverdlin@nokia.com, matt.redfearn@mips.com, kumba@gentoo.org, marcin.nowakowski@mips.com, James.hogan@mips.com, Peter.Wotton@mips.com, Sergey.Semin@t-platforms.ru, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/14] MIPS: memblock: Print out kernel virtual mem layout Message-ID: <20180118201856.GA996@mobilestation> References: <20180117222312.14763-1-fancer.lancer@gmail.com> <20180117222312.14763-12-fancer.lancer@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 18, 2018 at 12:03:03PM -0800, Florian Fainelli wrote: > On 01/17/2018 02:23 PM, Serge Semin wrote: > > It is useful to have the kernel virtual memory layout printed > > at boot time so to have the full information about the booted > > kernel. In some cases it might be unsafe to have virtual > > addresses freely visible in logs, so the %pK format is used if > > one want to hide them. > > > > Signed-off-by: Serge Semin > > I personally like having that information because that helps debug and > have a quick reference, but there appears to be a trend to remove this > in the name of security: > > https://patchwork.kernel.org/patch/10124007/ > > maybe hide this behind a configuration option? Yeah, arm code was the place I picked the function up.) But in my case I've used %pK so the pointers would disappear from logging when kptr_restrict sysctl is 1 or 2. I agree, that we might need to make the printouts optional. If there is any kernel config, which for instance increases the kernel security we could also use it or anything else to discard the printouts at compile time. > -- > Florian