Jump to content

Linux 5.8 Lands The Kernel Concurrency Sanitizer To Spot Race Conditions


steven36

Recommended Posts

Merged overnight into the Linux 5.8 code-base is KCSAN, the Kernel Concurrency Sanitizer that is a dynamic race detector for spotting flaws in the kernel code.

 

qSxr53l.jpg



The Linux Kernel Concurrency Sanitizer with this newly-added kernel code (4k+ lines of code) paired with compiler-based instrumentation in supported compilers is able to provide detection of race conditions happening within the kernel.

Even before being mainlined to the kernel, KCSAN has already been successful in spotting legitimate kernel bugs and now with it being mainlined should see more usage in helping uncover other code flaws dealing with multiple threads/concurrency.

While KCSAN is part of the Linux 5.8 kernel, currently only the LLVM Clang 11 Git compiler has the necessary compiler instrumentation for working with KCSAN. When building with GCC or older Clang releases, KCSAN support is not available. Clang 11 won't be out as stable until August~September, shortly after the release of Linux 5.8 stable.

So it's great seeing the Kernel Concurrency Sanitizer merged for helping to uncover more kernel bugs and will hopefully see an uptick in adoption once the compiler support is more widespread.

More details on KCSAN via Google's GitHub with this being another sanitizer spearheaded by the search giant. Their documentation notes 60+ bugs fixed so far by KCSAN.

 

Source

Link to comment
Share on other sites


  • Views 708
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...