[LU-5396] annotations for sparse static analyzer Created: 23/Jul/14 Updated: 26/Feb/15 Resolved: 26/Feb/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.6.0 |
| Fix Version/s: | Lustre 2.7.0 |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Frank Zago (Inactive) | Assignee: | Dmitry Eremin (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||||||||||
| Severity: | 3 | ||||||||||||||||
| Rank (Obsolete): | 15020 | ||||||||||||||||
| 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 James A Simmons [ 23/Jul/14 ] |
|
This should be linked with the |
| Comment by Andreas Dilger [ 23/Jul/14 ] |
|
Frank, I'd recommend not to put too many changes into a single patch, so that they are easier to inspect and land independently and avoid conflicts with other patches. |
| Comment by Frank Zago (Inactive) [ 23/Jul/14 ] |
|
Not a problem Andreas. This is a grinding work that is best done a bit at a time use gfp_t: http://review.whamcloud.com/11200 (upstream) |
| Comment by Frank Zago (Inactive) [ 23/Jul/14 ] |
|
Add __user annotations. This apparently may conflict with John's patches, but I've had these for a while already. |
| Comment by Frank Zago (Inactive) [ 31/Jul/14 ] |
|
Locking annotations: |
| Comment by Frank Zago (Inactive) [ 01/Aug/14 ] |
|
Made some functions static: http://review.whamcloud.com/11255 (upstream) |
| Comment by Frank Zago (Inactive) [ 08/Sep/14 ] |
|
Add __user annotations. http://review.whamcloud.com/11802 (abandoned, see below) |
| Comment by James A Simmons [ 08/Sep/14 ] |
|
Thank you for doing this. A lot of the upstream kernel Lustre client patches are these types of patches. This will help us move closer to the upstream client for style issues much faster. |
| Comment by Frank Zago (Inactive) [ 08/Sep/14 ] |
|
Add __user annotations (same as above, but 1 patch per branch) |
| Comment by Peter Jones [ 06/Oct/14 ] |
|
Frank I see that all the present patches tracked under this ticket have landed. Are there more to come or can we now close this ticket? Peter |
| Comment by Frank Zago (Inactive) [ 06/Oct/14 ] |
|
Hi Peter, there's quite a few more patches to come. Number of warnings is down to less to 1000 now. |
| Comment by Peter Jones [ 06/Oct/14 ] |
|
A 1000?! The final straight then |
| Comment by Frank Zago (Inactive) [ 07/Oct/14 ] |
|
Make some static symbols: Done for this series. There will a new one once this one is integrated. |
| Comment by Frank Zago (Inactive) [ 05/Nov/14 ] |
|
0 -> NULL: |
| Comment by Gerrit Updater [ 09/Dec/14 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12207/ |
| Comment by Gerrit Updater [ 09/Dec/14 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12211/ |
| Comment by Gerrit Updater [ 09/Dec/14 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12219/ |
| Comment by Gerrit Updater [ 09/Dec/14 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12221/ |
| Comment by Gerrit Updater [ 09/Dec/14 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12222/ |
| Comment by Gerrit Updater [ 18/Dec/14 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12220/ |
| Comment by Gerrit Updater [ 09/Jan/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12206/ |
| Comment by Gerrit Updater [ 10/Jan/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12223/ |
| Comment by Gerrit Updater [ 10/Jan/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12567/ |
| Comment by James A Simmons [ 12/Jan/15 ] |
|
Looks like all the patches for this ticket were landed. |
| Comment by Frank Zago (Inactive) [ 12/Jan/15 ] |
|
There's more patches to come. There's about 300 warnings left. |
| Comment by Andreas Dilger [ 26/Feb/15 ] |
|
Create a new ticket |