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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+8MBbLh4xX2TWaNncJO3Snre7oXJoDpVV95rQhch7vE4=t2yg@mail.gmail.com>
Date:	Thu, 7 May 2015 14:24:46 -0700
From:	Tony Luck <tony.luck@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 2/3] mm/memblock: Allocate boot time data structures from
 mirrored memory

On Wed, May 6, 2015 at 4:30 PM, Andrew Morton <akpm@...ux-foundation.org> wrote:
>> +     if (!ret && flag) {
>> +             pr_warn("Could not allocate %lld bytes of mirrored memory\n", size);
>
> This printk will warn on some configs.  Print a phys_addr_t with %pap.
> I think.  See huge comment over lib/vsprintf.c:pointer().

The comment may be huge - but it seems to lie about phys_addr_t :-(

I changed to %pap and got:

mm/memblock.c: In function ‘memblock_find_in_range’:
mm/memblock.c:276:3: warning: format ‘%p’ expects argument of type
‘void *’, but argument 2 has type ‘phys_addr_t’ [-Wformat=]
   pr_warn("Could not allocate %pap bytes of mirrored memory\n",

<linux/types.h> says:
#ifdef CONFIG_PHYS_ADDR_T_64BIT
typedef u64 phys_addr_t;
#else
typedef u32 phys_addr_t;
#endif

So my original %lld would indeed have barfed on 32-bit builds ... but
%pap doesn't
seem to be the right answer either.

-Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ