Powered by Linux
recent changes will require a db rebuild — Semantic Matching Tool

recent changes will require a db rebuild

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have changed the database schema in my most recent changes so
delete your old smatch_db.sqlite when you upgrade.

The big changes are to make the buffer overflow check more ambitious.
Instead of saying that a buffer is unkown, it can now sometimes say that
a buffer is between 3 and 10 bytes.

You can use the smdb.py program to see where buffers are allocated, so
for example:

smdb.py buf_size ad7887_state ring_msg

says that it's allocated to 264 bytes or unknown sizes in
ad7887_ring_preenable()...  Hm...  264 bytes is the size of the whole
t->msg[] array and it should be giving just the size of one element.
And the unknown value should also be the size of one element (88 bytes).

It's not perfect...  I am testing code which will say that ->ring_msg
is either 264 or 88 bytes.

Btw there is a difference between:

	__smatch_buf_size(&array[0]);
	__smatch_buf_size(&array[1]);

The first one is sizeof(array) and the second is sizeof(array[1]).  The
same thing is true for the first member of a struct as well...  :(

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe smatch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux