[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20180503000300.90083-1-drosen@google.com>
Date: Wed, 2 May 2018 17:03:00 -0700
From: Daniel Rosenberg <drosen@...gle.com>
To: Sumit Semwal <sumit.semwal@...aro.org>,
linux-kernel@...r.kernel.org
Cc: Gustavo Padovan <gustavo@...ovan.org>, linux-media@...r.kernel.org,
linaro-mm-sig@...ts.linaro.org, dri-devel@...ts.freedesktop.org,
kernel-team@...roid.com, Daniel Rosenberg <drosen@...gle.com>,
Divya Ponnusamy <pdivya@...eaurora.org>,
stable <stable@...r.kernel.org>
Subject: [PATCH] drivers: dma-buf: Change %p to %pK in debug messages
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@...eaurora.org>
Signed-off-by: Daniel Rosenberg <drosen@...gle.com>
Cc: stable <stable@...r.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
Powered by blists - more mailing lists