lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAhV-H47h9H-22GQJ=bi7zthduTWA2_rLoVhS1xXe=Adk95B-Q@mail.gmail.com>
Date: Sun, 20 Jul 2025 16:51:29 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: WANG Xuerui <kernel@...0n.name>, loongarch@...ts.linux.dev, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] LoongArch/orc: Don't use %pK through printk

Applied, thanks.

Huacai

On Fri, Jul 18, 2025 at 9:36 PM Thomas Weißschuh
<thomas.weissschuh@...utronix.de> wrote:
>
> In the past %pK was preferable to %p as it would not leak raw pointer
> values into the kernel log.
> Since commit ad67b74d2469 ("printk: hash addresses printed with %p")
> the regular %p has been improved to avoid this issue.
> Furthermore, restricted pointers ("%pK") were never meant to be used
> through printk(). They can still unintentionally leak raw pointers or
> acquire sleeping locks in atomic contexts.
>
> Switch to the regular pointer formatting which is safer and
> easier to reason about.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
>  arch/loongarch/kernel/unwind_orc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/loongarch/kernel/unwind_orc.c b/arch/loongarch/kernel/unwind_orc.c
> index 0005be49b0569f28e0ee4a4f926f77562b14301b..0d5fa64a222522897df7f7c4bfbad8d2262a207e 100644
> --- a/arch/loongarch/kernel/unwind_orc.c
> +++ b/arch/loongarch/kernel/unwind_orc.c
> @@ -508,7 +508,7 @@ bool unwind_next_frame(struct unwind_state *state)
>
>         state->pc = bt_address(pc);
>         if (!state->pc) {
> -               pr_err("cannot find unwind pc at %pK\n", (void *)pc);
> +               pr_err("cannot find unwind pc at %p\n", (void *)pc);
>                 goto err;
>         }
>
>
> ---
> base-commit: d086c886ceb9f59dea6c3a9dae7eb89e780a20c9
> change-id: 20250718-restricted-pointers-loongarch-ecaa19f4d71c
>
> Best regards,
> --
> Thomas Weißschuh <thomas.weissschuh@...utronix.de>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ