]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: csum: Disable KASAN for do_csum()
authorWill Deacon <will@kernel.org>
Tue, 14 Apr 2020 21:22:47 +0000 (22:22 +0100)
committerWill Deacon <will@kernel.org>
Wed, 15 Apr 2020 20:36:41 +0000 (21:36 +0100)
commitf9edbd83f688ebc481273355d555874d2c688555
tree75d1c03409b023605b61d1e2427479e08f8e302e
parent92cace97c4b6c9e7af63f0cb38d8db2fc86c8c51
arm64: csum: Disable KASAN for do_csum()

do_csum() over-reads the source buffer and therefore abuses
READ_ONCE_NOCHECK() to avoid tripping up KASAN. In preparation for
READ_ONCE_NOCHECK() becoming a macro, and therefore losing its
'__no_sanitize_address' annotation, just annotate do_csum() explicitly
and fall back to normal loads.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/lib/csum.c