[PATCH] irqchip: Use %px to print pointer value

Geert Uytterhoeven geert at linux-m68k.org
Fri Feb 9 00:48:48 PST 2018


Hi Jaedon,

On Fri, Feb 9, 2018 at 3:10 AM, Jaedon Shin <jaedon.shin at gmail.com> wrote:
> Since commit ad67b74d2469 ("printk: hash addresses printed with %p")
> pointers printed with %p are hashed. Use %px instead of %p to print
> pointer value.
>
> Signed-off-by: Jaedon Shin <jaedon.shin at gmail.com>

Thanks for your patch!

> --- a/drivers/irqchip/irq-bcm7038-l1.c
> +++ b/drivers/irqchip/irq-bcm7038-l1.c
> @@ -339,7 +339,7 @@ int __init bcm7038_l1_of_init(struct device_node *dn,
>                 goto out_unmap;
>         }
>
> -       pr_info("registered BCM7038 L1 intc (mem: 0x%p, IRQs: %d)\n",
> +       pr_info("registered BCM7038 L1 intc (mem: 0x%px, IRQs: %d)\n",
>                 intc->cpus[0]->map_base, IRQS_PER_WORD * intc->n_words);

I believe the printing of this value should just be removed.
Printing virtual addresses of mapped registers is usually not helpful, except
for an attacker.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



More information about the linux-arm-kernel mailing list