aboutsummaryrefslogtreecommitdiffstats
path: root/lib/show_mem.c
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2019-09-23 15:34:16 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-24 15:54:08 -0700
commitb92a953cb7f727c42a15ac2ea59bf3cf9c39370d (patch)
tree570be1078303f1f080a194accd659fc9d94a52c7 /lib/show_mem.c
parentkasan: add memory corruption identification for software tag-based mode (diff)
downloadlinux-dev-b92a953cb7f727c42a15ac2ea59bf3cf9c39370d.tar.xz
linux-dev-b92a953cb7f727c42a15ac2ea59bf3cf9c39370d.zip
lib/test_kasan.c: add roundtrip tests
In several places we need to be able to operate on pointers which have gone via a roundtrip: virt -> {phys,page} -> virt With KASAN_SW_TAGS, we can't preserve the tag for SLUB objects, and the {phys,page} -> virt conversion will use KASAN_TAG_KERNEL. This patch adds tests to ensure that this works as expected, without false positives which have recently been spotted [1,2] in testing. [1] https://lore.kernel.org/linux-arm-kernel/20190819114420.2535-1-walter-zh.wu@mediatek.com/ [2] https://lore.kernel.org/linux-arm-kernel/20190819132347.GB9927@lakrids.cambridge.arm.com/ [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20190821153927.28630-1-mark.rutland@arm.com Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Andrey Konovalov <andreyknvl@google.com> Tested-by: Andrey Konovalov <andreyknvl@google.com> Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@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>
Diffstat (limited to 'lib/show_mem.c')
0 files changed, 0 insertions, 0 deletions