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]
Date:	Wed, 25 Nov 2015 10:55:14 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Jeff Kirsher' <jeffrey.t.kirsher@...el.com>,
	Joe Perches <joe@...ches.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	Helin Zhang <helin.zhang@...el.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"nhorman@...hat.com" <nhorman@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>,
	"jogreene@...hat.com" <jogreene@...hat.com>
Subject: RE: [net-next 06/16] i40e: Properly cast type for arithmetic

From: Jeff Kirsher
> Sent: 25 November 2015 10:47
> On Tue, 2015-11-24 at 16:43 -0800, Joe Perches wrote:
> > On Tue, 2015-11-24 at 16:04 -0800, Jeff Kirsher wrote:
> > > From: Helin Zhang <helin.zhang@...el.com>
> > >
> > > Pointer of type void * shouldn't be used in arithmetic, which may
> > > result in compilation error. Casting of (u8 *) can be added to fix
> > > that.
> > >
> >
> > void * arithmetic is used quite frequently in the kernel.
> >
> > What compiler emits an error?
> 
> When you use the gcc -Wpointer-arith, it generates the warning.

Don't do that then :-)
Rightfully or not the Linux kernel requires 'void *' arithmetic.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ