I need a static analysis tool for the Linux Device Drivers I write for ARM based boards. I am considering few tools as mentioned below:
There are two active projects of Linux Verification Center aimed to improve quality of the loadable kernel modules.
Linux Driver Verification
(LDV) - a comprehensive toolset for static source code verification of Linux device drivers.KEDR Framework
- an extensible framework for dynamic analysis and verification of kernel modules.Linux File System Verification
that aims to develop a dedicated toolset for verification of Linux file system implementations.-Werror
, -Wextra
and -Wall
on GCC
, and run with Valgrind
.Last time I played with Sparse I found the outputs to be confusing and did not find a good documentation to interpret the output. Does anyone has a good documentation on Sparse tool? What are the other Free static analysis tools I can use for my Linux driver verification? I know about LINT tool but its licensed.
Smatch is a static analysis tool for C that is used on the kernel. It has resulted in hundreds of patches. Quite a few have been security related or were significant enough for the stable kernel.
If you want to write your own rules, Coccinelle is probably appropriate. If you want to use rules written by others you can use the various tools integrated into the kernel. Check section 4.2: CODE CHECKING TOOLS of Documentation/development-process/4.Coding for some suggestions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With