[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZSP/ZR5P/xRiiq7D@arm.com>
Date: Mon, 9 Oct 2023 14:25:57 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Liu Shixin <liushixin2@...wei.com>
Cc: Patrick Wang <patrick.wang.shcn@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/4] mm/kmemleak: fix print format of pointer in
pr_debug()
On Sun, Oct 08, 2023 at 10:33:17AM +0800, Liu Shixin wrote:
> With 0x%p, the pointer will be hashed and print (____ptrval____) instead.
> And with 0x%pa, the pointer can be successfully printed but with duplicate
> prefixes, which looks like:
>
> kmemleak: kmemleak_free(0x(____ptrval____))
> kmemleak: kmemleak_free_percpu(0x(____ptrval____))
> kmemleak: kmemleak_free_part_phys(0x0x0000000a1af86000)
>
> Use 0x%px instead of 0x%p or 0x%pa to print the pointer. Then the print
> will be like:
>
> kmemleak: kmemleak_free(0xffff9111c145b020)
> kmemleak: kmemleak_free_percpu(0x00000000000333b0)
> kmemleak: kmemleak_free_part_phys(0x0000000a1af80000)
>
> Signed-off-by: Liu Shixin <liushixin2@...wei.com>
Acked-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists