diff options
| author | Marco Elver <elver@google.com> | 2025-12-19 16:40:23 +0100 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-01-05 16:43:36 +0100 |
| commit | 87335b61a23bd10e4aec132bd3a48a009d406973 (patch) | |
| tree | dc2ada234b41cb02d85a25050555f657dd63692e /include/linux/atomic | |
| parent | 8ec56d9aaba9667b0c6429de7aeb4ec691944a5e (diff) | |
security/tomoyo: Enable context analysis
Enable context analysis for security/tomoyo.
This demonstrates a larger conversion to use Clang's context
analysis. The benefit is additional static checking of locking rules,
along with better documentation.
Tomoyo makes use of several synchronization primitives, yet its clear
design made it relatively straightforward to enable context analysis.
One notable finding was:
security/tomoyo/gc.c:664:20: error: reading variable 'write_buf' requires holding mutex '&tomoyo_io_buffer::io_sem'
664 | is_write = head->write_buf != NULL;
For which Tetsuo writes:
"Good catch. This should be data_race(), for tomoyo_write_control()
might concurrently update head->write_buf from non-NULL to non-NULL
with head->io_sem held."
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251219154418.3592607-35-elver@google.com
Diffstat (limited to 'include/linux/atomic')
0 files changed, 0 insertions, 0 deletions
