Open nickdesaulniers opened 2 years ago
upstream report from @arndb
KernelCI is also reporting this for:
$ ARCH=i386 make LLVM=1 -j72 allmodconfig net/netfilter/nf_synproxy_core.o
CC [M] net/netfilter/nf_synproxy_core.o
In file included from net/netfilter/nf_synproxy_core.c:7:
In file included from ./include/linux/skbuff.h:28:
In file included from ./include/net/checksum.h:22:
In file included from ./arch/x86/include/asm/checksum.h:6:
./arch/x86/include/asm/checksum_32.h:149:6: error: inline assembly requires more registers than available
asm("addl 0(%1), %0 ;\n"
^
FWIW, I opened an issue for that specific instance in #1442, although the title could have probably been more descriptive about the error. Should I dupe that one to here?
I'm not sure yet that it's the same cause. Let's keep them open for now, then dup once we have fixes.
Retesting w/ clang-15 now that https://github.com/llvm/llvm-project/issues/41914 is closed out by https://github.com/llvm/llvm-project/commit/18fd09ab64b07c45d0373307e37f7c96b3984183.
My initial test case is still reproducible. :(
I wonder if Atom's scheduling model has the same issue?
No.
There was another report recently of this issue that appears to only be visible under full LTO. It is easily reproducible with i386_defconfig
+ CONFIG_LTO_CLANG_FULL=y
+ CONFIG_X86_GENERIC=y
(which adds -mtune=generic
)
$ make -skj"$(nproc)" ARCH=i386 LLVM=1 mrproper defconfig
$ scripts/config -d LTO_NONE -e LTO_CLANG_FULL -e X86_GENERIC
$ make -skj"$(nproc)" ARCH=i386 LLVM=1 olddefconfig all
ld.lld: error: inline assembly requires more registers than available at line 538
ld.lld: error: inline assembly requires more registers than available at line 538
...
My toolchain has https://github.com/llvm/llvm-project/commit/18fd09ab64b07c45d0373307e37f7c96b3984183 so this is likely related to this issue and not #1442.
I've not had any success reproducing this with a single translation unit yet.
This is reproducible via:
Smaller reproducer for the curve25519-x86_64.c
case:
// $ clang -mstack-alignment=8 -march=atom -O2 -w
long fsqr_out, fsqr_tmp;
void ____wrong_branch_error();
void curve25519_ever64(char out) {
long init1[8];
long inp = init1;
asm(""
: "+&r"(inp), "+&r"(fsqr_tmp)
: "r"(fsqr_out)
: "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r13",
"%r14", "%r15", "memory");
____wrong_branch_error(out);
}
reported by @arndb in this thread. Forking from #1483 which I've modified to track the objtool warnings.
This is reproducible via: