[PATCH v14 2/4] kasan: allow architectures to provide an outline readiness check
Christophe Leroy
christophe.leroy at csgroup.eu
Thu Jun 17 16:55:40 AEST 2021
Le 17/06/2021 à 08:39, Daniel Axtens a écrit :
> Allow architectures to define a kasan_arch_is_ready() hook that bails
> out of any function that's about to touch the shadow unless the arch
> says that it is ready for the memory to be accessed. This is fairly
> uninvasive and should have a negligible performance penalty.
>
> This will only work in outline mode, so an arch must specify
> ARCH_DISABLE_KASAN_INLINE if it requires this.
>
> Cc: Balbir Singh <bsingharora at gmail.com>
> Cc: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>
> Suggested-by: Christophe Leroy <christophe.leroy at csgroup.eu>
> Signed-off-by: Daniel Axtens <dja at axtens.net>
>
> --
>
> Both previous RFCs for ppc64 - by 2 different people - have
> needed this trick! See:
> - https://lore.kernel.org/patchwork/patch/592820/ # ppc64 hash series
> - https://patchwork.ozlabs.org/patch/795211/ # ppc radix series
>
> I haven't been able to exercise the arch hook error for !GENERIC as I
> don't have a particularly modern aarch64 toolchain or a lot of experience
> cross-compiling with clang. But it does fire for GENERIC + INLINE on x86.
Modern toolchains are available here https://mirrors.edge.kernel.org/pub/tools/crosstool/
More information about the Linuxppc-dev
mailing list