public inbox for smatch@vger.kernel.org
 help / color / mirror / Atom feed
* smatch v1.71 released
@ 2021-01-28 13:54 Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-01-28 13:54 UTC (permalink / raw)
  To: smatch; +Cc: linux-kernel

Intro:

Smatch is a C static checker with a lot of kernel specific checks.  You
can download it from:  http://repo.or.cz/w/smatch.git.  Or if you prefer
a github mirror, then you can download it from
https://github.com/error27/smatch

The last time I made a release was in 2015. https://lwn.net/Articles/629250/
There have been over two thousand patches to Smatch in the past six
years but it's hard to point to any one thing as standing out.  One
thing I'm happy about is that Smatch is now much better at tracking
user controlled data.  Another thing which I can mention that I re-wrote
check_locking.c and wrote a blog entry about it:
https://blogs.oracle.com/linux/writing-the-ultimate-locking-check

The uninitialized variable warning that was mentioned in the relase
notes six years ago is more important than ever now that we have
disabled the GCC warning for uninitialized variables.  I really suggest
that people do add Smatch to their QC process.  You don't have to have
the full cross function database built.  Just do:

	~/path/to/smatch/smatch_scripts/kchecker drivers/file.c

You could also just build a sub directory:

	~/path/to/smatch/smatch_scripts/kchecker drivers/subdir/

If you don't use Smatch, that's fine as well because kbuild bot will
catch it or someone else will.  But probably it saves time for everyone
if developers run it themselves.

Building the cross function database is also really useful.  The
~/path/to/smatch/smatch_data/db/smdb.py script is helpful to understand
how function pointers are called or where struct members are set.
Building the database takes a long time to run but it's simple to do:
~/path/to/smatch/smatch_scripts/build_kernel_data.sh
And to test the whole kernel the command is:
~/path/to/smatch/smatch_scripts/test_kernel.sh

This is kind of a weird release because it's been so long since the
previous release.  I'm hoping to do more regular releases with better
release notes.  Releases are good because hopefully more people will do
a fresh pull and send me bug reports.  :)

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread
* smatch v1.71 released
@ 2021-01-26 11:25 Dan Carpenter
  2021-01-26 11:30 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2021-01-26 11:25 UTC (permalink / raw)
  To: smatch

Intro:

Smatch is a C static checker with a lot of kernel specific checks.  You
can download it from:  http://repo.or.cz/w/smatch.git.  Or if you prefer
a github mirror, then you can download it from
https://github.com/error27/smatch

The last time I made a release was in 2015. https://lwn.net/Articles/629250/
There have been over two thousand patches to Smatch in the past six
years but it's hard to point to any one thing as standing out.  I guess,
one thing I'm happy about is that Smatch is now much better at tracking
user controlled data.  Another thing which I can mention that I re-wrote
check_locking.c and wrote a blog entry about it:
https://blogs.oracle.com/linux/writing-the-ultimate-locking-check

The uninitialized variable warning that I mentioned six years ago is
more important than ever now that we have disabled the GCC warning for
uninitialized variables.  I really suggest that people do add Smatch to
their QC process.  You don't have to have the full cross function
database built.  Just do:

	~/path/to/smatch/smatch_scripts/kchecker drivers/file.c

You could also just build a sub directory:

	~/path/to/smatch/smatch_scripts/kchecker drivers/subdir/

If you don't use Smatch, that's fine as well because kbuild bot will
catch it or I will catch it or someone else will.  But probably it saves
time for everyone if developers run it themselves.

Building the cross function database is also really useful.  The
~/path/to/smatch/smatch_data/db/smdb.py script is helpful to understand
how function pointers are called or where struct members are set.
Building the database takes a long time to run but it's simple to do:
~/path/to/smatch/smatch_scripts/build_kernel_data.sh
And to test the whole kernel the command is:
~/path/to/smatch/smatch_scripts/test_kernel.sh

This is kind of a weird release because it's been so long since the
previous release.  I'm hoping to do more regular releases with better
release notes.

regards,
dan carpenter

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

end of thread, other threads:[~2021-01-28 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-28 13:54 smatch v1.71 released Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2021-01-26 11:25 Dan Carpenter
2021-01-26 11:30 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox