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: <0000013db16f1e1d-abcb7d9e-1c9d-4ef9-b4de-767bc0282ccf-000000@email.amazonses.com>
Date:	Thu, 28 Mar 2013 14:38:02 +0000
From:	Christoph Lameter <cl@...ux.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
cc:	roy.qing.li@...il.com, Shan Wei <davidshan@...cent.com>,
	netdev@...r.kernel.org
Subject: Re: [PATCH] core: fix the use of this_cpu_ptr

On Thu, 28 Mar 2013, Eric Dumazet wrote:

> > flush_tasklet is not percpu var, and percpu is percpu var, and
> > 	this_cpu_ptr(&info->cache->percpu->flush_tasklet)
> > is not equal to
> > 	&this_cpu_ptr(info->cache->percpu)->flush_tasklet

&this_cpu_ptr is always an error since you are taking the addresss of an
address.

this_cpu_ptr(&structure) is the right way to get the address of the cpu
instance for this cpu for a per cpu structure.

> Christoph, could this kind of error be detected by the compiler or
> sparse ?

The per cpu variables are marked with __percpu. This should be detected by
sparse.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ