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)
commitc6a771d932332568df9f46a3b53507c578e8c8e8
tree75d1c03409b023605b61d1e2427479e08f8e302e
parent9b4fb5cec031f81ef436bf2cfd9fc265e25f6e45
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