|
|
Log in / Subscribe / Register

Attacking the kernel via its command line

Attacking the kernel via its command line

Posted Jun 21, 2017 10:11 UTC (Wed) by cpitrat (subscriber, #116459)
Parent article: Attacking the kernel via its command line

It looks like some parts of the kernel would benefit from unit testing ! All the code that doesn't interact with hardware (like implementations of lists, trees, string methods ... that's a lot of code in the end) could easily be unit tested and should have 100% coverage.

Moreover, static analysis is able to detect unused parameter which would have highlighted this bug.


to post comments

Attacking the kernel via its command line

Posted Jun 21, 2017 14:12 UTC (Wed) by gregkh (subscriber, #8) [Link] (1 responses)

What type of static analysis rule would have caught this issue? If you know of one, please write it so we can ensure it never happens again.

Also, unit tests are great to have we gladly accept patches that add them. Some code, like the resource management logic, does have them, and they are invaluable in testing changes in those areas of the kernel. Please send us more!

Attacking the kernel via its command line

Posted Jun 21, 2017 14:31 UTC (Wed) by cplaplante (subscriber, #107196) [Link]

I am somewhat surprised that Coverity didn't catch this - https://scan.coverity.com/projects/linux.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds