[PATCH 1/3] powerpc/kprobes: Use appropriate format specifier for printing kernel address
From: Balamuruhan S 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 Signed-off-by: Naveen N. Rao --- 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
Re: [PATCH 1/3] powerpc/kprobes: Use appropriate format specifier for printing kernel address
Le 23/04/2020 à 17:17, Naveen N. Rao a écrit : From: Balamuruhan S 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 Signed-off-by: Naveen N. Rao This series doesn't apply. Linking it to https://github.com/linuxppc/issues/issues/390 --- 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) {