Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2478636yba; Mon, 6 May 2019 06:48:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4SsmNbzhiFF/qx0HKCvW+qKrO4bnyn/qmSIEJj6/ds+mMgwcq0kxgzVBDzi0kOZHS0aOc X-Received: by 2002:a63:a84c:: with SMTP id i12mr2753778pgp.115.1557150507012; Mon, 06 May 2019 06:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557150507; cv=none; d=google.com; s=arc-20160816; b=v4ojRgq1G+Q/DWKwllMO7KrpCjaEuiuApUmmUU/rhaYO2Ub1oi4791QSdma/ceRZmY g/rWVPQ4jt+3YU1eR0bgx9IwYRQkH0XKdVt/RwzG7pyJuxn76i+NJoB3/F4eZSgwX7d3 hdbOwQ+mAeTGqR0I4naeohsRXXrrmfIwt8eFrYW5k5tOsGXjJv02icyg0mYpYN6WDz6S ZKFNLquPvq43hbUFYnOq1rhgM6uXhdYBd/Dtj+MV1CiPGAzTOpFTGPma6hBPkxHZ9vig aFUCQrWk4iq2GLJNbu1qrUpK3wffjEYR3jjQmCMi1dKhRgkwbp3zpvUxAR5f9mz4A9Au mDyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organisation:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=03oG995VqKCMg5zZmOQ8GCyASHYjLf4Q7o3OTq3VIiY=; b=gXS0+m8DVlyJgVihOxiBAfGnxK0xlJHH+E2QKT04bJKSEvH+6Gb4Gg2rKRsUC+ekwO ZmAVjj49RDYo1CaS1QCWuRgxYxfiQfGy/uFOnXC1ALO6XZF1HCpogTBzrwMrNSAAy1ZC GnCFj/oKUsaCzlpCdmOoiyN19XIIm8pMv3nWcryBZBWhEixR90ciajGempyGPzmkgRoc /fQfrOG2iM7ubSaVim5zFJziNxncgJIuzyKu1F2tsQAH26/h9GK7IByhEBxH2s/lfC+9 rRX6JCtJEpTotTGYiYloXjl6rAGS/oOyN9mFS4tppCz5P5Gakvbt63tSCFXnyaF/9VN5 74fw== 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 e3si14815692pgs.37.2019.05.06.06.48.10; Mon, 06 May 2019 06:48:26 -0700 (PDT) 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 S1726302AbfEFNrN (ORCPT + 99 others); Mon, 6 May 2019 09:47:13 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:38838 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbfEFNrM (ORCPT ); Mon, 6 May 2019 09:47:12 -0400 Received: from penelope.horms.nl (ip4dab7138.direct-adsl.nl [77.171.113.56]) by kirsty.vergenet.net (Postfix) with ESMTPA id 47B5625AED5; Mon, 6 May 2019 23:47:10 +1000 (AEST) Received: by penelope.horms.nl (Postfix, from userid 7100) id C554FE21322; Mon, 6 May 2019 15:47:05 +0200 (CEST) Date: Mon, 6 May 2019 15:47:05 +0200 From: Simon Horman To: Eugeniu Rosca Cc: Geert Uytterhoeven , Chris Brandt , Wolfram Sang , Ulrich Hecht , Greg Kroah-Hartman , "George G . Davis" , Andy Lowe , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Magnus Damm , Rob Herring , Mark Rutland , Eugeniu Rosca Subject: Re: [PATCH 1/6] serial: sh-sci: Reveal ptrval in dev_dbg Message-ID: <20190506134700.ya565idfzzc3enbm@verge.net.au> References: <20190504004258.23574-1-erosca@de.adit-jv.com> <20190504004258.23574-2-erosca@de.adit-jv.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190504004258.23574-2-erosca@de.adit-jv.com> Organisation: Horms Solutions BV User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 04, 2019 at 02:42:53AM +0200, Eugeniu Rosca wrote: > Starting with v4.15-rc2 commit ad67b74d2469d9 ("printk: hash addresses > printed with %p"), enabling debug prints in sh-sci.c would generate > output like below confusing the users who try to sneak into the > internals of the driver: > > sh-sci e6e88000.serial: sci_request_dma: TX: got channel (____ptrval____) > sh-sci e6e88000.serial: sci_request_dma: mapped 4096@(____ptrval____) to 0x00000006798bf000 > sh-sci e6e88000.serial: sci_request_dma: RX: got channel (____ptrval____) > sh-sci e6e88000.serial: sci_dma_tx_work_fn: (____ptrval____): 0...2, cookie 2 > > There are two possible fixes for that: > - get rid of '%p' prints if they don't reveal any useful information > - s/%p/%px/, since it is unlikely we have any concerns leaking the > pointer values when running a debug/non-production kernel I am concerned that this may expose information in circumstances where it is undesirable. Is it generally accepted practice to use %px in conjunction with dev_dbg() ? ...