Re: [PATCH] include/linux/compiler*.h: make compiler-*.h mutually exclusive

From: Kees Cook
Date: Thu Aug 23 2018 - 04:32:41 EST

On Wed, Aug 22, 2018 at 6:02 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Aug 22, 2018 at 5:25 PM Dominique Martinet
> <asmadeus@xxxxxxxxxxxxx> wrote:
>> Overall looks good to me, just pointing at the same error I wrote in my
>> other mail here -- I saw that by the time I was done writing this this
>> patch got taken but that alone will probably warrant a follow-up :/
> I've fixed that manually, but when I tried to test it I just hit the
> arch/x86/Makefile:179: *** Compiler lacks asm-goto support.. Stop.
> error.
> Do you have some experimental clang build with asm goto support? What
> version? Or is it just that you're building ARM, not x86?

FWIW, when I do Clang test builds lately[1], I've been using:

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CC=clang

(Note this requires a cross-compiled binutils installed in the PATH
with as aarch64-linux-gnu-*, which is where Debian and Ubuntu put


[1] for today's defconfig build to finish, I had to:

./scripts/config -d CONFIG_ARM64_LSE_ATOMICS
(I think my binutils are old)

and comment out the BUILD_BUG_ON() in net/core/filter.c from 2dbb9b9e6df67
(which looks like it needs some attention since gcc has no problem with this)

Kees Cook
Pixel Security