|
|
Subscribe / Log in / New account

Detecting missing memory barriers with KCSAN

Detecting missing memory barriers with KCSAN

[Kernel] Posted Dec 2, 2021 19:02 UTC (Thu) by corbet

Writing (correct) concurrent code that uses locking to avoid race conditions is difficult enough. When the objective is to use lockless algorithms, relying on memory barriers instead of locks to eliminate locking overhead, the problem becomes harder still. Bugs are easy to create and hard to find in this type of code. There may be some help on the way, though, in the form of this patch set from Marco Elver that enhances the Kernel Concurrency Sanitizer (KCSAN) with the ability to detect some types of missing memory barriers.

Full Story (comments: 13)


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