type_val: introduce storing struct member limits
commitd6b0156a3bc7e97d842e9a551ab8176c4b074cd2
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 21 Nov 2013 14:33:48 +0000 (21 17:33 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 21 Nov 2013 14:33:48 +0000 (21 17:33 +0300)
treef48297c5e518e68a7b4f1b4b7ca9b80e81510bf0
parentce48abe5aa233c5bdda370003a2476c0038bff96
type_val: introduce storing struct member limits

This code is still a bit experimental and new.  The main problem is that it
doesn't limit things enough, which means that it's not as useful as it
could be, but it doesn't introduce false positives.

What it does is it records every time a struct member is modified.  It
stores that the possible values of that struct member.  Then after we have
compiled the kernel we take all the places where the struct member is set
and take the total possible values and store that in a different table.

The smdb.py part of this is very useful to see where the struct member is
modified.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Makefile
smatch.h
smatch_data/db/fill_db_type_value.pl [new file with mode: 0755]
smatch_data/db/function_type_value.schema [new file with mode: 0644]
smatch_data/db/smdb.py
smatch_data/db/type_value.schema [new file with mode: 0644]
smatch_db.c
smatch_math.c
smatch_type_val.c [new file with mode: 0644]