Re: [PATCH 1/3] s390/ctcm: Fix return type of ctc{mp,}m_tx()

From: Nathan Chancellor
Date: Wed Nov 02 2022 - 16:00:20 EST


Hi Heiko,

On Wed, Nov 02, 2022 at 08:48:42PM +0100, Heiko Carstens wrote:
> On Wed, Nov 02, 2022 at 09:32:50AM -0700, Nathan Chancellor wrote:
> > should s390 select ARCH_SUPPORTS_CFI_CLANG in the future.
>
> Yes, s390 should select that :)
>
> But, is there any switch or option I need to set when compiling clang,
> so it knows about the kcfi sanitizer?
>
> I get:
> clang-16: error: unsupported option '-fsanitize=kcfi' for target 's390x-ibm-linux'
>
> > clang --version
> clang version 16.0.0 (https://github.com/llvm/llvm-project.git e02110e2ab4dd71b276e887483f0e6e286d243ed)

No, kCFI is currently implemented in a target specific manner and Sami
only added AArch64 and X86 support in the initial change:

https://github.com/llvm/llvm-project/commit/cff5bef948c91e4919de8a5fb9765e0edc13f3de

He does have a generic version in progress but I assume it would not be
hard for one of your LLVM folks to add the kCFI operand bundle lowering
to the SystemZ backend to get access to it sooner (and it may allow for
a more optimized sequence of instructions if I understand correctly?):

https://reviews.llvm.org/D135411

Cheers,
Nathan