On Tue, Nov 30, 2021 at 12:44PM +0100, Marco Elver wrote: [...] > v3: > * Remove kcsan_noinstr hackery, since we now try to avoid adding any > instrumentation to .noinstr.text in the first place. [...] I missed some cleanups after changes from v2 to v3 -- the below cleanup is missing. Full replacement patch attached. Thanks, -- Marco ------ >8 ------ diff --git a/kernel/kcsan/core.c b/kernel/kcsan/core.c index 2254cb75cbb0..916060913966 100644 --- a/kernel/kcsan/core.c +++ b/kernel/kcsan/core.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -21,8 +20,6 @@ #include #include -#include - #include "encoding.h" #include "kcsan.h" #include "permissive.h" @@ -1086,9 +1083,7 @@ noinline void __tsan_func_entry(void *call_pc) if (!IS_ENABLED(CONFIG_KCSAN_WEAK_MEMORY)) return; - instrumentation_begin(); add_kcsan_stack_depth(1); - instrumentation_end(); } EXPORT_SYMBOL(__tsan_func_entry); @@ -1100,7 +1095,6 @@ noinline void __tsan_func_exit(void) if (!IS_ENABLED(CONFIG_KCSAN_WEAK_MEMORY)) return; - instrumentation_begin(); reorder_access = get_reorder_access(get_ctx()); if (!reorder_access) goto out; @@ -1120,7 +1114,6 @@ noinline void __tsan_func_exit(void) } out: add_kcsan_stack_depth(-1); - instrumentation_end(); } EXPORT_SYMBOL(__tsan_func_exit);