-
- Downloads
kasan, arm64: allow using KUnit tests with HW_TAGS mode
On a high level, this patch allows running KUnit KASAN tests with the hardware tag-based KASAN mode. Internally, this change reenables tag checking at the end of each KASAN test that triggers a tag fault and leads to tag checking being disabled. Also simplify is_write calculation in report_tag_fault. With this patch KASAN tests are still failing for the hardware tag-based mode; fixes come in the next few patches. [andreyknvl@google.com: export HW_TAGS symbols for KUnit tests] Link: https://lkml.kernel.org/r/e7eeb252da408b08f0c81b950a55fb852f92000b.1613155970.git.andreyknvl@google.com Link: https://linux-review.googlesource.com/id/Id94dc9eccd33b23cda4950be408c27f879e474c8 Link: https://lkml.kernel.org/r/51b23112cf3fd62b8f8e9df81026fa2b15870501.1610733117.git.andreyknvl@google.com Signed-off-by:Andrey Konovalov <andreyknvl@google.com> Reviewed-by:
Catalin Marinas <catalin.marinas@arm.com> Reviewed-by:
Vincenzo Frascino <vincenzo.frascino@arm.com> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Branislav Rankov <Branislav.Rankov@arm.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Evgenii Stepanov <eugenis@google.com> Cc: Kevin Brodsky <kevin.brodsky@arm.com> Cc: Marco Elver <elver@google.com> Cc: Peter Collingbourne <pcc@google.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- arch/arm64/include/asm/memory.h 1 addition, 0 deletionsarch/arm64/include/asm/memory.h
- arch/arm64/include/asm/mte-kasan.h 12 additions, 0 deletionsarch/arm64/include/asm/mte-kasan.h
- arch/arm64/kernel/mte.c 12 additions, 0 deletionsarch/arm64/kernel/mte.c
- arch/arm64/mm/fault.c 14 additions, 6 deletionsarch/arm64/mm/fault.c
- lib/Kconfig.kasan 2 additions, 2 deletionslib/Kconfig.kasan
- lib/test_kasan.c 29 additions, 13 deletionslib/test_kasan.c
- mm/kasan/hw_tags.c 16 additions, 0 deletionsmm/kasan/hw_tags.c
- mm/kasan/kasan.h 21 additions, 0 deletionsmm/kasan/kasan.h
Loading
Please register or sign in to comment