Received: by 10.223.148.5 with SMTP id 5csp8002364wrq; Thu, 18 Jan 2018 12:19:32 -0800 (PST) X-Google-Smtp-Source: ACJfBouac/rY73t6F8clzN/+vdMWYL3tBFq8VI+5n8Y5e2+QKcr8pkK998EdsX5cyPTBN5YRGbci X-Received: by 10.99.7.14 with SMTP id 14mr23184980pgh.68.1516306772506; Thu, 18 Jan 2018 12:19:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516306772; cv=none; d=google.com; s=arc-20160816; b=BOI/LDvEkBqcIBx8eucAs0Z8v4dzjifDaqr1RWel63vQX7T/16a52ak2PzEI1WpeLD VUgvQ+Ku30wAUf3wed0PJiMASk6a/3MoJDFlU5HNIbcpnL67SJ8hVK5cRR08VbGS7DoY KnWdTpX0oOyV9HnJlM76AkRak+19I55cwvtWDKyXOPDaqD96GYheODQyaQ1kMK1Kldec eu8Z9Uv16hJWVn2kjPl7g911c2Vry/eSGt1uw9ww9BccKfk3MSxrfmtm2i5U+mZr5sHO swyHm9fv1Ry2Yj/0c5BiZq9UouFmqxW8jrX4jHKeR7B5QJsp2FUDBxMNaAtcV7/p9KSt exsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=a6Ii2RpVgygl1aZz9Dwp3BUeB6wit8KEvFH6KpLe/6Y=; b=odK8oOmNeOvMyU76kLAarOiLfKPlHaExOTm1YuKkqHrjEAPQZwg1Cuxprx/5fpkyoJ sNUWdS2S7hILRzqtqJlm4HYzL7WmEQ05HYXnZeXbdWjggH0MPLSAYSecs1atll9tyf50 YxpHAql8vBHYUDiT1bi15uXtBJwtpo7Awzrdctf5ifpXV0cIF7CanrwzjZqbBMlPMriy VhT6Geqaa6GKttyqPUyv7aS8u+wPInsSZ85GrKR14Xbzz4YLd5lNhqs4d+ZFEwldTgBq 8woel7N6YVtI2mE3QVuIQxxgxBj6/f6HSGV64qenRfILaXK7AlTsURjXJh1Kkl/851A5 G1Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A07+oopn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y16-v6si164048pll.546.2018.01.18.12.19.15; Thu, 18 Jan 2018 12:19:32 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=A07+oopn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932730AbeARUSb (ORCPT + 99 others); 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 Received: by mail-lf0-f68.google.com with SMTP id t139so13488341lff.0 for ; Thu, 18 Jan 2018 12:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=a6Ii2RpVgygl1aZz9Dwp3BUeB6wit8KEvFH6KpLe/6Y=; b=A07+oopnalhUDWqy9ISNZpiJmg2HKVTinMftasQkZIoxRuTwgjaqc857i1ieMgeEwO kIgs/62ydWlZ2rmNphiHgjseMVNstVEm+EKzzY70M2NGMsBEfsmdIeKLRi4ECLjzjjUC 9FxofjccBKP8Hx7W8Oef5mCqU+ZgfWadw+GWqKzyrgDD3q0zL6pU74ijdi38EOWoPntQ atzu87999ANZldya7yhpn3y3FpHBjG1flQjNuxSpybvjDwNQ1hwz6WCTeiOYomFBwnIn 1t67rQoc3ptRdRgsMdYft2KCyv6GVWWeVKpPyaKY9LYB6jy9ZvNafTf16PF08JMHzHfd IleA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=a6Ii2RpVgygl1aZz9Dwp3BUeB6wit8KEvFH6KpLe/6Y=; b=eAkKCCaaBLzNm6xYEuttPbGEkq8P0o4P8lORXVw91rOgxxbA3/othXWAke8ldH8fXy SBurlhfarznQzero6VdVxqJdri/oXeen6dYZzdZ/AQJXnG4g3rOcVeid0Nff9iwlu899 2lwuceqDbvkYw7iXFHNiyFwKoMzhYdZUJv6M40DI+Mktuv0Uujw9CEFh/ms9rtNRMAX0 eYHyUBXPdZCIEFsPKIy5vKoi+nzlVqhw/VBvd+Jb3DYRDVt07TkPK5cl3Gb//kxJ6OoB g6PagDdl9igxY5ZthBx6athswQyZrXHecMK6HTtXF9HpeHC4IqWq87sUnEqHWhU9C4Zi UsrQ== X-Gm-Message-State: AKwxyteJt05rC/BjCVsZsEeDrFdaw3GETEJSjqqVYwRHRhrZ06jlDm3k 3+QqPD6pfMyDEipm81FVcf8= X-Received: by 10.46.75.18 with SMTP id y18mr12101272lja.33.1516306708525; Thu, 18 Jan 2018 12:18:28 -0800 (PST) Received: from mobilestation ([95.79.164.146]) by smtp.gmail.com with ESMTPSA id i18sm1447562ljd.27.2018.01.18.12.18.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jan 2018 12:18:27 -0800 (PST) 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 Precedence: bulk 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