Print this page
12166 resync smatch to 0.6.1-rc1-il-3


 163 delete from return_states where function = 'refcount_sub_and_test' and (type = 8023 or type = 8024);
 164 
 165 update return_states set return = '0-32,2147483648-2147483690' where function = '_parse_integer' and return = '0';
 166 update return_states set value = '0-u64max' where function = '_parse_integer' and type = 1025 and parameter = 2 and key = '*$';
 167 
 168 /* delete some function pointers which are sometimes byte units */
 169 delete from caller_info where function = '(struct i2c_algorithm)->master_xfer' and type = 1027;
 170 
 171 /* this if from READ_ONCE().  We can't know anything about the data.  */
 172 delete from type_info where key = '(union anonymous)->__val';
 173 
 174 /* This is RIO_BAD_SIZE */
 175 delete from return_states where file = 'drivers/rapidio/rio-access.c' and return = '129';
 176 
 177 /* Smatch sucks at loops */
 178 delete from return_states where function = 'ata_dev_next' and type = 103;
 179 
 180 /* The problem is that parsing big function pointers is hard. */
 181 delete from return_states where function = 'vfs_get_tree' and type = 1024;
 182 





 183 EOF
 184 
 185 # fixme: this is totally broken
 186 call_id=$(echo "select distinct call_id from caller_info where function = '__kernel_write';" | sqlite3 $db_file)
 187 for id in $call_id ; do
 188     echo "insert into caller_info values ('fake', '', '__kernel_write', $id, 0, 8017, 1, '*\$', '');" | sqlite3 $db_file
 189 done
 190 
 191 for i in $(echo "select distinct return from return_states where function = 'clear_user';" | sqlite3 $db_file ) ; do
 192     echo "update return_states set return = \"$i[<=\$1]\" where return = \"$i\" and function = 'clear_user';" | sqlite3 $db_file
 193 done
 194 
 195 echo "select distinct file, function from function_ptr where ptr='(struct rtl_hal_ops)->set_hw_reg';" \
 196         | sqlite3 $db_file | sed -e 's/|/ /' | while read file function ; do
 197 
 198     drv=$(echo $file | perl -ne 's/.*\/rtlwifi\/(.*?)\/sw.c/$1/; print')
 199     if [ $drv = "" ] ; then
 200         continue
 201     fi
 202 




 163 delete from return_states where function = 'refcount_sub_and_test' and (type = 8023 or type = 8024);
 164 
 165 update return_states set return = '0-32,2147483648-2147483690' where function = '_parse_integer' and return = '0';
 166 update return_states set value = '0-u64max' where function = '_parse_integer' and type = 1025 and parameter = 2 and key = '*$';
 167 
 168 /* delete some function pointers which are sometimes byte units */
 169 delete from caller_info where function = '(struct i2c_algorithm)->master_xfer' and type = 1027;
 170 
 171 /* this if from READ_ONCE().  We can't know anything about the data.  */
 172 delete from type_info where key = '(union anonymous)->__val';
 173 
 174 /* This is RIO_BAD_SIZE */
 175 delete from return_states where file = 'drivers/rapidio/rio-access.c' and return = '129';
 176 
 177 /* Smatch sucks at loops */
 178 delete from return_states where function = 'ata_dev_next' and type = 103;
 179 
 180 /* The problem is that parsing big function pointers is hard. */
 181 delete from return_states where function = 'vfs_get_tree' and type = 1024;
 182 
 183 /* Locking stuff goes here.  */
 184 update return_states set parameter = -1, key = '\$' where function = 'ipmi_ssif_lock_cond' and type = 8020 and parameter = 1;
 185 update return_states set parameter = 1, key = '\$->tree->tree_lock' where function = 'hfs_find_init' and type = 8020 and parameter = 0;
 186 delete from return_states where function = '__oom_kill_process' and type = 8021;
 187 
 188 EOF
 189 
 190 # fixme: this is totally broken
 191 call_id=$(echo "select distinct call_id from caller_info where function = '__kernel_write';" | sqlite3 $db_file)
 192 for id in $call_id ; do
 193     echo "insert into caller_info values ('fake', '', '__kernel_write', $id, 0, 8017, 1, '*\$', '');" | sqlite3 $db_file
 194 done
 195 
 196 for i in $(echo "select distinct return from return_states where function = 'clear_user';" | sqlite3 $db_file ) ; do
 197     echo "update return_states set return = \"$i[<=\$1]\" where return = \"$i\" and function = 'clear_user';" | sqlite3 $db_file
 198 done
 199 
 200 echo "select distinct file, function from function_ptr where ptr='(struct rtl_hal_ops)->set_hw_reg';" \
 201         | sqlite3 $db_file | sed -e 's/|/ /' | while read file function ; do
 202 
 203     drv=$(echo $file | perl -ne 's/.*\/rtlwifi\/(.*?)\/sw.c/$1/; print')
 204     if [ $drv = "" ] ; then
 205         continue
 206     fi
 207