x86: Suppress KMSAN reports in arch_within_stack_frames()
authorAlexander Potapenko <glider@google.com>
Fri, 18 Nov 2022 17:23:05 +0000 (18:23 +0100)
committerDave Hansen <dave.hansen@linux.intel.com>
Fri, 27 Jan 2023 17:00:56 +0000 (09:00 -0800)
commitce3ba2af9695e4bd64d797e0026321e5dca29dd3
tree180cf61bade5ba55aa18ebd5b14f517ab6bae84c
parent6be9a8f18fb2ea88d37a69f076f7011fc012ae1a
x86: Suppress KMSAN reports in arch_within_stack_frames()

arch_within_stack_frames() performs stack walking and may confuse
KMSAN by stepping on stale shadow values. To prevent false positive
reports, disable KMSAN checks in this function.

This fixes KMSAN's interoperability with CONFIG_HARDENED_USERCOPY.

Signed-off-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Tested-by: Eric Biggers <ebiggers@google.com>
Link: https://github.com/google/kmsan/issues/89
Link: https://lore.kernel.org/lkml/Y3b9AAEKp2Vr3e6O@sol.localdomain/
Link: https://lore.kernel.org/all/20221118172305.3321253-1-glider%40google.com
arch/x86/include/asm/thread_info.h