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]
Date:	Fri, 11 Apr 2008 08:19:01 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>, mingo <mingo@...hat.com>,
	tglx <tglx@...utronix.de>, linux-next@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: Tree for April 10 (arch/x86)

On Fri, 11 Apr 2008 09:46:31 +0200 Ingo Molnar wrote:

> 
> * Randy Dunlap <randy.dunlap@...cle.com> wrote:
> 
> > Fix printk formats in x86/mm/ioremap.c:
> > 
> > next-20080410/arch/x86/mm/ioremap.c:137: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
> > next-20080410/arch/x86/mm/ioremap.c:188: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
> > next-20080410/arch/x86/mm/ioremap.c:188: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'long unsigned int'
> 
> thanks, applied.
> 
> >  	if (!phys_addr_valid(phys_addr)) {
> >  		printk(KERN_WARNING "ioremap: invalid physical address %llx\n",
> > -		       phys_addr);
> > +		       (unsigned long long)phys_addr);
> 
> is there really no way to solve this more cleanly than a forced cast?

I haven't seen any other decent solutions.  This is what we do
all over the kernel.

> It
> is a totally uninteresting warning that we pass in a narrower type to 
> printk(). It cannot ever cause any bugs or problems. Why does gcc warn 
> about it?

No idea about that part.

---
~Randy
--
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