linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [FAIL 0/5] Static lock analysis
@ 2016-02-17  9:51 Daniel Wagner
  2016-02-17  9:51 ` [FAIL 1/5] parse: Add comment to struct statement Daniel Wagner
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Daniel Wagner @ 2016-02-17  9:51 UTC (permalink / raw)
  To: linux-sparse; +Cc: linux-kernel, Christopher Li, Daniel Wagner

Hi,

Locking can be tricky to get right and sometimes things go wrong. This
here is/was an attempt to come up with a simple static code analysis tool
which tries to point to problematic looking.

Especially figurering out if an access to variables wihtout holding
the right lock is happenin was of interest for me.

There are alot of small and bigger problems I faced and some of
them I was able to solve a lot of them not. Surprise surprise.

Anyway I learned quite a lot by doing this and maybe this epic fail
helps someone else in some way. :)

Maybe the first 3 patches might be okay to get merged.

cheers,
daniel

Daniel Wagner (5):
  parse: Add comment to struct statement
  inspect: Show context information
  linearize: Add context symbol name when showing context instructions
  parse: Add acquire, release, requires and guarded_by attributes
  test-locks: Add lock tester

 Makefile          |    3 +-
 allocate.c        |    1 +
 allocate.h        |    1 +
 ast-inspect.c     |   27 +-
 lib.c             |    2 +
 lib.h             |    7 +
 linearize.c       |    2 +-
 parse.c           |   64 ++++
 parse.h           |    2 +-
 symbol.c          |    5 +
 symbol.h          |   17 +
 test-locks.c      | 1020 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 validation/caps.c |   80 +++++
 13 files changed, 1227 insertions(+), 4 deletions(-)
 create mode 100644 test-locks.c
 create mode 100644 validation/caps.c

-- 
2.5.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-17 23:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17  9:51 [FAIL 0/5] Static lock analysis Daniel Wagner
2016-02-17  9:51 ` [FAIL 1/5] parse: Add comment to struct statement Daniel Wagner
2016-02-17  9:51 ` [FAIL 2/5] inspect: Show context information Daniel Wagner
2016-02-17  9:51 ` [FAIL 3/5] linearize: Add context symbol name when showing context instructions Daniel Wagner
2016-02-17  9:51 ` [FAIL 4/5] parse: Add acquire, release, requires and guarded_by attributes Daniel Wagner
2016-02-17  9:51 ` [FAIL 5/5] test-locks: Add lock tester Daniel Wagner
2016-02-17 23:05 ` [FAIL 0/5] Static lock analysis Christopher Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).