[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <173986881323.10177.14426538506752641637.tip-bot2@tip-bot2>
Date: Tue, 18 Feb 2025 08:53:32 -0000
From:
tip-bot2 for Thomas Weißschuh <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: thomas.weissschuh@...utronix.de, Ingo Molnar <mingo@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>, Oleg Nesterov <oleg@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: perf/urgent] uprobes: Don't use %pK through printk
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: ec5fd50aeff9c9156304853c6d75eda852d4a2c8
Gitweb: https://git.kernel.org/tip/ec5fd50aeff9c9156304853c6d75eda852d4a2c8
Author: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
AuthorDate: Mon, 17 Feb 2025 08:43:35 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Tue, 18 Feb 2025 09:48:02 +01:00
uprobes: Don't use %pK through printk
Restricted pointers ("%pK") are not meant to be used through printk().
It can unintentionally expose security sensitive, raw pointer values.
Use regular pointer formatting instead.
For more background, see:
https://lore.kernel.org/lkml/20250113171731-dc10e3c1-da64-4af0-b767-7c7070468023@linutronix.de/
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: https://lore.kernel.org/r/20250217-restricted-pointers-uprobes-v1-1-e8cbe5bb22a7@linutronix.de
---
kernel/events/uprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 2ca797c..bf2a87a 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -417,7 +417,7 @@ static void update_ref_ctr_warn(struct uprobe *uprobe,
struct mm_struct *mm, short d)
{
pr_warn("ref_ctr %s failed for inode: 0x%lx offset: "
- "0x%llx ref_ctr_offset: 0x%llx of mm: 0x%pK\n",
+ "0x%llx ref_ctr_offset: 0x%llx of mm: 0x%p\n",
d > 0 ? "increment" : "decrement", uprobe->inode->i_ino,
(unsigned long long) uprobe->offset,
(unsigned long long) uprobe->ref_ctr_offset, mm);
Powered by blists - more mailing lists