Bug 208187
Summary: | objtool doesn't support some VEX instructions | ||
---|---|---|---|
Product: | Tools | Reporter: | Maxim Britov (maxbritov) |
Component: | Other | Assignee: | Tools.Other (tools_other) |
Status: | NEW --- | ||
Severity: | normal | CC: | drfiemost, dwjwilson, gazports, mliska, sam |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.7 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | 5.15.7 build log |
Description
Maxim Britov
2020-06-15 14:39:13 UTC
Reduced test-case: $ cat lbr.i int a, c, d; long b; void fn1() { for (; c; c++) { int e, f = 0; if (a) { e = !(d & 1ULL << 63); f = e; } d = fn1; b = f; } } $ gcc lbr.i -c -O2 -march=bdver2 -c && ~/Programming/linux/tools/objtool/objtool check --uaccess lbr.o lbr.i: In function ‘fn1’: lbr.i:12:7: warning: assignment to ‘int’ from ‘void (*)()’ makes integer from pointer without a cast [-Wint-conversion] 12 | d = fn1; | ^ lbr.o: warning: objtool: fn1()+0x26: can't find jump dest instruction at .text+0x36 disassembly: 26: 74 0e je 36 <fn1+0x36> 28: 48 0f ba fa 1f btc $0x1f,%rdx 2d: 8f ea f8 10 ca 1f 01 bextr $0x11f,%rdx,%rcx 34: 00 00 36: ff c0 inc %eax Created attachment 299985 [details]
5.15.7 build log
This issue has come back with a vengeance on 5.15. Compiling the kernel with -march/-mtune=native or bdver2 on my FX-6300 causes objtool to print out several warnings of that kind. The build doesn't fail, but the resulting kernel is unbootable and panics with a "Fatal Exception" after decompressing (if you guys need a full stack trace, how do I get a log from before the kernel takes over?). Using -march/-mtune=bdver1 works fine, though. 5.14 used to work, so I guess we have a regression?
Full build log attached. CFLAGS were appended with KCFLAGS, no external patches applied.
|