-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPALockator's Linux device driver data race detection benchmarks #3
Comments
In goblint/analyzer#618 I realized that these benchmarks have some problems and not immediately usable. LDV-specific model functionsA README says:
The benchmarks don't define these LDV locking/unlocking functions themselves in terms of pthread, but rather assume the analyzer itself supports them. Similarly they use CPAcheckerThe benchmarks are originally for CPAlockator, which is based on CPAchecker, which has a related configuration file: https://github.com/sosy-lab/cpachecker/blob/trunk/config/includes/lockator/linux.properties. Regarding the special thread creation, that is hard-coded into CPAchecker itself: https://github.com/sosy-lab/cpachecker/blob/2cfbe22b515fe9fedbd7629c62e9b93ddeda0a9a/src/org/sosy_lab/cpachecker/cfa/postprocessing/function/ThreadCreateTransformer.java#L68-L73. Moreover, it defines a bunch of KleverSomehow Klever has been used to generate these benchmarks from Linux source code. It's very much not described anywhere, how it does the environment modeling etc, but I managed to find this: https://github.com/ldv-klever/klever/blob/master/presets/jobs/specifications/linux/concurrency%20safety/synchronization%20primitives.aspect. That somehow defines the transformations that are applied to original source code to replace them with LDV-specific functions instead. Since Goblint has been used to analyze non-transformed Linux source code, it actually has a bunch of Incorrect Frama-C generationAll the benchmarks have the following header comment: /* Generated by Frama-C */ I'm not sure what that exactly means, but my best guess is that the combining/merging mechanism from Frama-C has been used (a la For example, __retres = (int)epd->bEndpointAddress < 0; Crucially, Original Linux sourceWhen looking for the same function in the source of that version of Linux, the code is completely different: return ((epd->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN); These bit operations on an unsigned integer aren't trivially constant, so somewhere along the way the semantics have been changed. |
I recently read the following paper about CPALockator: Analysis of Correct Synchronization of Operating System Components.
Basically CPALockator is a CPAchecker fork/branch/something that also does thread-modular analysis.
In the evaluation section, they mention having constructed a set of 425 data race detection benchmarks from Linux 4.2.6 device drivers. There's no mention of the availability of this benchmark set, but I managed to find this, which seems like it's the same set: https://gitlab.com/sosy-lab/software/ldv-benchmarks/-/tree/master/linux-4.2.6-races.
I wasn't aware of this earlier and I'm not sure why this didn't get added to sv-benchmarks for data-race. Nevertheless, this might be a useful set of benchmarks for us to look at because:
The same repository also seems to have some data-race benchmarks for Linux 4.18: https://gitlab.com/sosy-lab/software/ldv-benchmarks/-/tree/master/linux-4.18-races. And a handful of commit-based data-race benchmarks in Linux (although most don't have before vs after like the README claims): https://gitlab.com/sosy-lab/software/ldv-benchmarks/-/tree/main/ldv-commits-races.
Some of the benchmarks are in
Unknowns
subdirectories but still contain task definitions with expected verdicts (not sure based on what). These should probably be excluded to be on the safe side.The text was updated successfully, but these errors were encountered: