7

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:

  1. Sparse is a computer software tool, already available on Linux, designed to find possible coding faults in the Linux kernel.
  2. 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.
    • Another ongoing project is Linux File System Verification that aims to develop a dedicated toolset for verification of Linux file system implementations.
  3. Enable -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.

4

2 に答える 2

4

Smatchは、カーネルで使用される C 用の静的解析ツールです。その結果、何百ものパッチが作成されました。かなりの数がセキュリティ関連であるか、安定したカーネルにとって十分に重要でした。

于 2012-12-20T15:28:06.250 に答える
3

独自のルールを作成する場合は、おそらく Coccinelle が適しています。他の人が作成したルールを使用したい場合は、カーネルに統合されたさまざまなツールを使用できます。いくつかの提案については、Documentation/development-process/4.Coding のセクション 4.2: CODE CHECKING TOOLS を確認してください。

于 2013-10-25T21:27:55.783 に答える