[ldv-project] Queries in running the LDV.

Alexey Khoroshilov khoroshilov at ispras.ru
Fri Jun 21 18:45:36 MSK 2019


Dear Puneet,

It seems you use LDV Tools, but it was superseded by our newer KLEVER
Framework [1,2].
So, we suggest to use the newer tool.

As for memory leak rule, we had a prototype of such rule in LDV Tools
(104 [3]), but it was not maintained and it is not available in KLEVER.
So, we suggest to check code against some memory safety rules ((KLEVER
rule id: "linux:memory safety", please note that string operations are
not supported yet) or some Linux specific rules like mutex lock [4] or
clock_enable/clock_disable [5].

[1] http://linuxtesting.org/04-07-2018
[2] https://forge.ispras.ru/projects/klever
[3] https://forge.ispras.ru/issues/2735
[4] https://forge.ispras.ru/issues/1940 (KLEVER rule ids:
"linux:kernel:locking:mutex")
[5] https://forge.ispras.ru/issues/8785 (KLEVER rule ids:
"linux:drivers:clk1", "linux:drivers:clk2")

Best regards,
Alexey Khoroshilov
Linux Verification Center, ISPRAS


On 21.06.2019 8:30, Puneet Gupta wrote:
>
> Hi,
>
>  
>
> I am using LDV for running static analysis for my external driver.
>
>  
>
> I have few questions :
>
>   * The driver has many files to be compiled, but it seems the LDV is
>     only reporting out the errors for the file which is mentioned in
>     ‘obj-m’. How can I get result for all the files?
>   * What is meant by the error: “attempting to take field offset lock
>     of expression priv at stop whose value is Top”. I am getting only
>     these errors for my file.
>   * To test the LDV , I did kmalloc and didn’t freed the memory
>     returned. But the output on the webpage is not showing an error
>     for that memory leak. Have I need to pass some separate rule for
>     detecting the memory leaks?
>
>  
>
> I am using 32_7a rule for running the driver, as given in the example
> in the LDV standard doc.
>
>  
>
> Thanks,
>
> Puneet
>
> This email and any attachments are intended for the sole use of the
> named recipient(s) and contain(s) confidential information that may be
> proprietary, privileged or copyrighted under applicable law. If you
> are not the intended recipient, do not read, copy, or forward this
> email message or any attachments. Delete this email message and any
> attachments immediately. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxtesting.org/pipermail/ldv-project/attachments/20190621/392e68e4/attachment.html>


More information about the ldv-project mailing list