Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp547919imm; Sat, 7 Jul 2018 03:09:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcSFHLR6f8zw8RclHvw26NnbZR9JtMz5AbmE/ntTqY82HTqJR++s14tT+0rZLZIGnADs5om X-Received: by 2002:a17:902:d896:: with SMTP id b22-v6mr13678766plz.265.1530958198474; Sat, 07 Jul 2018 03:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530958198; cv=none; d=google.com; s=arc-20160816; b=ADf8ynobJl7aO1sPie96KIzNoFE26woZGayuXPmK0ukuiBRMk2jTT1jpoVMywXHLhI raUGeybOGsfq/9dJSlZ5ilypdKUb96wKsjVkti9o0NVo61zPxhTEAxY8F5NHxs2eaMTu IpChsneAduENh6Rw7UVc9G9yzbVyWPbJlCHfOjOBMK2Lsyr9mUsSvZKpWm/ayElPXb0q 1bZpR/pf5Q90D/Ai46J0lMUdoVl3HcgKpORXQRtCp2iMRVXeFIjf69pqzfdAmFO3wU/W HObHSnGXrw2YuZaTfbAugWGNsv4ff9fOzqybO3vdAvU4xuc9Sv3wvCvIl8orE5jP0KiW nmvg== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=Vlb2BO4aeDxD0arCNkwEUYLvfTHHDgW2DZQU/6wdLpo=; b=AR3EXCumlYiWvGbg8y151sXhjTjOjKp1Sga0nxfLUepTl2+MPPQ9Jxkg9Q/uZZT10s 1isG3VoMsCw2Vcb0fvXMWQItjt5cifCA/oAxbDYDgCNYLYfReCyd2xOO3MmvmWlBntWK lDV0nNoLmXm4ZItwfy9MZffddUgkdLOQcga3/ZlgLlsR+qYXcTTgNNecEhQoPeEUvKIA VoRcRjDhgEBfEekfYeAF87WoeIRO8spYBBhXYrwuO5Z9PT3J1BJZijKywrmAy1PsWNLt VYavHK+G7E+bznUsnJA00TMJohR1b88Etz2h+C9F8MgfByEBWtAeXjk4Hp+R26xKI8PA jCfA== 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 31-v6si9715321pli.45.2018.07.07.03.09.44; Sat, 07 Jul 2018 03:09:58 -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 S1753647AbeGGKJF (ORCPT + 99 others); Sat, 7 Jul 2018 06:09:05 -0400 Received: from mail.bootlin.com ([62.4.15.54]:51926 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749AbeGGKJE (ORCPT ); Sat, 7 Jul 2018 06:09:04 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id CBEA7207AB; Sat, 7 Jul 2018 12:09:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 7909320741; Sat, 7 Jul 2018 12:09:01 +0200 (CEST) Date: Sat, 7 Jul 2018 12:09:02 +0200 From: Boris Brezillon To: Benjamin Gaignard Cc: marek.vasut@gmail.com, dwmw2@infradead.org, computersforpeace@gmail.com, richard@nod.at, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: Re: [PATCH] mtd: stm32-quadspi: replace "%p" with "%pK" Message-ID: <20180707120902.0ae0b881@bbrezillon> In-Reply-To: <20180706130525.22223-1-benjamin.gaignard@st.com> References: <20180706130525.22223-1-benjamin.gaignard@st.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Jul 2018 15:05:25 +0200 Benjamin Gaignard wrote: > The format specifier "%p" can leak kernel addresses. > Use "%pK" instead. > > Signed-off-by: Benjamin Gaignard Applied. Thanks, Boris > --- > drivers/mtd/spi-nor/stm32-quadspi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/mtd/spi-nor/stm32-quadspi.c b/drivers/mtd/spi-nor/stm32-quadspi.c > index 72553506a00b..13e9fc961d3b 100644 > --- a/drivers/mtd/spi-nor/stm32-quadspi.c > +++ b/drivers/mtd/spi-nor/stm32-quadspi.c > @@ -355,7 +355,7 @@ static int stm32_qspi_read_reg(struct spi_nor *nor, > struct device *dev = flash->qspi->dev; > struct stm32_qspi_cmd cmd; > > - dev_dbg(dev, "read_reg: cmd:%#.2x buf:%p len:%#x\n", opcode, buf, len); > + dev_dbg(dev, "read_reg: cmd:%#.2x buf:%pK len:%#x\n", opcode, buf, len); > > memset(&cmd, 0, sizeof(cmd)); > cmd.opcode = opcode; > @@ -376,7 +376,7 @@ static int stm32_qspi_write_reg(struct spi_nor *nor, u8 opcode, > struct device *dev = flash->qspi->dev; > struct stm32_qspi_cmd cmd; > > - dev_dbg(dev, "write_reg: cmd:%#.2x buf:%p len:%#x\n", opcode, buf, len); > + dev_dbg(dev, "write_reg: cmd:%#.2x buf:%pK len:%#x\n", opcode, buf, len); > > memset(&cmd, 0, sizeof(cmd)); > cmd.opcode = opcode; > @@ -398,7 +398,7 @@ static ssize_t stm32_qspi_read(struct spi_nor *nor, loff_t from, size_t len, > struct stm32_qspi_cmd cmd; > int err; > > - dev_dbg(qspi->dev, "read(%#.2x): buf:%p from:%#.8x len:%#zx\n", > + dev_dbg(qspi->dev, "read(%#.2x): buf:%pK from:%#.8x len:%#zx\n", > nor->read_opcode, buf, (u32)from, len); > > memset(&cmd, 0, sizeof(cmd));