user_data2: start re-write of user_data (not used yet)
commitca0281f4e4a3e7226753574c0d4a00130c7cfebe
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 9 Jan 2015 11:08:08 +0000 (9 14:08 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 9 Jan 2015 11:08:08 +0000 (9 14:08 +0300)
treec8ff35ad445350d20a37765bee45dd65f126609e
parenteea6e6ee5b7858af3f5c3914775bf2a4eda3e622
user_data2: start re-write of user_data (not used yet)

The old way was to say is this a user controlled variable?  If so give me
the absolute range and that is what the user can set.

The new way is to call "if (get_user_rl(var, &rl))" and it returns the
range list that the user can control.

I have wanted to re-write this code for a while.  The old way was buggy and
said a lot of stuff was user controlled when it wasn't.  Also if you set
an upper bound then it said that it wasn't user controlled, ignoring the
fact that maybe there could be array underflows.  Also sometimes the user
could controll 0-255 but we merged that with an unknown int so Smatch
thought that the user controlled s32min-s32max.

The new code is still missing some features where you have a function:
int foo(x)
{
return x;
}
And the user controls the return value some of the time.

Also I think I need to write a new smatch_capped.c to track which variables
have an upper limit but we don't know what it is.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_debug.c
check_debug.h
check_list.h
check_user_data2.c [new file with mode: 0644]
smatch.h