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>