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: <1268135540.4162.5.camel@twins>
Date:	Tue, 09 Mar 2010 12:52:20 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Valdis.Kletnieks@...edu, Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] percpu,lockdep: implement and use
 is_static_percpu_address()

On Tue, 2010-03-09 at 20:42 +0900, Tejun Heo wrote:
> Hello, Peter.
> 
> On 03/09/2010 08:25 PM, Peter Zijlstra wrote:
> >> +/* can't distinguish from other static vars, always false */
> >> +static inline bool is_static_percpu_address(unsigned long addr)
> >> +{
> >> +	return false;
> >> +}
> > 
> > At this point it might make sense to simply fail to compile if lockdep
> > is enabled as well.
> > 
> > I'm not sure if there's many SMP archs that don't have this and do have
> > lockdep, but simply failing this test isn't really an option.
> 
> That might be better.  Returning %false isn't that bad tho.  There
> really is no distinction between percpu and !percpu variable on UP and
> static variable address match will catch both.

Ah, if this is UP only then yes, no complaints ;-)

> >>  /**
> >> + * is_static_percpu_address - test whether address is from static percpu area
> >> + * @addr: address to test
> >> + *
> >> + * Test whether @addr belongs to static percpu area.  Module static
> >> + * percpu areas allocated via __alloc_reserved_percpu() is not
> >> + * considered.  Use is_module_address() for those.
> >> + *
> >> + * RETURNS:
> >> + * %true if @addr is from static percpu area, %false otherwise.
> >> + */
> > 
> > So is_module_address() will only return true for static per-cpu module
> > storage, right?
> 
> Right, got confused there.  I'll update is_static_percpu_address() to
> test for reserved regions too.

Or as per your other email, make the above be true, and have
is_module_address() be true for its static per-cpu regions.
--
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