[LU-6302] annotations for sparse static analyzer Created: 26/Feb/15  Updated: 10/Jun/15  Resolved: 10/Jun/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.6.0
Fix Version/s: Lustre 2.8.0

Type: Improvement Priority: Trivial
Reporter: Andreas Dilger Assignee: Dmitry Eremin (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-2753 Tracking bug for static code analysis... Resolved
is related to LU-6215 Sync Lustre external tree with lustre... Resolved
is related to LU-5396 annotations for sparse static analyzer Resolved
Severity: 3
Rank (Obsolete): 17646

 Description   

sparse (git://git.kernel.org/pub/scm/devel/sparse/sparse.git) is a static analyzer used in kernel dev. After installing it, it can easily be used with Lustre:

make C=1

Currently there is about 3900 warnings. Most of it is noise, and a few annotations will silence them. However in that noise, some bugs might be lurking.

Besides finding bugs, it currently tags 1000 functions that can be made static. Once marked static, that will enable the compiler to optimize them more aggressively, which may lead to some minor performance improvements.

So far I've cleared about 1000 of them and found only one bug (strcmp with userspace provided buffer in fld_proc_hash_seq_write) and several unused functions.



 Comments   
Comment by Gerrit Updater [ 27/Apr/15 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/14613
Subject: LU-6302 lov: copy_to_user uses wrong casting
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: aa04f43716c7ebf86c0866f88de6299ddc0c64f2

Comment by Gerrit Updater [ 28/May/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14613/
Subject: LU-6302 lov: copy_to_user uses wrong casting
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 99393dc16a663fcf028b49353333a24f1dd3bb1c

Comment by Peter Jones [ 10/Jun/15 ]

Landed for 2.8

Generated at Sat Feb 10 01:59:02 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.