[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Experimenting with lclint/splint



Hi,

I just joined this mailing list and thought of checking if anyone was alive 
here. There seems to have been no posts during the last year which leads me to 
believe that either the list has died or that everybody is busy auditing.

What I currently am doing is playing around with lclint, or splint as it is now 
known. There were some great difficulties in the beginning with splint barfing 
over many things, but after getting .splintrc right things started to work out 
a bit better. Most remaining problems have to do with gnu extensions and splint 
not being up to par with C99 (or something).

Specifically "asm" should be banned (GCC extension) and "__asm"/"__asm__" used 
instead. Same with "inline" <-> "__inline"/"__inline__".
Splint is not very happy with those and fails miserably with just reporing a 
parse error. Tracing those to the correct macros was quite an adventure for a 
kernel newbie.

Most things were quite easily fixed by using e.g. -Dasm=__asm__ in .splintrc.
Some were not though resulting in ugly 
#ifndef S_SPLINT_S
compiling without splint variant
#else
stupid splint variant
#endif

Now I am at a point where splint runs quite nicely, but there is one little 
problem. Splint is a memory hog! Running it on all the source in the kernel is 
not recommended.

The kernel I play with is 2.5.2, but if I nail down all the splint wrongs 
and "must have" gnu extensions and bug the splint authors to fix them, then 
splint should become a viable option to use for using when auditing and 
developing.

Any thoughts or questions?

Anybody working on similiar things?

/Peter Anttu

-----------------------------------------------------------------------
This mail was sent through Ludd's webmail https://webmail.ludd.luth.se/

-
Kernel-audit:  discussion list for security and the linux kernel
Archive:       http://mail.nl.linux.org/kernel-audit/