From: Daniel Rosenberg <drosen@google.com>
To: Sumit Semwal <sumit.semwal@linaro.org>, linux-kernel@vger.kernel.org
Cc: Gustavo Padovan <gustavo@padovan.org>,
linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
dri-devel@lists.freedesktop.org, kernel-team@android.com,
Daniel Rosenberg <drosen@google.com>,
Divya Ponnusamy <pdivya@codeaurora.org>,
stable <stable@vger.kernel.org>
Subject: [PATCH] drivers: dma-buf: Change %p to %pK in debug messages
Date: Wed, 2 May 2018 17:03:00 -0700 [thread overview]
Message-ID: <20180503000300.90083-1-drosen@google.com> (raw)
The format specifier %p can leak kernel addresses
while not valuing the kptr_restrict system settings.
Use %pK instead of %p, which also evaluates whether
kptr_restrict is set.
Signed-off-by: Divya Ponnusamy <pdivya@codeaurora.org>
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Cc: stable <stable@vger.kernel.org>
---
drivers/dma-buf/sync_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c
index c4c8ecb24aa9..d8d340542a79 100644
--- a/drivers/dma-buf/sync_debug.c
+++ b/drivers/dma-buf/sync_debug.c
@@ -133,7 +133,7 @@ static void sync_print_sync_file(struct seq_file *s,
char buf[128];
int i;
- seq_printf(s, "[%p] %s: %s\n", sync_file,
+ seq_printf(s, "[%pK] %s: %s\n", sync_file,
sync_file_get_name(sync_file, buf, sizeof(buf)),
sync_status_str(dma_fence_get_status(sync_file->fence)));
--
2.17.0.441.gb46fe60e1d-goog
reply other threads:[~2018-05-03 0:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180503000300.90083-1-drosen@google.com \
--to=drosen@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=kernel-team@android.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=pdivya@codeaurora.org \
--cc=stable@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).