• Marco Elver's avatar
    kcsan: Rework atomic.h into permissive.h · 49f72d53
    Marco Elver authored
    Rework atomic.h into permissive.h to better reflect its purpose, and
    introduce kcsan_ignore_address() and kcsan_ignore_data_race().
    
    Introduce CONFIG_KCSAN_PERMISSIVE and update the stub functions in
    preparation for subsequent changes.
    
    As before, developers who choose to use KCSAN in "strict" mode will see
    all data races and are not affected. Furthermore, by relying on the
    value-change filter logic for kcsan_ignore_data_race(), even if the
    permissive rules are enabled, the opt-outs in report.c:skip_report()
    override them (such as for RCU-related functions by default).
    
    The option CONFIG_KCSAN_PERMISSIVE is disabled by default, so that the
    documented default behaviour of KCSAN does not change. Instead, like
    CONFIG_KCSAN_IGNORE_ATOMICS, the option needs to be explicitly opted in.
    Signed-off-by: default avatarMarco Elver <elver@google.com>
    Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    49f72d53
kcsan.rst 14.2 KB