overflow: don't warn if we overflow use buffers
commit61e51ec2fa563a1b6ef65718daece06fad1364a8
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Apr 2014 13:33:25 +0000 (24 16:33 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Apr 2014 13:33:25 +0000 (24 16:33 +0300)
tree4e77697541b5def8534acbcb12e542e2bb35d41f
parent26d77513fb2bfd97a03cc1e0492cebd9f60e0408
overflow: don't warn if we overflow use buffers

These days Smatch thinks it knows the size of buffers because it records
every allocation.  But some buffers are allocated in user space and Smatch
doesn't know what size they are.  This causes false positives.  Say we have
code like:

copy_to_user(user_pointer, kernel_pointer, size);

Don't complain that we are writing too much data.  Only complain if we are
reading too much data (info leak).

I probably should write some special code for this case which doesn't use
the database but for now I'm just tired of the false positives so I'm
disabling it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_overflow.c
smatch_data/kernel.sizeof_param
smatch_data/kernel.sizeof_param.remove