This is an old revision of the document!
| If in doubt, do not classify! |
Using Coverity Prevent
Hints, Tips and Tricks
When you classified a valid problem, please search in GNATS for corresponding bug reports. Add the PR number to the CoverityID and vice versa.
Stuff which is supposed to help in classifying errors to be added here, e.g. showing an example of stuff Coverity Prevent gets always wrong and how it should be classified.
- It seems that the TAILQ macros confuse Coverity. For example TAILQ_FIRST() seems to trigger an use after free error in <list>.tqh_first when entries are removed in a loop (loop by hand or with FOREACH). In particular it does not recognize that TAILQ_REMOVE puts a new pointer in place an the pointer which previously aliases the tqh_first in not aliasing anymore but it's the only valid pointer. The CIDs 1769, 1770, 1771 seem to be such a case. Such cases should be marked as XXX (ATM marked as IGNORE until I know if this should be marked as a FALSE or if this should stay as IGNORE until a custom model is developed for this). Anyone up to write a Coverity Prevent model for our TAILQ macros?
TODO
- process userland as well (no owner)
- determine initial list of subsystems which need custom models (= with frequent false positives) and add them below (no owner)
- write custom models for:
- TAILQ macros (no owner)
- UMA (no owner)
- find a way to search at least for words in error messages, this would allow to find all instances of frequent false positives much faster
Misc
Pending CIDs
- CID 46, 47, 1590: pending on response from jfv@ (mail send at 2007-03-31).
- CID 48: pending on response from simikawa@ (mail send at 2007-03-31), I think there should at least be a notification to the user as in other drivers.
- CID 50: this is a bug, pending on response from scottl@ (mail send at 2007-03-31) how to send this upstream. This was already fixed by sam@ in rev. 1.5 of the file.
- CID 51: pending on response from wpaul@ (mail send at 2007-03-31), adding a KASSERT may be enough in case the code is intended as is.
- CID 52: pending on response from sos@ (mail send at 2007-03-31), adding a KASSERT may be enough in case the code is intended as is.
- CID 1431: The patch was sent to yongari@, he's working on it.
- CID 1524: We should change return values of minor/umajor/uminor functions to unsigned int. The patch was tested and sent to phk@.
People willing to take a look at subsystem specific CIDs
If you have a problem with categorizing some CIDs you can ask the people in the following list. If you encounter a CID which is related to a subsystem listed below and you don't want to take care about it yourself, you can use this list and notify the corresponding people.
- sound/linuxulator related CIDs → netchild@FreeBSD.org
- net/netinet related CIDs → bms@FreeBSD.org
HOWTO to allow people to read this page
You have to add them into the CoverityGroup. Please keep the group sorted. Whitespace at the beginning is important.
HOWTO register (for telling to not registered committers)
To register the access to the Coverity Prevent tool you have to run XXX on freefall. You will be asked to agree to a NDA. The NDA basically requires you to not copy&paste Coverity Prevent stuff and to add “Found by: Coverity Prevent” to the commit log, but read and interpret it yourself.
IRC channel for coverity work
There's a channel on EFNet for people working on coverity bugbusting. Feel free to join #coverity_bugbusters if you like. Please, don't promote this channel anywhere.