kasan: only define kasan_metadata_size for Generic mode
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 5 Sep 2022 21:05:29 +0000 (23:05 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:02:58 +0000 (14:02 -0700)
commitf372bde922e2ced8e0b5a928887b4cf587cc4453
tree0d7ff3be335bd9b92c696f423d20f91e336b9dc0
parent02856beb2d801423f88f2e8cb2eed0d6f14a4f92
kasan: only define kasan_metadata_size for Generic mode

KASAN provides a helper for calculating the size of per-object metadata
stored in the redzone.

As now only the Generic mode uses per-object metadata, only define
kasan_metadata_size() for this mode.

Link: https://lkml.kernel.org/r/8f81d4938b80446bc72538a08217009f328a3e23.1662411799.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>
Cc: Peter Collingbourne <pcc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/kasan.h
mm/kasan/common.c
mm/kasan/generic.c