kmsan: use stack_depot_save instead of __stack_depot_save
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 20 Nov 2023 17:47:12 +0000 (18:47 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Dec 2023 00:51:46 +0000 (16:51 -0800)
Make KMSAN use stack_depot_save instead of __stack_depot_save, as it
  always passes true to __stack_depot_save as the last argument.

Link: https://lkml.kernel.org/r/18092240699efdc6acd78b51e41ea782953e6c8d.1700502145.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/kmsan/core.c

index c19f47af04241781e392846ae6d3dd235bb5fce4..cf2d70e9c9a5ff985947859f3783fd8d5f0d9636 100644 (file)
@@ -76,7 +76,7 @@ depot_stack_handle_t kmsan_save_stack_with_flags(gfp_t flags,
        /* Don't sleep. */
        flags &= ~(__GFP_DIRECT_RECLAIM | __GFP_KSWAPD_RECLAIM);
 
-       handle = __stack_depot_save(entries, nr_entries, flags, true);
+       handle = stack_depot_save(entries, nr_entries, flags);
        return stack_depot_set_extra_bits(handle, extra);
 }
 
@@ -185,11 +185,10 @@ depot_stack_handle_t kmsan_internal_chain_origin(depot_stack_handle_t id)
        /*
         * @entries is a local var in non-instrumented code, so KMSAN does not
         * know it is initialized. Explicitly unpoison it to avoid false
-        * positives when __stack_depot_save() passes it to instrumented code.
+        * positives when stack_depot_save() passes it to instrumented code.
         */
        kmsan_internal_unpoison_memory(entries, sizeof(entries), false);
-       handle = __stack_depot_save(entries, ARRAY_SIZE(entries), __GFP_HIGH,
-                                   true);
+       handle = stack_depot_save(entries, ARRAY_SIZE(entries), __GFP_HIGH);
        return stack_depot_set_extra_bits(handle, extra_bits);
 }