Make our stack-walking code KASAN-safe by using __no_sanitize_address. Generic code, arm64, s390 and x86 all make accesses unchecked for similar sorts of reasons: when unwinding a stack, we might touch memory that KASAN has marked as being out-of-bounds. In ppc64 KASAN development, I hit this sometimes when checking for an exception frame - because we're checking an arbitrary offset into the stack frame. See commit2095574632("s390/kasan: avoid false positives during stack unwind"), commitbcaf669b4b("arm64: disable kasan when accessing frame->fp in unwind_frame"), commit91e08ab0c8("x86/dumpstack: Prevent KASAN false positive warnings") and commit6e22c83664("tracing, kasan: Silence Kasan warning in check_stack of stack_tracer"). Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210614120907.1952321-1-dja@axtens.net
2.7 KiB
2.7 KiB