We assume an uninitialized value couldn't come from stackdepot, so we don't track stackdepot allocations with KMSAN. Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx> Cc: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxxxx> Cc: Andy Lutomirski <luto@xxxxxxxxxx> Cc: Vegard Nossum <vegard.nossum@xxxxxxxxxx> Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx> Cc: Marco Elver <elver@xxxxxxxxxx> Cc: Andrey Konovalov <andreyknvl@xxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: linux-mm@xxxxxxxxx --- v4: - set __GFP_NO_KMSAN_SHADOW explicitly for allocations Change-Id: Ic3ec9b3dff3fff2732d874508a3582fb26ff0b1f --- lib/stackdepot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index ecd1a0dfb3fb..2e7d2232ed3c 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -295,7 +295,7 @@ depot_stack_handle_t stack_depot_save(unsigned long *entries, */ alloc_flags &= ~GFP_ZONEMASK; alloc_flags &= (GFP_ATOMIC | GFP_KERNEL); - alloc_flags |= __GFP_NOWARN; + alloc_flags |= (__GFP_NOWARN | __GFP_NO_KMSAN_SHADOW); page = alloc_pages(alloc_flags, STACK_ALLOC_ORDER); if (page) prealloc = page_address(page); -- 2.24.1.735.g03f4e72817-goog