linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: <linuxppc-dev@lists.ozlabs.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>,
	Balamuruhan S <bala24@linux.ibm.com>
Subject: [PATCH 1/3] powerpc/kprobes: Use appropriate format specifier for printing kernel address
Date: Thu, 23 Apr 2020 20:47:35 +0530	[thread overview]
Message-ID: <c66bdfc569c47b965b706dd7f2627d6ada67ff50.1587652966.git.naveen.n.rao@linux.vnet.ibm.com> (raw)
In-Reply-To: <cover.1587652966.git.naveen.n.rao@linux.vnet.ibm.com>

From: Balamuruhan S <bala24@linux.ibm.com>

Change use of %p to %pK when printing address of the instruction slot so
that the actual kernel address is visible for privileged users.

Signed-off-by: Balamuruhan S <bala24@linux.ibm.com>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/optprobes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/optprobes.c b/arch/powerpc/kernel/optprobes.c
index ef0924b0809d..d5f8c25b7cac 100644
--- a/arch/powerpc/kernel/optprobes.c
+++ b/arch/powerpc/kernel/optprobes.c
@@ -247,7 +247,7 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
 	/* Setup template */
 	/* We can optimize this via patch_instruction_window later */
 	size = (TMPL_END_IDX * sizeof(kprobe_opcode_t)) / sizeof(int);
-	pr_devel("Copying template to %p, size %lu\n", buff, size);
+	pr_devel("Copying template to %pK, size %lu\n", (void *)buff, size);
 	for (i = 0; i < size; i++) {
 		rc = patch_instruction(buff + i, *(optprobe_template_entry + i));
 		if (rc) {
-- 
2.25.1


  reply	other threads:[~2020-04-23 15:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 15:17 [PATCH 0/3] powerpc: Use proper printk format specifiers Naveen N. Rao
2020-04-23 15:17 ` Naveen N. Rao [this message]
2022-03-09 18:28   ` [PATCH 1/3] powerpc/kprobes: Use appropriate format specifier for printing kernel address Christophe Leroy
2020-04-23 15:17 ` [PATCH 2/3] powerpc/ftrace: Use appropriate format specifier for printing kernel addresses Naveen N. Rao
2020-04-23 15:17 ` [PATCH 3/3] powerpc/hw_bkpt: Update printk format specifiers for " Naveen N. Rao

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=c66bdfc569c47b965b706dd7f2627d6ada67ff50.1587652966.git.naveen.n.rao@linux.vnet.ibm.com \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=bala24@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ravi.bangoria@linux.ibm.com \
    /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).