Re: [PATCH] mm: do not hash address in print_bad_pte()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat 31-08-19 09:18:16, Kefeng Wang wrote:
> Using %px to show the actual address in print_bad_pte()
> to help us to debug issue.

Yes, those values are of no use when hashed. At least __dump_page prints
mapping directly so there is no reason to differ here. anon_vma doesn't
really disclose much more AFAICS. Printing the addr might disclose
randomization offset for a vma but process usually doesn't live for long
after a bad pte is detected so it should be reasonably safe unless I
miss something
 
> Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>

Acked-by: Michal Hocko <mhocko@xxxxxxxx>

> ---
>  mm/memory.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memory.c b/mm/memory.c
> index e2bb51b6242e..3f0874c9ca38 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -518,7 +518,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
>  		 (long long)pte_val(pte), (long long)pmd_val(*pmd));
>  	if (page)
>  		dump_page(page, "bad pte");
> -	pr_alert("addr:%p vm_flags:%08lx anon_vma:%p mapping:%p index:%lx\n",
> +	pr_alert("addr:%px vm_flags:%08lx anon_vma:%px mapping:%px index:%lx\n",
>  		 (void *)addr, vma->vm_flags, vma->anon_vma, mapping, index);
>  	pr_alert("file:%pD fault:%ps mmap:%ps readpage:%ps\n",
>  		 vma->vm_file,
> -- 
> 2.20.1
> 

-- 
Michal Hocko
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux