]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ARM: 9392/2: Support CLANG CFI
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 23 Apr 2024 07:54:45 +0000 (08:54 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 29 Apr 2024 13:14:23 +0000 (14:14 +0100)
Support Control Flow Integrity (CFI) when compiling with
CLANG.

In the as-of-writing LLVM CLANG implementation (v17)
the 32-bit ARM platform is supported by the generic CFI
implementation, which isn't tailored specifically for ARM32
but works well enough to enable the feature.

Tested-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/Kconfig

index b14aed3a17abb6732e0b87d3ba1b4edc260e7f0e..df7bd07ad0d4c916ed3f321d4a61e4c9321cd571 100644 (file)
@@ -35,6 +35,7 @@ config ARM
        select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
        select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7
        select ARCH_SUPPORTS_ATOMIC_RMW
+       select ARCH_SUPPORTS_CFI_CLANG
        select ARCH_SUPPORTS_HUGETLBFS if ARM_LPAE
        select ARCH_SUPPORTS_PER_VMA_LOCK
        select ARCH_USE_BUILTIN_BSWAP