From patchwork Fri Jul 6 13:02:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 141312 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3088440ljj; Fri, 6 Jul 2018 06:02:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdI0py/UtICgXMtr0xMFwAQOTkV8e1ckly2ePPi+p1u/khJLSoCU94PeI0Nr6U/32e/wmjv X-Received: by 2002:a63:735d:: with SMTP id d29-v6mr9439629pgn.156.1530882152159; Fri, 06 Jul 2018 06:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530882152; cv=none; d=google.com; s=arc-20160816; b=H5Ll4z5DdldnHrjuoBxzLBvG48SciNkny5juqM9fhCQSvUEL3p2Sai6YMcYYhjR9xc 3GBOd0Gsq1UpdiECipzlFYHjMFt4fxxYijp8g+R8jlu8zeG1J3c2hb3TKPQHVDMKZNAj lJ1aaPopfG/btOfvkM25SoD4UTvYGxi9zxsus7P3nhvQDznDMgTWsPAshZ6TeGVjrPI4 CdZoErNhBPXsTBWTOuPyq63ZEz4JWXSEh4X5MILkA/9NJrDT9jtqT95+kLYjuGA/ls3x BaHaKm2xt8PuM5D19YIZ3/Tfr1Cs29kvzAVM2m6lfoqA9P4/KRO/nRIEvIp253Z5ic9D QddQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=SuY4oqOr4l1XJc3N4NfyN3WyVnP/hZUVrmexOuLxNfE=; b=ElCQRBPEa5a5y1EYDxr1wj+9YsUEm27ZiFTwiPyYzt1q0NuaegQFA+7AjrM8AwHWgu hRrKgZilVUBBfsM1358VxkXYt7Wg46vfRWkG6jooy1m2MdnjkIFfxM71JGFsBjxZY4jj ln97ZQVmlmzmtxWYgfaFMLSgWuyFcill3h9ICm2SCZXb2cnr2SMURHWZ+pEI7K5Yt9j9 5bwdTwZYdEnBrP+9/DrXbRYvmHaoizqIT4C7NT8JR6yGXM3VwxKIF+qhZzx8JQwWFCEs WYYIdU3iESKPDm0sH+x5pXgunapuba7bMV6gl6gM+emas2FZfZaelmdvDwfutK0ShY/1 eI6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xm1jncoT; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 184-v6si7857235pgj.421.2018.07.06.06.02.31; Fri, 06 Jul 2018 06:02:32 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Xm1jncoT; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933419AbeGFNCa (ORCPT + 30 others); Fri, 6 Jul 2018 09:02:30 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33426 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932886AbeGFNC2 (ORCPT ); Fri, 6 Jul 2018 09:02:28 -0400 Received: by mail-wr1-f65.google.com with SMTP id k7-v6so4126717wrq.0 for ; Fri, 06 Jul 2018 06:02:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=SuY4oqOr4l1XJc3N4NfyN3WyVnP/hZUVrmexOuLxNfE=; b=Xm1jncoTDUofdVpGHFdloNHyHPuxhVV8ufcLcpeRTH3p4ZQ7uwGIyI1HsoF5BzoUQv klV7KeLhT0E7/UCuFgVjyqZPVpd2q3xV4L3aIAf6MO3/1Pv5CpDv9UVgBX71XK9MvfGZ 7ELQoNs+wRo8kkp2ZzrBZicDjkQ4RmHilTp1U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SuY4oqOr4l1XJc3N4NfyN3WyVnP/hZUVrmexOuLxNfE=; b=gRbHMcTKzxwn03c/1sRs11+lyZ+AWw9BBTEL6ecfvKMjc2h79sC/qMEEhgWw3gsCtc KZaLiGCeuF2fozG4zn50bhIg0xa8rXqzx+SuJYTdNYCvopr5VKI4qaTSFU28hVdq1Zml cyaXUSr6nUm1kgYr0n/p+hWjSNLHug3ZXSa//FjbUt8lzgNO+GgCZciONsna2cvOuS0X fwSYeMlC3rc58CCxNEw3fH+24DQAPGe+eRooSDYWudPILeKxe/TD2svLgOR+bdVtthyp In45oTag8nBFLsKq7TYGtUYy1lzPt6N1gAlxWdd6tfdc2bJvIAVqw8Z0OmwxtRTc9hE7 Fy9g== X-Gm-Message-State: APt69E0IJCeJalMkZLRCwuyW2CT1oFCqpniygIhaqEt4mj4CvRSg5Cc+ I+BLMjI7p9cnR4Wpp1qYe0Ke5g== X-Received: by 2002:adf:ecc6:: with SMTP id s6-v6mr8006515wro.160.1530882147061; Fri, 06 Jul 2018 06:02:27 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.214.65.221]) by smtp.gmail.com with ESMTPSA id b16-v6sm9764123wrm.15.2018.07.06.06.02.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Jul 2018 06:02:26 -0700 (PDT) From: Benjamin Gaignard X-Google-Original-From: Benjamin Gaignard To: vkoul@kernel.org, dan.j.williams@intel.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH] dma: stm32: replace "%p" with "%pK" Date: Fri, 6 Jul 2018 15:02:20 +0200 Message-Id: <20180706130220.21957-1-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The format specifier "%p" can leak kernel addresses. Use "%pK" instead. Signed-off-by: Benjamin Gaignard --- drivers/dma/stm32-dma.c | 4 ++-- drivers/dma/stm32-mdma.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) -- 2.15.0 diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c index 8c5807362a25..379e8d534e61 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32-dma.c @@ -594,7 +594,7 @@ static void stm32_dma_start_transfer(struct stm32_dma_chan *chan) chan->busy = true; - dev_dbg(chan2dev(chan), "vchan %p: started\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: started\n", &chan->vchan); } static void stm32_dma_configure_next_sg(struct stm32_dma_chan *chan) @@ -693,7 +693,7 @@ static void stm32_dma_issue_pending(struct dma_chan *c) spin_lock_irqsave(&chan->vchan.lock, flags); if (vchan_issue_pending(&chan->vchan) && !chan->desc && !chan->busy) { - dev_dbg(chan2dev(chan), "vchan %p: issued\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: issued\n", &chan->vchan); stm32_dma_start_transfer(chan); } diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c index 9dc450b7ace6..06dd1725375e 100644 --- a/drivers/dma/stm32-mdma.c +++ b/drivers/dma/stm32-mdma.c @@ -1170,7 +1170,7 @@ static void stm32_mdma_start_transfer(struct stm32_mdma_chan *chan) chan->busy = true; - dev_dbg(chan2dev(chan), "vchan %p: started\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: started\n", &chan->vchan); } static void stm32_mdma_issue_pending(struct dma_chan *c) @@ -1183,7 +1183,7 @@ static void stm32_mdma_issue_pending(struct dma_chan *c) if (!vchan_issue_pending(&chan->vchan)) goto end; - dev_dbg(chan2dev(chan), "vchan %p: issued\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: issued\n", &chan->vchan); if (!chan->desc && !chan->busy) stm32_mdma_start_transfer(chan); @@ -1203,7 +1203,7 @@ static int stm32_mdma_pause(struct dma_chan *c) spin_unlock_irqrestore(&chan->vchan.lock, flags); if (!ret) - dev_dbg(chan2dev(chan), "vchan %p: pause\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: pause\n", &chan->vchan); return ret; } @@ -1240,7 +1240,7 @@ static int stm32_mdma_resume(struct dma_chan *c) spin_unlock_irqrestore(&chan->vchan.lock, flags); - dev_dbg(chan2dev(chan), "vchan %p: resume\n", &chan->vchan); + dev_dbg(chan2dev(chan), "vchan %pK: resume\n", &chan->vchan); return 0; }