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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f4f8090c1be1a5a5ca663345751fb39893c89814.camel@perches.com>
Date:   Wed, 18 Mar 2020 19:04:43 -0700
From:   Joe Perches <joe@...ches.com>
To:     Randy Dunlap <rdunlap@...radead.org>,
        Linux MM <linux-mm@...ck.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] mm/hugetlb.c: fix printk format warning for
 32-bit phys_addr_t

On Wed, 2020-03-18 at 14:33 -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@...radead.org>
> 
> Fix printk format warnings when phys_addr_t is 32 bits, i.e.,
> CONFIG_PHYS_ADDR_T_64BIT is not set/enabled.
[]
> ../mm/hugetlb.c:5472:73: note: format string is defined here
>     pr_warn("hugetlb_cma: reservation failed: err %d, node %d, [%llu, %llu)",
>                                                                       ~~~^
[]
> --- linux-next-20200318.orig/mm/hugetlb.c
> +++ linux-next-20200318/mm/hugetlb.c
> @@ -5469,8 +5469,10 @@ void __init hugetlb_cma_reserve(int orde
>  					     0, false,
>  					     "hugetlb", &hugetlb_cma[nid]);
>  		if (res) {
> -			pr_warn("hugetlb_cma: reservation failed: err %d, node %d, [%llu, %llu)",
> -				res, nid, PFN_PHYS(min_pfn), PFN_PHYS(max_pfn));
> +			phys_addr_t begpa = PFN_PHYS(min_pfn);
> +			phys_addr_t endpa = PFN_PHYS(max_pfn);
> +			pr_warn("hugetlb_cma: reservation failed: err %d, node %d, [%pap, %pap)",
> +				res, nid, &begpa, &endpa);

You might correct the odd use of an open bracket
then close parenthesis and add a new line too

Perhaps:
			pr_warn("%s: reservation failed: err %d, node %d, [%pap, %pap]\n",
				__func__, res, nid, &begpa, &endpa);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ