Re: [PATCH v4 05/17] ctype: Work around Clang -mbranch-protection=none bug

Kees Cook
2020-06-29T18:42:52Z

On Mon, Jun 29, 2020 at 11:02:51AM -0700, Nick Desaulniers wrote:
> This is definitely better than the empty function. Though a patch is
> posted for fixing this in LLVM. Assuming that lands before this, we
> might not actually need this workaround?
>
> arch/arm64/Kconfig
> 1625 config ARM64_BTI_KERNEL
> ...
> 1633 # https://reviews.llvm.org/rGb8ae3fdfa579dbf366b1bb1cbfdbf8c51db7fa55
> 1634 depends on !CC_IS_CLANG || CLANG_VERSION >= 100001
>
> So if Daniel's patch lands AND is backported into the clang 10.0.1
> release, then we might not need to carry this workaround? Either way,

True, though as I mentioned in the review, I don't think it's quite
right -- the warning getting removed is actually quite valuable.

> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

Thanks!

--
Kees Cook