public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: smatch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: smatch v1.59 released
Date: Mon, 15 Jul 2013 11:15:13 +0300	[thread overview]
Message-ID: <20130715081513.GA16280@elgon.mountain> (raw)

Smatch is a C static checker with a lot of kernel specific checks.

This release has several new tricks:

1) Small functions are parsed inline now.  That makes it more accurate
and now even without the database configured, you have at least some
cross function analysis.

2) The way smatch handles math was completely rewritten and should be
more accurate.

3) Comparisons between variables are recorded.  So even if you don't
know the return value, maybe you know that it is less than or equal to
parameter 2.  (This requires the database to be set up).

Btw, having the database set up is super useful for understanding code.
Say you want to know how lifebook_limit_serio3() is called you can type:
`smbdb.py lifebook_limit_serio3` and it's simple enough to see that
(struct dmi_system_id)->callback() is called from dmi_check_system().

The command to set up the database is:
~/path/to/smatch/smatch_scripts/build_kernel_data.sh

To run smatch on the kernel source:
~/path/to/smatch/smatch_scripts/test_kernel.sh

To test a specific file:
~/path/to/smatch/smatch_scripts/kchecker drivers/file.c

regards,
dan carpenter


             reply	other threads:[~2013-07-15  8:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15  8:15 Dan Carpenter [this message]
2013-07-15 11:49 ` smatch v1.59 released Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130715081513.GA16280@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smatch@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox