user_data2: do a hack around in the pre_merge_hook()
commit427a05c53ddd678fd6e9a137fa4173d0a7807335
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 25 Jan 2018 14:34:44 +0000 (25 17:34 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 25 Jan 2018 14:34:44 +0000 (25 17:34 +0300)
tree40b19679fbefdb51c9d73ef7fbb7b6e0bb48aa33
parenta88c129e1415ff6171ea3e694ad9db6b070209fc
user_data2: do a hack around in the pre_merge_hook()

I've been running with this code for a while...

This change has to do with the interactions between smatch_capped.c and
check_user_data3.c.  Smatch capped records that we capped a variable
against a trusted but unknown value.  The problem is you have code like
this:

if (user_var > unknown_trusted_variable)
user_var = unknown_trusted_variable;

On the true side, then we set user_data to the empty state because the
user_var gets overwritten.  On the false side, we record that user_var
is in the 0-u32max user controlled range, but capped.  Then when we merge
them together, we say that it's not capped and 0-32max which is bad and
useless.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_user_data2.c