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: <1207916439.13354.68.camel@johannes.berg>
Date:	Fri, 11 Apr 2008 14:20:39 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
Cc:	linux-kernel@...r.kernel.org, Josh Triplett <josh@...edesktop.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-wireless@...r.kernel.org, linux-sparse@...r.kernel.org
Subject: Re: [RFC 1/3] add macros for new sparse features


> So, instead of
> 
>   /* always call with host_lock held */
>   int foo(struct bar *b)
>   {
> 
> we could write
> 
>   int foo(struct bar *b) __requires(host_lock)
>   {
> 
> and let sparse check the call chains... or how is it used?

Yes.

> And what about dynamically allocated locks?
> E.g. b->lock
> Or struct host h* = container_of(b, struct host, m); with the necessity
> to hold h->lock...

I was looking at making sparse check that certain variable references
are under rcu, but it's not as easy. Also, the lock context is just an
arbitrary name, there's no way to actually link it to a certain variable
or so to differentiate between them. I think that's not really solvable
in sparse, look at the things lockdep has to do.

johannes

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ