Chandler Carruth via llvm-dev
2018-Feb-07 06:20 UTC
[llvm-dev] retpoline mitigation and 6.0
I've landed the patch in r324449. Before we merge this into two different Clang release branches and almost immediately release one of them, I would really like someone to confirm that this patch works well with the Linux kernel. David, if you're up for that, it would be great. Alternatively, Guenter or someone else here can help. On Tue, Feb 6, 2018 at 5:59 PM Chandler Carruth <chandlerc at google.com> wrote:> The patch is up for review here: https://reviews.llvm.org/D42998 > > On Tue, Feb 6, 2018 at 4:58 PM Chandler Carruth <chandlerc at google.com> > wrote: > >> Also, could you patch and test Clang with the Linux kernel after I make >> this change? I'd like to know that we actually successfully call the >> correct thunks and that they behave correctly. I'm not super worried, but >> good to actually get this right. I'm am slightly more worried about the >> stack-based retpoline than the register ones just due to the overall lower >> amount of testing we've had there. >> >> On Tue, Feb 6, 2018 at 4:56 PM Chandler Carruth <chandlerc at google.com> >> wrote: >> >>> On Tue, Feb 6, 2018 at 4:46 PM David Woodhouse <dwmw2 at infradead.org> >>> wrote: >>> >>>> On Wed, 2018-02-07 at 00:36 +0000, Chandler Carruth wrote: >>>> >>>> > > >>>> > > That would be __x86_indirect_thunk but the kernel doesn't use it. >>>> > > We use -mindirect-branch-register and only ever expect the compiler >>>> > > to use the register versions which are CET-compatible. >>>> > > >>>> > > However, in at least one case in the 32-bit kernel we do emit the >>>> > > old ret-equivalent retpoline inline, because there literally wasn't >>>> > > a single register we could use (yay x86). >>>> > > >>>> > > I would definitely consider ditching our use of -mindirect-thunk- >>>> > > register with GCC for 32-bit and exporting the >>>> > > __x86_indirect_thunk, to be consistent if that's what clang wants >>>> > > to do. >>>> > > >>>> > :: sigh :: is there no way to change the name? >>>> > >>>> > We use a "push" suffix to reduce ambiguity about what convention is >>>> > expected here.... But I guess we can just use the base name if that's >>>> > already shipped. >>>> >>>> It has indeed already shipped in GCC 7.3; sorry. It had no >>>> disambiguation in its name because it was the original retpoline, >>>> before we realised that CET would break things. >>>> >>>> The other thing to keep an eye on is the *return* thunk, which might >>>> end up being needed on Skylake-era CPUs. See the thread at >>>> https://lkml.org/lkml/2018/2/4/147 >>> >>> >>> I'm strongly of the opinion that I think Arjan expressed: >>> >>> - retpoline alone is probably fine with sufficient RSB stuffing patches >>> in the kernel >>> - if some folks are worried about the security risk here and running on >>> SKX, they should use IBRS. >>> >>> Given the speed of IBRS on SKX and the complexity & runtime hit of >>> thunking ret, I really don't see a good motivation for us teaching the >>> compiler how to do this. >>> >>-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180207/a6b47a5e/attachment-0001.html>
On 02/06/2018 10:20 PM, Chandler Carruth wrote:> I've landed the patch in r324449. > > Before we merge this into two different Clang release branches and almost immediately release one of them, I would really like someone to confirm that this patch works well with the Linux kernel. David, if you're up for that, it would be great. Alternatively, Guenter or someone else here can help. >I'll try to test it today. Guenter> On Tue, Feb 6, 2018 at 5:59 PM Chandler Carruth <chandlerc at google.com <mailto:chandlerc at google.com>> wrote: > > The patch is up for review here: https://reviews.llvm.org/D42998 > > On Tue, Feb 6, 2018 at 4:58 PM Chandler Carruth <chandlerc at google.com <mailto:chandlerc at google.com>> wrote: > > Also, could you patch and test Clang with the Linux kernel after I make this change? I'd like to know that we actually successfully call the correct thunks and that they behave correctly. I'm not super worried, but good to actually get this right. I'm am slightly more worried about the stack-based retpoline than the register ones just due to the overall lower amount of testing we've had there. > > On Tue, Feb 6, 2018 at 4:56 PM Chandler Carruth <chandlerc at google.com <mailto:chandlerc at google.com>> wrote: > > On Tue, Feb 6, 2018 at 4:46 PM David Woodhouse <dwmw2 at infradead.org <mailto:dwmw2 at infradead.org>> wrote: > > On Wed, 2018-02-07 at 00:36 +0000, Chandler Carruth wrote: > > > > > > > That would be __x86_indirect_thunk but the kernel doesn't use it. > > > We use -mindirect-branch-register and only ever expect the compiler > > > to use the register versions which are CET-compatible. > > > > > > However, in at least one case in the 32-bit kernel we do emit the > > > old ret-equivalent retpoline inline, because there literally wasn't > > > a single register we could use (yay x86). > > > > > > I would definitely consider ditching our use of -mindirect-thunk- > > > register with GCC for 32-bit and exporting the > > > __x86_indirect_thunk, to be consistent if that's what clang wants > > > to do. > > > > > :: sigh :: is there no way to change the name? > > > > We use a "push" suffix to reduce ambiguity about what convention is > > expected here.... But I guess we can just use the base name if that's > > already shipped. > > It has indeed already shipped in GCC 7.3; sorry. It had no > disambiguation in its name because it was the original retpoline, > before we realised that CET would break things. > > The other thing to keep an eye on is the *return* thunk, which might > end up being needed on Skylake-era CPUs. See the thread at > https://lkml.org/lkml/2018/2/4/147 > > > I'm strongly of the opinion that I think Arjan expressed: > > - retpoline alone is probably fine with sufficient RSB stuffing patches in the kernel > - if some folks are worried about the security risk here and running on SKX, they should use IBRS. > > Given the speed of IBRS on SKX and the complexity & runtime hit of thunking ret, I really don't see a good motivation for us teaching the compiler how to do this. >
David Woodhouse via llvm-dev
2018-Feb-07 10:49 UTC
[llvm-dev] retpoline mitigation and 6.0
On Wed, 2018-02-07 at 06:20 +0000, Chandler Carruth wrote:> I've landed the patch in r324449. > > Before we merge this into two different Clang release branches and > almost immediately release one of them, I would really like someone > to confirm that this patch works well with the Linux kernel. David, > if you're up for that, it would be great. Alternatively, Guenter or > someone else here can help.Hm, please could we also have the %V asm constraint modifier? That allows us to emit calls to the thunks from inline asm using the register that the compiler chose for us: asm volatile ("call __x86_indirect_thunk_%V[thunk_target]" : : [thunk_target] "r" (the_function)); Other than that, I get the following errors with LLVM+Clang master, and my tree at http://git.infradead.org/users/dwmw2/linux-retpoline.git/shortlog/refs/heads/ibpb I haven't paid much attention to llvmlinux for a while; are these expected? I'll try turning off config options until I can get something to build... Script started on 2018-02-07 10:36:07+0000 ]0;dwoodhou at i7:~/git/linux-2.6[dwoodhou at i7 linux-2.6]$ make CC=~/git/llvm-build/bin/clang vmlinux聽聽-k 聽 CHK聽聽聽聽聽include/config/kernel.release 聽 CHK聽聽聽聽聽include/generated/uapi/linux/version.h 聽 CHK聽聽聽聽聽include/generated/utsrelease.h 聽 CHK聽聽聽聽聽include/generated/bounds.h 聽 CHK聽聽聽聽聽include/generated/timeconst.h 聽 CHK聽聽聽聽聽include/generated/asm-offsets.h 聽 CALL聽聽聽聽scripts/checksyscalls.sh 聽 DESCEND聽聽objtool 聽 CHK聽聽聽聽聽scripts/mod/devicetable-offsets.h 聽 CHK聽聽聽聽聽include/generated/compile.h 聽 CC聽聽聽聽聽聽arch/x86/events/core.o clang-7.0: /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9092: bool llvm::ScalarEvolution::isLoopEntryGuardedByCond(const llvm::Loop*, llvm::CmpInst::Predicate, const llvm::SCEV*, const llvm::SCEV*): Assertion `(!ProvedNonStrictComparison || !ProvedNonEquality) && "Why we were unable to prove (Pred, LHS, RHS) via constant ranges?"' failed. #0 0x0000000003cdcc0e llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:398:0 #1 0x0000000003cdcca1 PrintStackTraceSignalHandler(void*) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:462:0 #2 0x0000000003cdb146 llvm::sys::RunSignalHandlers() /home/dwmw2/git/llvm/lib/Support/Signals.cpp:49:0 #3 0x0000000003cdc583 SignalHandler(int) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:252:0 #4 0x00007f9b52e75a80 __restore_rt (/lib64/libpthread.so.0+0x12a80) #5 0x00007f9b5197666b __GI_raise (/lib64/libc.so.6+0x3766b) #6 0x00007f9b51978381 __GI_abort (/lib64/libc.so.6+0x39381) #7 0x00007f9b5196e8fa __assert_fail_base (/lib64/libc.so.6+0x2f8fa) #8 0x00007f9b5196e972 (/lib64/libc.so.6+0x2f972) #9 0x0000000002f60e6b llvm::ScalarEvolution::isLoopEntryGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9110:0 #10 0x0000000002f3a1f8 llvm::ScalarEvolution::getSignExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:1991:0 #11 0x0000000003dd8df8 (anonymous namespace)::SimplifyIndvar::strengthenOverflowingOperation(llvm::BinaryOperator*, llvm::Value*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:652:0 #12 0x0000000003dd9578 (anonymous namespace)::SimplifyIndvar::simplifyUsers(llvm::PHINode*, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:800:0 #13 0x0000000003dd9757 llvm::simplifyUsersOfIV(llvm::PHINode*, llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::LoopInfo*, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&, llvm::SCEVExpander&, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:832:0 #14 0x0000000003a4235a (anonymous namespace)::IndVarSimplify::simplifyAndExtend(llvm::Loop*, llvm::SCEVExpander&, llvm::LoopInfo*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1812:0 #15 0x0000000003a447db (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2461:0 #16 0x0000000003a44f64 (anonymous namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2576:0 #17 0x0000000002ed44ff llvm::LPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/Analysis/LoopPass.cpp:204:0 #18 0x00000000035a1af1 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1520:0 #19 0x0000000002e0311c (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:156:0 #20 0x0000000002e040a4 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:423:0 #21 0x0000000002e043a5 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:479:0 #22 0x00000000035a1fc3 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1597:0 #23 0x00000000035a2693 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1700:0 #24 0x00000000035a288b llvm::legacy::PassManager::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1732:0 #25 0x0000000003f8b5d1 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:801:0 #26 0x0000000003f8df15 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1180:0 #27 0x0000000004aec157 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0 #28 0x00000000057fec75 clang::ParseAST(clang::Sema&, bool, bool) /home/dwmw2/git/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0 #29 0x00000000045f2b13 clang::ASTFrontendAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1005:0 #30 0x0000000004aea206 clang::CodeGenAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:0 #31 0x00000000045f256d clang::FrontendAction::Execute() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:908:0 #32 0x000000000459028f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/dwmw2/git/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:992:0 #33 0x0000000004734158 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/dwmw2/git/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0 #34 0x0000000001c119a2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/dwmw2/git/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0 #35 0x0000000001c06f5d ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:309:0 #36 0x0000000001c07b94 main /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:389:0 #37 0x00007f9b5196000a __libc_start_main (/lib64/libc.so.6+0x2100a) #38 0x0000000001c0480a _start (/home/dwmw2/git/llvm-build/bin/clang-7.0+0x1c0480a) Stack dump: 0. Program arguments: /home/dwmw2/git/llvm-build/bin/clang-7.0 -cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name core.c -mrelocation-model static -mthread-model posix -mllvm -warn-stack-size=2048 -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -no-integrated-as -mconstructor-aliases -fuse-init-array -mcode-model kernel -target-cpu x86-64 -target-feature -sse -target-feature -mmx -target-feature -sse2 -target-feature -3dnow -target-feature -avx -target-feature -x87 -target-feature +retpoline-external-thunk -disable-red-zone -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/dwmw2/git/linux-2.6/arch/x86/events/core.gcno -nostdsysteminc -nobuiltininc -resource-dir /home/dwmw2/git/llvm-build/lib/clang/7.0.0 -dependency-file arch/x86/events/.core.o.d -MT arch/x86/events/core.o -sys-header-deps -isystem /home/dwmw2/git/llvm-build/lib/clang/7.0.0/include -include ./include/linux/kconfig.h -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_SSSE3=1 -D CONFIG_AS_CRC32=1 -D CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CONFIG_AS_AVX512=1 -D CONFIG_AS_SHA1_NI=1 -D CONFIG_AS_SHA256_NI=1 -D RETPOLINE -D CC_USING_FENTRY -D KBUILD_BASENAME="core" -D KBUILD_MODNAME="core" -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/dwmw2/git/linux-2.6 -ferror-limit 19 -fmessage-length 80 -pg -mfentry -fwrapv -stack-protector 2 -mstack-alignment=8 -fwchar-type=short -fno-signed-wchar -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/core-26897d.s -x c arch/x86/events/core.c聽 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'arch/x86/events/core.c'. 4. Running pass 'Loop Pass Manager' on function '@x86_reserve_hardware' 5. Running pass 'Induction Variable Simplification' on basic block '%for.body15.i' clang-7.0: [0;1;31merror: unable to execute command: Aborted (core dumped) clang-7.0: [0;1;31merror: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.0聽聽(llvm/trunk 324455) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/dwmw2/git/llvm-build/bin clang-7.0: [0;1;30mnote: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/core-4220fe.c clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/core-4220fe.sh clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** make[2]: *** [scripts/Makefile.build:317: arch/x86/events/core.o] Error 254 make[2]: Target '__build' not remade because of errors. make[1]: *** [scripts/Makefile.build:575: arch/x86/events] Error 2 聽 CC聽聽聽聽聽聽arch/x86/hyperv/mmu.o In file included from arch/x86/hyperv/mmu.c:9: ./arch/x86/include/asm/mshyperv.h:189:23: [0;1;31merror: invalid operand in inline asm: 聽聽聽聽聽聽'mov $4, %r8999: .pushsection .discard.nospec .long 999b - . .popsection 聽聽聽聽聽聽661: call *$5662:.skip -(((6651f-6641f)-(662b-661b)) > 0) * 聽聽聽聽聽聽((6651f-6641f)-(662b-661b)),0x90663:.pushsection .altinstructions,"a" 聽聽聽聽聽聽.long 661b - . .long 6641f - . .word ( 7*32+12) .byte 663b-661b .byte 聽聽聽聽聽聽6651f-6641f .byte 663b-662b.popsection.pushsection .altinstr_replacement, 聽聽聽聽聽聽"ax"6641: call __x86_indirect_thunk_${5:V}6651: .popsection' 聽聽聽聽聽聽聽聽__asm__ __volatile__("mov %4, %%r8\n" [0;1;32m聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽^ ./arch/x86/include/asm/mshyperv.h:189:23: [0;1;31merror: invalid operand in inline asm: 聽聽聽聽聽聽'mov $4, %r8999: .pushsection .discard.nospec .long 999b - . .popsection 聽聽聽聽聽聽661: call *$5662:.skip -(((6651f-6641f)-(662b-661b)) > 0) * 聽聽聽聽聽聽((6651f-6641f)-(662b-661b)),0x90663:.pushsection .altinstructions,"a" 聽聽聽聽聽聽.long 661b - . .long 6641f - . .word ( 7*32+12) .byte 663b-661b .byte 聽聽聽聽聽聽6651f-6641f .byte 663b-662b.popsection.pushsection .altinstr_replacement, 聽聽聽聽聽聽"ax"6641: call __x86_indirect_thunk_${5:V}6651: .popsection' ./arch/x86/include/asm/mshyperv.h:189:23: [0;1;31merror: invalid operand in inline asm: 聽聽聽聽聽聽'mov $4, %r8999: .pushsection .discard.nospec .long 999b - . .popsection 聽聽聽聽聽聽661: call *$5662:.skip -(((6651f-6641f)-(662b-661b)) > 0) * 聽聽聽聽聽聽((6651f-6641f)-(662b-661b)),0x90663:.pushsection .altinstructions,"a" 聽聽聽聽聽聽.long 661b - . .long 6641f - . .word ( 7*32+12) .byte 663b-661b .byte 聽聽聽聽聽聽6651f-6641f .byte 663b-662b.popsection.pushsection .altinstr_replacement, 聽聽聽聽聽聽"ax"6641: call __x86_indirect_thunk_${5:V}6651: .popsection' ./arch/x86/include/asm/mshyperv.h:189:23: [0;1;31merror: invalid operand in inline asm: 聽聽聽聽聽聽'mov $4, %r8999: .pushsection .discard.nospec .long 999b - . .popsection 聽聽聽聽聽聽661: call *$5662:.skip -(((6651f-6641f)-(662b-661b)) > 0) * 聽聽聽聽聽聽((6651f-6641f)-(662b-661b)),0x90663:.pushsection .altinstructions,"a" 聽聽聽聽聽聽.long 661b - . .long 6641f - . .word ( 7*32+12) .byte 663b-661b .byte 聽聽聽聽聽聽6651f-6641f .byte 663b-662b.popsection.pushsection .altinstr_replacement, 聽聽聽聽聽聽"ax"6641: call __x86_indirect_thunk_${5:V}6651: .popsection' ./arch/x86/include/asm/mshyperv.h:189:23: [0;1;31merror: invalid operand in inline asm: 聽聽聽聽聽聽'mov $4, %r8999: .pushsection .discard.nospec .long 999b - . .popsection 聽聽聽聽聽聽661: call *$5662:.skip -(((6651f-6641f)-(662b-661b)) > 0) * 聽聽聽聽聽聽((6651f-6641f)-(662b-661b)),0x90663:.pushsection .altinstructions,"a" 聽聽聽聽聽聽.long 661b - . .long 6641f - . .word ( 7*32+12) .byte 663b-661b .byte 聽聽聽聽聽聽6651f-6641f .byte 663b-662b.popsection.pushsection .altinstr_replacement, 聽聽聽聽聽聽"ax"6641: call __x86_indirect_thunk_${5:V}6651: .popsection' ./arch/x86/include/asm/mshyperv.h:189:23: [0;1;31merror: invalid operand in inline asm: 聽聽聽聽聽聽'mov $4, %r8999: .pushsection .discard.nospec .long 999b - . .popsection 聽聽聽聽聽聽661: call *$5662:.skip -(((6651f-6641f)-(662b-661b)) > 0) * 聽聽聽聽聽聽((6651f-6641f)-(662b-661b)),0x90663:.pushsection .altinstructions,"a" 聽聽聽聽聽聽.long 661b - . .long 6641f - . .word ( 7*32+12) .byte 663b-661b .byte 聽聽聽聽聽聽6651f-6641f .byte 663b-662b.popsection.pushsection .altinstr_replacement, 聽聽聽聽聽聽"ax"6641: call __x86_indirect_thunk_${5:V}6651: .popsection' 6 errors generated. make[2]: *** [scripts/Makefile.build:317: arch/x86/hyperv/mmu.o] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [scripts/Makefile.build:575: arch/x86/hyperv] Error 2 聽 CC聽聽聽聽聽聽arch/x86/kernel/cpu/microcode/intel.o clang-7.0: /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9092: bool llvm::ScalarEvolution::isLoopEntryGuardedByCond(const llvm::Loop*, llvm::CmpInst::Predicate, const llvm::SCEV*, const llvm::SCEV*): Assertion `(!ProvedNonStrictComparison || !ProvedNonEquality) && "Why we were unable to prove (Pred, LHS, RHS) via constant ranges?"' failed. #0 0x0000000003cdcc0e llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:398:0 #1 0x0000000003cdcca1 PrintStackTraceSignalHandler(void*) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:462:0 #2 0x0000000003cdb146 llvm::sys::RunSignalHandlers() /home/dwmw2/git/llvm/lib/Support/Signals.cpp:49:0 #3 0x0000000003cdc583 SignalHandler(int) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:252:0 #4 0x00007fc240864a80 __restore_rt (/lib64/libpthread.so.0+0x12a80) #5 0x00007fc23f36566b __GI_raise (/lib64/libc.so.6+0x3766b) #6 0x00007fc23f367381 __GI_abort (/lib64/libc.so.6+0x39381) #7 0x00007fc23f35d8fa __assert_fail_base (/lib64/libc.so.6+0x2f8fa) #8 0x00007fc23f35d972 (/lib64/libc.so.6+0x2f972) #9 0x0000000002f60e6b llvm::ScalarEvolution::isLoopEntryGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9110:0 #10 0x0000000002f3a1f8 llvm::ScalarEvolution::getSignExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:1991:0 #11 0x0000000003dd8d75 (anonymous namespace)::SimplifyIndvar::strengthenOverflowingOperation(llvm::BinaryOperator*, llvm::Value*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:649:0 #12 0x0000000003dd9578 (anonymous namespace)::SimplifyIndvar::simplifyUsers(llvm::PHINode*, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:800:0 #13 0x0000000003dd9757 llvm::simplifyUsersOfIV(llvm::PHINode*, llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::LoopInfo*, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&, llvm::SCEVExpander&, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:832:0 #14 0x0000000003a4235a (anonymous namespace)::IndVarSimplify::simplifyAndExtend(llvm::Loop*, llvm::SCEVExpander&, llvm::LoopInfo*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1812:0 #15 0x0000000003a447db (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2461:0 #16 0x0000000003a44f64 (anonymous namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2576:0 #17 0x0000000002ed44ff llvm::LPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/Analysis/LoopPass.cpp:204:0 #18 0x00000000035a1af1 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1520:0 #19 0x0000000002e0311c (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:156:0 #20 0x0000000002e040a4 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:423:0 #21 0x0000000002e043a5 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:479:0 #22 0x00000000035a1fc3 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1597:0 #23 0x00000000035a2693 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1700:0 #24 0x00000000035a288b llvm::legacy::PassManager::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1732:0 #25 0x0000000003f8b5d1 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:801:0 #26 0x0000000003f8df15 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1180:0 #27 0x0000000004aec157 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0 #28 0x00000000057fec75 clang::ParseAST(clang::Sema&, bool, bool) /home/dwmw2/git/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0 #29 0x00000000045f2b13 clang::ASTFrontendAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1005:0 #30 0x0000000004aea206 clang::CodeGenAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:0 #31 0x00000000045f256d clang::FrontendAction::Execute() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:908:0 #32 0x000000000459028f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/dwmw2/git/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:992:0 #33 0x0000000004734158 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/dwmw2/git/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0 #34 0x0000000001c119a2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/dwmw2/git/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0 #35 0x0000000001c06f5d ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:309:0 #36 0x0000000001c07b94 main /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:389:0 #37 0x00007fc23f34f00a __libc_start_main (/lib64/libc.so.6+0x2100a) #38 0x0000000001c0480a _start (/home/dwmw2/git/llvm-build/bin/clang-7.0+0x1c0480a) Stack dump: 0. Program arguments: /home/dwmw2/git/llvm-build/bin/clang-7.0 -cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name intel.c -mrelocation-model static -mthread-model posix -mllvm -warn-stack-size=2048 -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -no-integrated-as -mconstructor-aliases -fuse-init-array -mcode-model kernel -target-cpu x86-64 -target-feature -sse -target-feature -mmx -target-feature -sse2 -target-feature -3dnow -target-feature -avx -target-feature -x87 -target-feature +retpoline-external-thunk -disable-red-zone -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/dwmw2/git/linux-2.6/arch/x86/kernel/cpu/microcode/intel.gcno -nostdsysteminc -nobuiltininc -resource-dir /home/dwmw2/git/llvm-build/lib/clang/7.0.0 -dependency-file arch/x86/kernel/cpu/microcode/.intel.o.d -MT arch/x86/kernel/cpu/microcode/intel.o -sys-header-deps -isystem /home/dwmw2/git/llvm-build/lib/clang/7.0.0/include -include ./include/linux/kconfig.h -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_SSSE3=1 -D CONFIG_AS_CRC32=1 -D CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CONFIG_AS_AVX512=1 -D CONFIG_AS_SHA1_NI=1 -D CONFIG_AS_SHA256_NI=1 -D RETPOLINE -D CC_USING_FENTRY -D KBUILD_BASENAME="intel" -D KBUILD_MODNAME="microcode" -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/dwmw2/git/linux-2.6 -ferror-limit 19 -fmessage-length 80 -pg -mfentry -fwrapv -stack-protector 2 -mstack-alignment=8 -fwchar-type=short -fno-signed-wchar -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/intel-e7ba31.s -x c arch/x86/kernel/cpu/microcode/intel.c聽 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'arch/x86/kernel/cpu/microcode/intel.c'. 4. Running pass 'Loop Pass Manager' on function '@microcode_sanity_check' 5. Running pass 'Induction Variable Simplification' on basic block '%while.body70' clang-7.0: [0;1;31merror: unable to execute command: Aborted (core dumped) clang-7.0: [0;1;31merror: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.0聽聽(llvm/trunk 324455) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/dwmw2/git/llvm-build/bin clang-7.0: [0;1;30mnote: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/intel-c10d76.c clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/intel-c10d76.sh clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** make[4]: *** [scripts/Makefile.build:317: arch/x86/kernel/cpu/microcode/intel.o] Error 254 make[4]: Target '__build' not remade because of errors. make[3]: *** [scripts/Makefile.build:575: arch/x86/kernel/cpu/microcode] Error 2 make[3]: Target '__build' not remade because of errors. make[2]: *** [scripts/Makefile.build:575: arch/x86/kernel/cpu] Error 2 make[2]: Target '__build' not remade because of errors. make[1]: *** [scripts/Makefile.build:575: arch/x86/kernel] Error 2 聽 CC聽聽聽聽聽聽arch/x86/xen/multicalls.o In file included from arch/x86/xen/multicalls.c:27: ./arch/x86/include/asm/xen/hypercall.h:221:15: [0;1;31merror: invalid operand in inline 聽聽聽聽聽聽asm: '999: .pushsection .discard.nospec .long 999b - . .popsection 661: 聽聽聽聽聽聽call *$7662:.skip -(((6651f-6641f)-(662b-661b)) > 0) * 聽聽聽聽聽聽((6651f-6641f)-(662b-661b)),0x90663:.pushsection .altinstructions,"a" 聽聽聽聽聽聽.long 661b - . .long 6641f - . .word ( 7*32+12) .byte 663b-661b .byte 聽聽聽聽聽聽6651f-6641f .byte 663b-662b.popsection.pushsection .altinstr_replacement, 聽聽聽聽聽聽"ax"6641: call __x86_indirect_thunk_${7:V}6651: .popsection' 聽聽聽聽聽聽聽聽asm volatile(CALL_NOSPEC [0;1;32m聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽^ ./arch/x86/include/asm/nospec-branch.h:102:2: [0;1;30mnote: expanded from macro 聽聽聽聽聽聽'CALL_NOSPEC' 聽聽聽聽聽聽聽聽ANNOTATE_NOSPEC_ALTERNATIVE聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽\ [0;1;32m聽聽聽聽聽聽聽聽^ ./arch/x86/include/asm/nospec-branch.h:90:2: [0;1;30mnote: expanded from macro 聽聽聽聽聽聽'ANNOTATE_NOSPEC_ALTERNATIVE' 聽聽聽聽聽聽聽聽"999:\n\t"聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽\ [0;1;32m聽聽聽聽聽聽聽聽^ 1 error generated. make[2]: *** [scripts/Makefile.build:317: arch/x86/xen/multicalls.o] Error 1 make[2]: Target '__build' not remade because of errors. make[1]: *** [scripts/Makefile.build:575: arch/x86/xen] Error 2 make[1]: Target '__build' not remade because of errors. make: *** [Makefile:1018: arch/x86] Error 2 聽 CC聽聽聽聽聽聽drivers/cpuidle/governors/menu.o clang-7.0: /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9092: bool llvm::ScalarEvolution::isLoopEntryGuardedByCond(const llvm::Loop*, llvm::CmpInst::Predicate, const llvm::SCEV*, const llvm::SCEV*): Assertion `(!ProvedNonStrictComparison || !ProvedNonEquality) && "Why we were unable to prove (Pred, LHS, RHS) via constant ranges?"' failed. #0 0x0000000003cdcc0e llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:398:0 #1 0x0000000003cdcca1 PrintStackTraceSignalHandler(void*) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:462:0 #2 0x0000000003cdb146 llvm::sys::RunSignalHandlers() /home/dwmw2/git/llvm/lib/Support/Signals.cpp:49:0 #3 0x0000000003cdc583 SignalHandler(int) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:252:0 #4 0x00007f8d6a5baa80 __restore_rt (/lib64/libpthread.so.0+0x12a80) #5 0x00007f8d690bb66b __GI_raise (/lib64/libc.so.6+0x3766b) #6 0x00007f8d690bd381 __GI_abort (/lib64/libc.so.6+0x39381) #7 0x00007f8d690b38fa __assert_fail_base (/lib64/libc.so.6+0x2f8fa) #8 0x00007f8d690b3972 (/lib64/libc.so.6+0x2f972) #9 0x0000000002f60e6b llvm::ScalarEvolution::isLoopEntryGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9110:0 #10 0x0000000002f5f6d1 llvm::ScalarEvolution::isKnownPredicate(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:8672:0 #11 0x0000000003a40edf (anonymous namespace)::WidenIV::pushNarrowIVUsers(llvm::Instruction*, llvm::Instruction*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1510:0 #12 0x0000000003a415f4 (anonymous namespace)::WidenIV::createWideIV(llvm::SCEVExpander&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1621:0 #13 0x0000000003a42464 (anonymous namespace)::IndVarSimplify::simplifyAndExtend(llvm::Loop*, llvm::SCEVExpander&, llvm::LoopInfo*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1821:0 #14 0x0000000003a447db (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2461:0 #15 0x0000000003a44f64 (anonymous namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2576:0 #16 0x0000000002ed44ff llvm::LPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/Analysis/LoopPass.cpp:204:0 #17 0x00000000035a1af1 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1520:0 #18 0x0000000002e0311c (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:156:0 #19 0x0000000002e040a4 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:423:0 #20 0x0000000002e043a5 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:479:0 #21 0x00000000035a1fc3 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1597:0 #22 0x00000000035a2693 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1700:0 #23 0x00000000035a288b llvm::legacy::PassManager::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1732:0 #24 0x0000000003f8b5d1 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:801:0 #25 0x0000000003f8df15 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1180:0 #26 0x0000000004aec157 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0 #27 0x00000000057fec75 clang::ParseAST(clang::Sema&, bool, bool) /home/dwmw2/git/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0 #28 0x00000000045f2b13 clang::ASTFrontendAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1005:0 #29 0x0000000004aea206 clang::CodeGenAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:0 #30 0x00000000045f256d clang::FrontendAction::Execute() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:908:0 #31 0x000000000459028f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/dwmw2/git/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:992:0 #32 0x0000000004734158 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/dwmw2/git/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0 #33 0x0000000001c119a2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/dwmw2/git/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0 #34 0x0000000001c06f5d ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:309:0 #35 0x0000000001c07b94 main /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:389:0 #36 0x00007f8d690a500a __libc_start_main (/lib64/libc.so.6+0x2100a) #37 0x0000000001c0480a _start (/home/dwmw2/git/llvm-build/bin/clang-7.0+0x1c0480a) Stack dump: 0. Program arguments: /home/dwmw2/git/llvm-build/bin/clang-7.0 -cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name menu.c -mrelocation-model static -mthread-model posix -mllvm -warn-stack-size=2048 -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -no-integrated-as -mconstructor-aliases -fuse-init-array -mcode-model kernel -target-cpu x86-64 -target-feature -sse -target-feature -mmx -target-feature -sse2 -target-feature -3dnow -target-feature -avx -target-feature -x87 -target-feature +retpoline-external-thunk -disable-red-zone -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/dwmw2/git/linux-2.6/drivers/cpuidle/governors/menu.gcno -nostdsysteminc -nobuiltininc -resource-dir /home/dwmw2/git/llvm-build/lib/clang/7.0.0 -dependency-file drivers/cpuidle/governors/.menu.o.d -MT drivers/cpuidle/governors/menu.o -sys-header-deps -isystem /home/dwmw2/git/llvm-build/lib/clang/7.0.0/include -include ./include/linux/kconfig.h -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_SSSE3=1 -D CONFIG_AS_CRC32=1 -D CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CONFIG_AS_AVX512=1 -D CONFIG_AS_SHA1_NI=1 -D CONFIG_AS_SHA256_NI=1 -D RETPOLINE -D CC_USING_FENTRY -D KBUILD_BASENAME="menu" -D KBUILD_MODNAME="menu" -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/dwmw2/git/linux-2.6 -ferror-limit 19 -fmessage-length 80 -pg -mfentry -fwrapv -stack-protector 2 -mstack-alignment=8 -fwchar-type=short -fno-signed-wchar -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/menu-07e9d7.s -x c drivers/cpuidle/governors/menu.c聽 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'drivers/cpuidle/governors/menu.c'. 4. Running pass 'Loop Pass Manager' on function '@menu_select' 5. Running pass 'Induction Variable Simplification' on basic block '%for.body' clang-7.0: [0;1;31merror: unable to execute command: Aborted (core dumped) clang-7.0: [0;1;31merror: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.0聽聽(llvm/trunk 324455) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/dwmw2/git/llvm-build/bin clang-7.0: [0;1;30mnote: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/menu-af3103.c clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/menu-af3103.sh clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** make[3]: *** [scripts/Makefile.build:317: drivers/cpuidle/governors/menu.o] Error 254 make[3]: Target '__build' not remade because of errors. make[2]: *** [scripts/Makefile.build:575: drivers/cpuidle/governors] Error 2 make[2]: Target '__build' not remade because of errors. make[1]: *** [scripts/Makefile.build:575: drivers/cpuidle] Error 2 聽 CC聽聽聽聽聽聽drivers/pci/iov.o clang-7.0: /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9092: bool llvm::ScalarEvolution::isLoopEntryGuardedByCond(const llvm::Loop*, llvm::CmpInst::Predicate, const llvm::SCEV*, const llvm::SCEV*): Assertion `(!ProvedNonStrictComparison || !ProvedNonEquality) && "Why we were unable to prove (Pred, LHS, RHS) via constant ranges?"' failed. #0 0x0000000003cdcc0e llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:398:0 #1 0x0000000003cdcca1 PrintStackTraceSignalHandler(void*) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:462:0 #2 0x0000000003cdb146 llvm::sys::RunSignalHandlers() /home/dwmw2/git/llvm/lib/Support/Signals.cpp:49:0 #3 0x0000000003cdc583 SignalHandler(int) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:252:0 #4 0x00007f05e113aa80 __restore_rt (/lib64/libpthread.so.0+0x12a80) #5 0x00007f05dfc3b66b __GI_raise (/lib64/libc.so.6+0x3766b) #6 0x00007f05dfc3d381 __GI_abort (/lib64/libc.so.6+0x39381) #7 0x00007f05dfc338fa __assert_fail_base (/lib64/libc.so.6+0x2f8fa) #8 0x00007f05dfc33972 (/lib64/libc.so.6+0x2f972) #9 0x0000000002f60e6b llvm::ScalarEvolution::isLoopEntryGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9110:0 #10 0x0000000002f3a1f8 llvm::ScalarEvolution::getSignExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:1991:0 #11 0x0000000003dd8d75 (anonymous namespace)::SimplifyIndvar::strengthenOverflowingOperation(llvm::BinaryOperator*, llvm::Value*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:649:0 #12 0x0000000003dd9578 (anonymous namespace)::SimplifyIndvar::simplifyUsers(llvm::PHINode*, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:800:0 #13 0x0000000003dd9757 llvm::simplifyUsersOfIV(llvm::PHINode*, llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::LoopInfo*, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&, llvm::SCEVExpander&, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:832:0 #14 0x0000000003a4235a (anonymous namespace)::IndVarSimplify::simplifyAndExtend(llvm::Loop*, llvm::SCEVExpander&, llvm::LoopInfo*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1812:0 #15 0x0000000003a447db (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2461:0 #16 0x0000000003a44f64 (anonymous namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2576:0 #17 0x0000000002ed44ff llvm::LPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/Analysis/LoopPass.cpp:204:0 #18 0x00000000035a1af1 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1520:0 #19 0x0000000002e0311c (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:156:0 #20 0x0000000002e040a4 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:423:0 #21 0x0000000002e043a5 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:479:0 #22 0x00000000035a1fc3 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1597:0 #23 0x00000000035a2693 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1700:0 #24 0x00000000035a288b llvm::legacy::PassManager::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1732:0 #25 0x0000000003f8b5d1 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:801:0 #26 0x0000000003f8df15 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1180:0 #27 0x0000000004aec157 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0 #28 0x00000000057fec75 clang::ParseAST(clang::Sema&, bool, bool) /home/dwmw2/git/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0 #29 0x00000000045f2b13 clang::ASTFrontendAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1005:0 #30 0x0000000004aea206 clang::CodeGenAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:0 #31 0x00000000045f256d clang::FrontendAction::Execute() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:908:0 #32 0x000000000459028f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/dwmw2/git/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:992:0 #33 0x0000000004734158 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/dwmw2/git/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0 #34 0x0000000001c119a2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/dwmw2/git/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0 #35 0x0000000001c06f5d ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:309:0 #36 0x0000000001c07b94 main /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:389:0 #37 0x00007f05dfc2500a __libc_start_main (/lib64/libc.so.6+0x2100a) #38 0x0000000001c0480a _start (/home/dwmw2/git/llvm-build/bin/clang-7.0+0x1c0480a) Stack dump: 0. Program arguments: /home/dwmw2/git/llvm-build/bin/clang-7.0 -cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name iov.c -mrelocation-model static -mthread-model posix -mllvm -warn-stack-size=2048 -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -no-integrated-as -mconstructor-aliases -fuse-init-array -mcode-model kernel -target-cpu x86-64 -target-feature -sse -target-feature -mmx -target-feature -sse2 -target-feature -3dnow -target-feature -avx -target-feature -x87 -target-feature +retpoline-external-thunk -disable-red-zone -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/dwmw2/git/linux-2.6/drivers/pci/iov.gcno -nostdsysteminc -nobuiltininc -resource-dir /home/dwmw2/git/llvm-build/lib/clang/7.0.0 -dependency-file drivers/pci/.iov.o.d -MT drivers/pci/iov.o -sys-header-deps -isystem /home/dwmw2/git/llvm-build/lib/clang/7.0.0/include -include ./include/linux/kconfig.h -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_SSSE3=1 -D CONFIG_AS_CRC32=1 -D CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CONFIG_AS_AVX512=1 -D CONFIG_AS_SHA1_NI=1 -D CONFIG_AS_SHA256_NI=1 -D RETPOLINE -D CC_USING_FENTRY -D KBUILD_BASENAME="iov" -D KBUILD_MODNAME="iov" -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/dwmw2/git/linux-2.6 -ferror-limit 19 -fmessage-length 80 -pg -mfentry -fwrapv -stack-protector 2 -mstack-alignment=8 -fwchar-type=short -fno-signed-wchar -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/iov-eee364.s -x c drivers/pci/iov.c聽 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'drivers/pci/iov.c'. 4. Running pass 'Loop Pass Manager' on function '@pci_enable_sriov' 5. Running pass 'Induction Variable Simplification' on basic block '%while.body.i' clang-7.0: [0;1;31merror: unable to execute command: Aborted (core dumped) clang-7.0: [0;1;31merror: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.0聽聽(llvm/trunk 324455) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/dwmw2/git/llvm-build/bin clang-7.0: [0;1;30mnote: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/iov-d7800f.c clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/iov-d7800f.sh clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** make[2]: *** [scripts/Makefile.build:317: drivers/pci/iov.o] Error 254 make[2]: Target '__build' not remade because of errors. make[1]: *** [scripts/Makefile.build:575: drivers/pci] Error 2 聽 CC聽聽聽聽聽聽drivers/usb/host/xhci.o clang-7.0: /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9092: bool llvm::ScalarEvolution::isLoopEntryGuardedByCond(const llvm::Loop*, llvm::CmpInst::Predicate, const llvm::SCEV*, const llvm::SCEV*): Assertion `(!ProvedNonStrictComparison || !ProvedNonEquality) && "Why we were unable to prove (Pred, LHS, RHS) via constant ranges?"' failed. #0 0x0000000003cdcc0e llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:398:0 #1 0x0000000003cdcca1 PrintStackTraceSignalHandler(void*) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:462:0 #2 0x0000000003cdb146 llvm::sys::RunSignalHandlers() /home/dwmw2/git/llvm/lib/Support/Signals.cpp:49:0 #3 0x0000000003cdc583 SignalHandler(int) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:252:0 #4 0x00007f7b05b99a80 __restore_rt (/lib64/libpthread.so.0+0x12a80) #5 0x00007f7b0469a66b __GI_raise (/lib64/libc.so.6+0x3766b) #6 0x00007f7b0469c381 __GI_abort (/lib64/libc.so.6+0x39381) #7 0x00007f7b046928fa __assert_fail_base (/lib64/libc.so.6+0x2f8fa) #8 0x00007f7b04692972 (/lib64/libc.so.6+0x2f972) #9 0x0000000002f60e6b llvm::ScalarEvolution::isLoopEntryGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9110:0 #10 0x0000000002f3a1f8 llvm::ScalarEvolution::getSignExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:1991:0 #11 0x0000000003dd8df8 (anonymous namespace)::SimplifyIndvar::strengthenOverflowingOperation(llvm::BinaryOperator*, llvm::Value*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:652:0 #12 0x0000000003dd9578 (anonymous namespace)::SimplifyIndvar::simplifyUsers(llvm::PHINode*, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:800:0 #13 0x0000000003dd9757 llvm::simplifyUsersOfIV(llvm::PHINode*, llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::LoopInfo*, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&, llvm::SCEVExpander&, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:832:0 #14 0x0000000003a4235a (anonymous namespace)::IndVarSimplify::simplifyAndExtend(llvm::Loop*, llvm::SCEVExpander&, llvm::LoopInfo*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1812:0 #15 0x0000000003a447db (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2461:0 #16 0x0000000003a44f64 (anonymous namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2576:0 #17 0x0000000002ed44ff llvm::LPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/Analysis/LoopPass.cpp:204:0 #18 0x00000000035a1af1 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1520:0 #19 0x0000000002e0311c (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:156:0 #20 0x0000000002e040a4 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:423:0 #21 0x0000000002e043a5 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:479:0 #22 0x00000000035a1fc3 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1597:0 #23 0x00000000035a2693 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1700:0 #24 0x00000000035a288b llvm::legacy::PassManager::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1732:0 #25 0x0000000003f8b5d1 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:801:0 #26 0x0000000003f8df15 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1180:0 #27 0x0000000004aec157 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0 #28 0x00000000057fec75 clang::ParseAST(clang::Sema&, bool, bool) /home/dwmw2/git/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0 #29 0x00000000045f2b13 clang::ASTFrontendAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1005:0 #30 0x0000000004aea206 clang::CodeGenAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:0 #31 0x00000000045f256d clang::FrontendAction::Execute() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:908:0 #32 0x000000000459028f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/dwmw2/git/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:992:0 #33 0x0000000004734158 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/dwmw2/git/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0 #34 0x0000000001c119a2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/dwmw2/git/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0 #35 0x0000000001c06f5d ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:309:0 #36 0x0000000001c07b94 main /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:389:0 #37 0x00007f7b0468400a __libc_start_main (/lib64/libc.so.6+0x2100a) #38 0x0000000001c0480a _start (/home/dwmw2/git/llvm-build/bin/clang-7.0+0x1c0480a) Stack dump: 0. Program arguments: /home/dwmw2/git/llvm-build/bin/clang-7.0 -cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name xhci.c -mrelocation-model static -mthread-model posix -mllvm -warn-stack-size=2048 -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -no-integrated-as -mconstructor-aliases -fuse-init-array -mcode-model kernel -target-cpu x86-64 -target-feature -sse -target-feature -mmx -target-feature -sse2 -target-feature -3dnow -target-feature -avx -target-feature -x87 -target-feature +retpoline-external-thunk -disable-red-zone -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/dwmw2/git/linux-2.6/drivers/usb/host/xhci.gcno -nostdsysteminc -nobuiltininc -resource-dir /home/dwmw2/git/llvm-build/lib/clang/7.0.0 -dependency-file drivers/usb/host/.xhci.o.d -MT drivers/usb/host/xhci.o -sys-header-deps -isystem /home/dwmw2/git/llvm-build/lib/clang/7.0.0/include -include ./include/linux/kconfig.h -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_SSSE3=1 -D CONFIG_AS_CRC32=1 -D CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CONFIG_AS_AVX512=1 -D CONFIG_AS_SHA1_NI=1 -D CONFIG_AS_SHA256_NI=1 -D RETPOLINE -D CC_USING_FENTRY -D KBUILD_BASENAME="xhci" -D KBUILD_MODNAME="xhci_hcd" -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/dwmw2/git/linux-2.6 -ferror-limit 19 -fmessage-length 80 -pg -mfentry -fwrapv -stack-protector 2 -mstack-alignment=8 -fwchar-type=short -fno-signed-wchar -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/xhci-514a71.s -x c drivers/usb/host/xhci.c聽 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'drivers/usb/host/xhci.c'. 4. Running pass 'Loop Pass Manager' on function '@xhci_try_enable_msi' 5. Running pass 'Induction Variable Simplification' on basic block '%while.body.i' clang-7.0: [0;1;31merror: unable to execute command: Aborted (core dumped) clang-7.0: [0;1;31merror: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.0聽聽(llvm/trunk 324455) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/dwmw2/git/llvm-build/bin clang-7.0: [0;1;30mnote: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/xhci-4189be.c clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/xhci-4189be.sh clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** make[3]: *** [scripts/Makefile.build:317: drivers/usb/host/xhci.o] Error 254 make[3]: Target '__build' not remade because of errors. make[2]: *** [scripts/Makefile.build:575: drivers/usb/host] Error 2 聽 CC聽聽聽聽聽聽drivers/usb/mon/mon_bin.o clang-7.0: /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9092: bool llvm::ScalarEvolution::isLoopEntryGuardedByCond(const llvm::Loop*, llvm::CmpInst::Predicate, const llvm::SCEV*, const llvm::SCEV*): Assertion `(!ProvedNonStrictComparison || !ProvedNonEquality) && "Why we were unable to prove (Pred, LHS, RHS) via constant ranges?"' failed. #0 0x0000000003cdcc0e llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:398:0 #1 0x0000000003cdcca1 PrintStackTraceSignalHandler(void*) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:462:0 #2 0x0000000003cdb146 llvm::sys::RunSignalHandlers() /home/dwmw2/git/llvm/lib/Support/Signals.cpp:49:0 #3 0x0000000003cdc583 SignalHandler(int) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:252:0 #4 0x00007f1117b0fa80 __restore_rt (/lib64/libpthread.so.0+0x12a80) #5 0x00007f111661066b __GI_raise (/lib64/libc.so.6+0x3766b) #6 0x00007f1116612381 __GI_abort (/lib64/libc.so.6+0x39381) #7 0x00007f11166088fa __assert_fail_base (/lib64/libc.so.6+0x2f8fa) #8 0x00007f1116608972 (/lib64/libc.so.6+0x2f972) #9 0x0000000002f60e6b llvm::ScalarEvolution::isLoopEntryGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9110:0 #10 0x0000000002f3a1f8 llvm::ScalarEvolution::getSignExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:1991:0 #11 0x0000000003dd8d75 (anonymous namespace)::SimplifyIndvar::strengthenOverflowingOperation(llvm::BinaryOperator*, llvm::Value*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:649:0 #12 0x0000000003dd9578 (anonymous namespace)::SimplifyIndvar::simplifyUsers(llvm::PHINode*, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:800:0 #13 0x0000000003dd9757 llvm::simplifyUsersOfIV(llvm::PHINode*, llvm::ScalarEvolution*, llvm::DominatorTree*, llvm::LoopInfo*, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&, llvm::SCEVExpander&, llvm::IVVisitor*) /home/dwmw2/git/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp:832:0 #14 0x0000000003a4235a (anonymous namespace)::IndVarSimplify::simplifyAndExtend(llvm::Loop*, llvm::SCEVExpander&, llvm::LoopInfo*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1812:0 #15 0x0000000003a447db (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2461:0 #16 0x0000000003a44f64 (anonymous namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2576:0 #17 0x0000000002ed44ff llvm::LPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/Analysis/LoopPass.cpp:204:0 #18 0x00000000035a1af1 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1520:0 #19 0x0000000002e0311c (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:156:0 #20 0x0000000002e040a4 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:423:0 #21 0x0000000002e043a5 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:479:0 #22 0x00000000035a1fc3 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1597:0 #23 0x00000000035a2693 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1700:0 #24 0x00000000035a288b llvm::legacy::PassManager::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1732:0 #25 0x0000000003f8b5d1 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:801:0 #26 0x0000000003f8df15 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1180:0 #27 0x0000000004aec157 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0 #28 0x00000000057fec75 clang::ParseAST(clang::Sema&, bool, bool) /home/dwmw2/git/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0 #29 0x00000000045f2b13 clang::ASTFrontendAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1005:0 #30 0x0000000004aea206 clang::CodeGenAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:0 #31 0x00000000045f256d clang::FrontendAction::Execute() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:908:0 #32 0x000000000459028f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/dwmw2/git/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:992:0 #33 0x0000000004734158 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/dwmw2/git/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0 #34 0x0000000001c119a2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/dwmw2/git/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0 #35 0x0000000001c06f5d ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:309:0 #36 0x0000000001c07b94 main /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:389:0 #37 0x00007f11165fa00a __libc_start_main (/lib64/libc.so.6+0x2100a) #38 0x0000000001c0480a _start (/home/dwmw2/git/llvm-build/bin/clang-7.0+0x1c0480a) Stack dump: 0. Program arguments: /home/dwmw2/git/llvm-build/bin/clang-7.0 -cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name mon_bin.c -mrelocation-model static -mthread-model posix -mllvm -warn-stack-size=2048 -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -no-integrated-as -mconstructor-aliases -fuse-init-array -mcode-model kernel -target-cpu x86-64 -target-feature -sse -target-feature -mmx -target-feature -sse2 -target-feature -3dnow -target-feature -avx -target-feature -x87 -target-feature +retpoline-external-thunk -disable-red-zone -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/dwmw2/git/linux-2.6/drivers/usb/mon/mon_bin.gcno -nostdsysteminc -nobuiltininc -resource-dir /home/dwmw2/git/llvm-build/lib/clang/7.0.0 -dependency-file drivers/usb/mon/.mon_bin.o.d -MT drivers/usb/mon/mon_bin.o -sys-header-deps -isystem /home/dwmw2/git/llvm-build/lib/clang/7.0.0/include -include ./include/linux/kconfig.h -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_SSSE3=1 -D CONFIG_AS_CRC32=1 -D CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CONFIG_AS_AVX512=1 -D CONFIG_AS_SHA1_NI=1 -D CONFIG_AS_SHA256_NI=1 -D RETPOLINE -D CC_USING_FENTRY -D KBUILD_BASENAME="mon_bin" -D KBUILD_MODNAME="usbmon" -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/dwmw2/git/linux-2.6 -ferror-limit 19 -fmessage-length 80 -pg -mfentry -fwrapv -stack-protector 2 -mstack-alignment=8 -fwchar-type=short -fno-signed-wchar -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/mon_bin-8f9212.s -x c drivers/usb/mon/mon_bin.c聽 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'drivers/usb/mon/mon_bin.c'. 4. Running pass 'Loop Pass Manager' on function '@mon_bin_event' 5. Running pass 'Induction Variable Simplification' on basic block '%while.body.i' clang-7.0: [0;1;31merror: unable to execute command: Aborted (core dumped) clang-7.0: [0;1;31merror: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.0聽聽(llvm/trunk 324455) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/dwmw2/git/llvm-build/bin clang-7.0: [0;1;30mnote: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/mon_bin-d51116.c clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/mon_bin-d51116.sh clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** make[3]: *** [scripts/Makefile.build:317: drivers/usb/mon/mon_bin.o] Error 254 make[3]: Target '__build' not remade because of errors. make[2]: *** [scripts/Makefile.build:575: drivers/usb/mon] Error 2 make[2]: Target '__build' not remade because of errors. make[1]: *** [scripts/Makefile.build:575: drivers/usb] Error 2 make[1]: Target '__build' not remade because of errors. make: *** [Makefile:1018: drivers] Error 2 聽 CC聽聽聽聽聽聽net/unix/af_unix.o clang-7.0: /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9092: bool llvm::ScalarEvolution::isLoopEntryGuardedByCond(const llvm::Loop*, llvm::CmpInst::Predicate, const llvm::SCEV*, const llvm::SCEV*): Assertion `(!ProvedNonStrictComparison || !ProvedNonEquality) && "Why we were unable to prove (Pred, LHS, RHS) via constant ranges?"' failed. #0 0x0000000003cdcc0e llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:398:0 #1 0x0000000003cdcca1 PrintStackTraceSignalHandler(void*) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:462:0 #2 0x0000000003cdb146 llvm::sys::RunSignalHandlers() /home/dwmw2/git/llvm/lib/Support/Signals.cpp:49:0 #3 0x0000000003cdc583 SignalHandler(int) /home/dwmw2/git/llvm/lib/Support/Unix/Signals.inc:252:0 #4 0x00007fc4845a7a80 __restore_rt (/lib64/libpthread.so.0+0x12a80) #5 0x00007fc4830a866b __GI_raise (/lib64/libc.so.6+0x3766b) #6 0x00007fc4830aa381 __GI_abort (/lib64/libc.so.6+0x39381) #7 0x00007fc4830a08fa __assert_fail_base (/lib64/libc.so.6+0x2f8fa) #8 0x00007fc4830a0972 (/lib64/libc.so.6+0x2f972) #9 0x0000000002f60e6b llvm::ScalarEvolution::isLoopEntryGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:9110:0 #10 0x0000000002f5f6d1 llvm::ScalarEvolution::isKnownPredicate(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) /home/dwmw2/git/llvm/lib/Analysis/ScalarEvolution.cpp:8672:0 #11 0x0000000003a40edf (anonymous namespace)::WidenIV::pushNarrowIVUsers(llvm::Instruction*, llvm::Instruction*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1510:0 #12 0x0000000003a415f4 (anonymous namespace)::WidenIV::createWideIV(llvm::SCEVExpander&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1621:0 #13 0x0000000003a42464 (anonymous namespace)::IndVarSimplify::simplifyAndExtend(llvm::Loop*, llvm::SCEVExpander&, llvm::LoopInfo*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1821:0 #14 0x0000000003a447db (anonymous namespace)::IndVarSimplify::run(llvm::Loop*) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2461:0 #15 0x0000000003a44f64 (anonymous namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&) /home/dwmw2/git/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2576:0 #16 0x0000000002ed44ff llvm::LPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/Analysis/LoopPass.cpp:204:0 #17 0x00000000035a1af1 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1520:0 #18 0x0000000002e0311c (anonymous namespace)::CGPassManager::RunPassOnSCC(llvm::Pass*, llvm::CallGraphSCC&, llvm::CallGraph&, bool&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:156:0 #19 0x0000000002e040a4 (anonymous namespace)::CGPassManager::RunAllPassesOnSCC(llvm::CallGraphSCC&, llvm::CallGraph&, bool&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:423:0 #20 0x0000000002e043a5 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/Analysis/CallGraphSCCPass.cpp:479:0 #21 0x00000000035a1fc3 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1597:0 #22 0x00000000035a2693 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1700:0 #23 0x00000000035a288b llvm::legacy::PassManager::run(llvm::Module&) /home/dwmw2/git/llvm/lib/IR/LegacyPassManager.cpp:1732:0 #24 0x0000000003f8b5d1 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:801:0 #25 0x0000000003f8df15 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1180:0 #26 0x0000000004aec157 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0 #27 0x00000000057fec75 clang::ParseAST(clang::Sema&, bool, bool) /home/dwmw2/git/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0 #28 0x00000000045f2b13 clang::ASTFrontendAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:1005:0 #29 0x0000000004aea206 clang::CodeGenAction::ExecuteAction() /home/dwmw2/git/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:0 #30 0x00000000045f256d clang::FrontendAction::Execute() /home/dwmw2/git/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:908:0 #31 0x000000000459028f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/dwmw2/git/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:992:0 #32 0x0000000004734158 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/dwmw2/git/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:252:0 #33 0x0000000001c119a2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/dwmw2/git/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0 #34 0x0000000001c06f5d ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:309:0 #35 0x0000000001c07b94 main /home/dwmw2/git/llvm/tools/clang/tools/driver/driver.cpp:389:0 #36 0x00007fc48309200a __libc_start_main (/lib64/libc.so.6+0x2100a) #37 0x0000000001c0480a _start (/home/dwmw2/git/llvm-build/bin/clang-7.0+0x1c0480a) Stack dump: 0. Program arguments: /home/dwmw2/git/llvm-build/bin/clang-7.0 -cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name af_unix.c -mrelocation-model static -mthread-model posix -mllvm -warn-stack-size=2048 -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -no-integrated-as -mconstructor-aliases -fuse-init-array -mcode-model kernel -target-cpu x86-64 -target-feature -sse -target-feature -mmx -target-feature -sse2 -target-feature -3dnow -target-feature -avx -target-feature -x87 -target-feature +retpoline-external-thunk -disable-red-zone -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/dwmw2/git/linux-2.6/net/unix/af_unix.gcno -nostdsysteminc -nobuiltininc -resource-dir /home/dwmw2/git/llvm-build/lib/clang/7.0.0 -dependency-file net/unix/.af_unix.o.d -MT net/unix/af_unix.o -sys-header-deps -isystem /home/dwmw2/git/llvm-build/lib/clang/7.0.0/include -include ./include/linux/kconfig.h -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -D __KERNEL__ -D CONFIG_AS_CFI=1 -D CONFIG_AS_CFI_SIGNAL_FRAME=1 -D CONFIG_AS_CFI_SECTIONS=1 -D CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_SSSE3=1 -D CONFIG_AS_CRC32=1 -D CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CONFIG_AS_AVX512=1 -D CONFIG_AS_SHA1_NI=1 -D CONFIG_AS_SHA256_NI=1 -D RETPOLINE -D CC_USING_FENTRY -D KBUILD_BASENAME="af_unix" -D KBUILD_MODNAME="unix" -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare -Wno-unused-variable -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -std=gnu89 -fno-dwarf-directory-asm -fdebug-compilation-dir /home/dwmw2/git/linux-2.6 -ferror-limit 19 -fmessage-length 80 -pg -mfentry -fwrapv -stack-protector 2 -mstack-alignment=8 -fwchar-type=short -fno-signed-wchar -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/af_unix-5c03bf.s -x c net/unix/af_unix.c聽 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module 'net/unix/af_unix.c'. 4. Running pass 'Loop Pass Manager' on function '@unix_seq_show' 5. Running pass 'Induction Variable Simplification' on basic block '%for.body' clang-7.0: [0;1;31merror: unable to execute command: Aborted (core dumped) clang-7.0: [0;1;31merror: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.0聽聽(llvm/trunk 324455) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/dwmw2/git/llvm-build/bin clang-7.0: [0;1;30mnote: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/af_unix-307390.c clang-7.0: [0;1;30mnote: diagnostic msg: /tmp/af_unix-307390.sh clang-7.0: [0;1;30mnote: diagnostic msg:聽 ******************** make[2]: *** [scripts/Makefile.build:317: net/unix/af_unix.o] Error 254 make[2]: Target '__build' not remade because of errors. make[1]: *** [scripts/Makefile.build:575: net/unix] Error 2 make[1]: Target '__build' not remade because of errors. make: *** [Makefile:1018: net] Error 2 make: Target 'vmlinux' not remade because of errors. ]0;dwoodhou at i7:~/git/linux-2.6[dwoodhou at i7 linux-2.6]$ exit Script done on 2018-02-07 10:40:16+0000 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5213 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180207/fc4d529e/attachment-0001.bin>
On Wed, Feb 07, 2018 at 10:49:25AM +0000, David Woodhouse wrote:> On Wed, 2018-02-07 at 06:20 +0000, Chandler Carruth wrote: > > I've landed the patch in r324449. > > > > Before we merge this into two different Clang release branches and > > almost immediately release one of them, I would really like someone > > to confirm that this patch works well with the Linux kernel. David, > > if you're up for that, it would be great. Alternatively, Guenter or > > someone else here can help. > > Hm, please could we also have the %V asm constraint modifier? That > allows us to emit calls to the thunks from inline asm using the > register that the compiler chose for us: > > asm volatile ("call __x86_indirect_thunk_%V[thunk_target]" : : > [thunk_target] "r" (the_function)); > > Other than that, I get the following errors with LLVM+Clang master, and > my tree at > http://git.infradead.org/users/dwmw2/linux-retpoline.git/shortlog/refs/heads/ibpb >I tried ToT clang with Linux upstream as well as chromeos-4.14, with 'defconfig'. I don't see any errors when building x86_64. Lots and lots of warnings, though. When trying to build for ARCH=i386, I get arch/x86/events/intel/../perf_event.h:767:21: error: invalid output size for constraint '=q' and a clang crash when compiling drivers/gpu/drm/i915/i915_perf.c. #0 0x0000000001ee982a llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/local/google/home/groeck/src/clang/build/bin/clang-7.0+0x1ee982a) #1 0x0000000001ee7a7e llvm::sys::RunSignalHandlers() (/usr/local/google/home/groeck/src/clang/build/bin/clang-7.0+0x1ee7a7e) #2 0x0000000001ee7bba SignalHandler(int) (/usr/local/google/home/groeck/src/clang/build/bin/clang-7.0+0x1ee7bba) #3 0x00002b7bcb485330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330) #4 0x0000000002727b04 llvm::DAGTypeLegalizer::PromoteIntOp_ATOMIC_STORE(llvm::AtomicSDNode*) (/usr/local/google/home/groeck/src/clang/build/bin/clang-7.0+0x2727b04) Linux: v4.15-11704-ga2e5790d8416 clang/llvm: clang version 7.0.0 (https://git.llvm.org/git/clang.git/ 848874aed95a913fb45f363120500cebfe54e2ef) (https://git.llvm.org/git/llvm.git/3afd566557f3616881505db0d69f5d19bf55ae14) I can disable the i915 driver, but the "invalid output size for constraint '=q'" happens all over the place. Ultimately this means that I can not really test a 32-bit build, though it would not build anyway because it requires the following symbols U __x86_indirect_thunk_esp U __x86_indirect_thunk which are both not available in the upstream kernel. For x86_64, code generation appears to be as expected. Next, I'll try to apply the patch on top of the Google toolchain (based on llvm 6.0) and run it on a real system. Guenter
On Wed, Feb 07, 2018 at 06:20:40AM +0000, Chandler Carruth wrote:> I've landed the patch in r324449. > > Before we merge this into two different Clang release branches and almost > immediately release one of them, I would really like someone to confirm > that this patch works well with the Linux kernel. David, if you're up for > that, it would be great. Alternatively, Guenter or someone else here can > help. >It works pretty well for me, except for an endless sequence of ./include/linux/init.h:134:6: warning: unknown attribute 'indirect_branch' ignored [-Wunknown-attributes] This is due to #define __noretpoline __attribute__((indirect_branch("keep"))) which was introduced with upstream commit 66f793099a636 ("x86/retpoline: Avoid retpolines for built-in __init functions") a couple of days ago. Guenter> On Tue, Feb 6, 2018 at 5:59 PM Chandler Carruth <chandlerc at google.com> > wrote: > > > The patch is up for review here: https://reviews.llvm.org/D42998 > > > > On Tue, Feb 6, 2018 at 4:58 PM Chandler Carruth <chandlerc at google.com> > > wrote: > > > >> Also, could you patch and test Clang with the Linux kernel after I make > >> this change? I'd like to know that we actually successfully call the > >> correct thunks and that they behave correctly. I'm not super worried, but > >> good to actually get this right. I'm am slightly more worried about the > >> stack-based retpoline than the register ones just due to the overall lower > >> amount of testing we've had there. > >> > >> On Tue, Feb 6, 2018 at 4:56 PM Chandler Carruth <chandlerc at google.com> > >> wrote: > >> > >>> On Tue, Feb 6, 2018 at 4:46 PM David Woodhouse <dwmw2 at infradead.org> > >>> wrote: > >>> > >>>> On Wed, 2018-02-07 at 00:36 +0000, Chandler Carruth wrote: > >>>> > >>>> > > > >>>> > > That would be __x86_indirect_thunk but the kernel doesn't use it. > >>>> > > We use -mindirect-branch-register and only ever expect the compiler > >>>> > > to use the register versions which are CET-compatible. > >>>> > > > >>>> > > However, in at least one case in the 32-bit kernel we do emit the > >>>> > > old ret-equivalent retpoline inline, because there literally wasn't > >>>> > > a single register we could use (yay x86). > >>>> > > > >>>> > > I would definitely consider ditching our use of -mindirect-thunk- > >>>> > > register with GCC for 32-bit and exporting the > >>>> > > __x86_indirect_thunk, to be consistent if that's what clang wants > >>>> > > to do. > >>>> > > > >>>> > :: sigh :: is there no way to change the name? > >>>> > > >>>> > We use a "push" suffix to reduce ambiguity about what convention is > >>>> > expected here.... But I guess we can just use the base name if that's > >>>> > already shipped. > >>>> > >>>> It has indeed already shipped in GCC 7.3; sorry. It had no > >>>> disambiguation in its name because it was the original retpoline, > >>>> before we realised that CET would break things. > >>>> > >>>> The other thing to keep an eye on is the *return* thunk, which might > >>>> end up being needed on Skylake-era CPUs. See the thread at > >>>> https://lkml.org/lkml/2018/2/4/147 > >>> > >>> > >>> I'm strongly of the opinion that I think Arjan expressed: > >>> > >>> - retpoline alone is probably fine with sufficient RSB stuffing patches > >>> in the kernel > >>> - if some folks are worried about the security risk here and running on > >>> SKX, they should use IBRS. > >>> > >>> Given the speed of IBRS on SKX and the complexity & runtime hit of > >>> thunking ret, I really don't see a good motivation for us teaching the > >>> compiler how to do this. > >>> > >>
On 7 February 2018 at 01:20, Chandler Carruth via llvm-dev <llvm-dev at lists.llvm.org> wrote:> I've landed the patch in r324449.To confirm, this change *did not* make it into 6.0.0, correct? I'm looking at adding the external thunk for FreeBSD now, and we have 6.0.0 in HEAD. Assuming that future Clang releases (major, and updates) will all use __x86_indirect_thunk_r11 we presumably want to patch r324449 into the 6.0.0 in our tree.
On 13 March 2018 at 16:51, Ed Maste <emaste at freebsd.org> wrote:> On 7 February 2018 at 01:20, Chandler Carruth via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> I've landed the patch in r324449. > > To confirm, this change *did not* make it into 6.0.0, correct? I'm > looking at adding the external thunk for FreeBSD now, and we have > 6.0.0 in HEAD. Assuming that future Clang releases (major, and > updates) will all use __x86_indirect_thunk_r11 we presumably want to > patch r324449 into the 6.0.0 in our tree.Dimitry points out it did get merged (r325082), so I must have been testing a version of 6.0.0 before the final release. Testing again now, with: FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0) confirms it emits calls to __x86_indirect_thunk_r11; sorry for the false alarm.