#regzbot introduced: 6.15.8..6.16
Linus Torvalds torvalds@linux-foundation.org writes:
It's Sunday afternoon, and the release cycle has come to an end. Last week was nice and calm, and there were no big show-stopper surprises to keep us from the regular schedule, so I've tagged and pushed out 6.16 as planned.
Even after a "make mrproper" and "git clean -fxd" I'm seeing lots of warnings and errors.
can't find jump dest instruction stack state mismatch return with modified stack frame objtool: can't decode instruction can't find starting instruction
gcc (Gentoo Hardened 14.3.0 p8) 14.3.0
I selected "Y" to the new config option "X86_NATIVE_CPU"
CPU is AMD FX-8350
.config attached
The build is fine on a cross-compile of a minimal kernel for an Intel Atom server.
Possibly related to https://lore.kernel.org/lkml/5263a182e608408bf42dc1ed12bc43dee9598ac9.175098...
LD [M] arch/x86/events/amd/amd-uncore.o arch/x86/events/amd/amd-uncore.o: warning: objtool: amd_uncore_df_ctx_scan+0x54: can't find jump dest instruction at .text+0x1b6 make[5]: *** [scripts/Makefile.build:502: arch/x86/events/amd/amd-uncore.o] Error 255 make[5]: *** Deleting file 'arch/x86/events/amd/amd-uncore.o' make[4]: *** [scripts/Makefile.build:555: arch/x86/events/amd] Error 2 make[3]: *** [scripts/Makefile.build:555: arch/x86/events] Error 2 make[3]: *** Waiting for unfinished jobs....
CC fs/pidfs.o crypto/cmac.o: warning: objtool: crypto_cmac_digest_setkey+0xc2: stack state mismatch: cfa1=4+32 cfa2=4+24
CC [M] sound/core/device.o crypto/md4.o: warning: objtool: md4_final+0xd1: return with modified stack frame
LD [M] block/bfq.o block/bfq.o: warning: objtool: bfq_timeout_sync_store+0x42: can't find jump dest instruction at .text+0x10f9 make[3]: *** [scripts/Makefile.build:502: block/bfq.o] Error 255 make[3]: *** Deleting file 'block/bfq.o' make[2]: *** [scripts/Makefile.build:555: block] Error 2 make[2]: *** Waiting for unfinished jobs....
CC arch/x86/kernel/acpi/madt_wakeup.o crypto/wp512.o: warning: objtool: wp512_init+0x58: return with modified stack frame crypto/wp512.o: warning: objtool: wp512_process_buffer+0x149: stack state mismatch: cfa1=4+288 cfa2=4-352
CC [M] sound/core/vmaster.o crypto/blake2b_generic.o: warning: objtool: crypto_blake2b_setkey+0x68: return with modified stack frame crypto/blake2b_generic.o: warning: objtool: crypto_blake2b_finup.constprop.0.isra.0+0x132: return with modified stack frame
CC drivers/pci/pcie/err.o crypto/ccm.o: warning: objtool: crypto_ccm_init_crypt+0x1b6: stack state mismatch: cfa1=4+56 cfa2=4+48 crypto/ccm.o: warning: objtool: crypto_ccm_auth+0x45e: return with modified stack frame
CC drivers/pci/pcie/pme.o crypto/cryptd.o: warning: objtool: cryptd_enqueue_request+0x89: can't find jump dest instruction at .text+0x94c make[3]: *** [scripts/Makefile.build:287: crypto/cryptd.o] Error 255 make[3]: *** Deleting file 'crypto/cryptd.o' make[2]: *** [scripts/Makefile.build:555: crypto] Error 2
LD [M] sound/core/snd.o sound/core/snd.o: warning: objtool: snd_ctl_open+0x10c: can't find jump dest instruction at .text+0x47c6 make[4]: *** [scripts/Makefile.build:502: sound/core/snd.o] Error 255 make[4]: *** Deleting file 'sound/core/snd.o' make[4]: *** Waiting for unfinished jobs....
LD [M] sound/core/oss/snd-mixer-oss.o sound/core/oss/snd-mixer-oss.o: warning: objtool: mixer_slot_clear+0x4c: return with modified stack frame
CC lib/crypto/mpi/mpi-mod.o sound/core/oss/snd-pcm-oss.o: warning: objtool: mulaw_decode+0xf9: can't find jump dest instruction at .text+0x722b make[5]: *** [scripts/Makefile.build:502: sound/core/oss/snd-pcm-oss.o] Error 255 make[5]: *** Deleting file 'sound/core/oss/snd-pcm-oss.o' make[4]: *** [scripts/Makefile.build:555: sound/core/oss] Error 2
CC arch/x86/kernel/smpboot.o drivers/char/ipmi/ipmi_msghandler.o: warning: objtool: ipmi_set_gets_events+0x155: can't find jump dest instruction at .text+0x21c8 make[4]: *** [scripts/Makefile.build:287: drivers/char/ipmi/ipmi_msghandler.o] Error 255 make[4]: *** Deleting file 'drivers/char/ipmi/ipmi_msghandler.o' make[3]: *** [scripts/Makefile.build:555: drivers/char/ipmi] Error 2 make[3]: *** Waiting for unfinished jobs....
CC kernel/entry/kvm.o lib/crypto/gf128mul.o: warning: objtool: gf128mul_init_64k_bbe+0x94: stack state mismatch: cfa1=5+16 cfa2=4+8
CC [M] sound/core/seq/oss/seq_oss_event.o make[2]: *** [scripts/Makefile.build:555: drivers] Error 2
LD [M] sound/core/seq/snd-seq.o sound/core/seq/snd-seq.o: warning: objtool: snd_seq_open+0xd7: can't find jump dest instruction at .text+0x2224 make[5]: *** [scripts/Makefile.build:502: sound/core/seq/snd-seq.o] Error 255 make[5]: *** Deleting file 'sound/core/seq/snd-seq.o' make[5]: *** Waiting for unfinished jobs....
LD [M] lib/crypto/libdes.o lib/crypto/libdes.o: warning: objtool: des3_ede_encrypt+0x86: can't find jump dest instruction at .text+0xcb8 make[4]: *** [scripts/Makefile.build:502: lib/crypto/libdes.o] Error 255 make[4]: *** Deleting file 'lib/crypto/libdes.o' make[3]: *** [scripts/Makefile.build:555: lib/crypto] Error 2 make[2]: *** [scripts/Makefile.build:555: lib] Error 2
LD [M] sound/core/seq/oss/snd-seq-oss.o sound/core/seq/oss/snd-seq-oss.o: warning: objtool: alloc_seq_queue+0xc7: return with modified stack frame sound/core/seq/oss/snd-seq-oss.o: warning: objtool: delete_seq_queue.isra.0+0xb5: return with modified stack frame sound/core/seq/oss/snd-seq-oss.o: warning: objtool: snd_seq_oss_synth_info_user+0xb7: return with modified stack frame sound/core/seq/oss/snd-seq-oss.o: warning: objtool: snd_seq_oss_midi_info_user+0xa5: return with modified stack frame sound/core/seq/oss/snd-seq-oss.o: warning: objtool: snd_seq_oss_process_event+0x73c: stack state mismatch: cfa1=4+72 cfa2=4+64 sound/core/seq/oss/snd-seq-oss.o: warning: objtool: snd_seq_oss_write+0x77: stack state mismatch: cfa1=4+120 cfa2=4+112 sound/core/seq/oss/snd-seq-oss.o: warning: objtool: snd_seq_oss_synth_setup+0x14c: return with modified stack frame sound/core/seq/oss/snd-seq-oss.o: warning: objtool: snd_seq_oss_synth_make_info+0x17d: stack state mismatch: cfa1=4+160 cfa2=4+152 make[4]: *** [scripts/Makefile.build:555: sound/core/seq] Error 2 make[3]: *** [scripts/Makefile.build:555: sound/core] Error 2 make[3]: *** Waiting for unfinished jobs....
LD [M] sound/pci/hda/snd-hda-codec.o sound/pci/hda/snd-hda-codec.o: error: objtool: can't decode instruction at .text:0xbf1c make[5]: *** [scripts/Makefile.build:502: sound/pci/hda/snd-hda-codec.o] Error 255 make[5]: *** Deleting file 'sound/pci/hda/snd-hda-codec.o' make[4]: *** [scripts/Makefile.build:555: sound/pci/hda] Error 2 make[3]: *** [scripts/Makefile.build:555: sound/pci] Error 2 make[2]: *** [scripts/Makefile.build:555: sound] Error 2
CC fs/ext4/mballoc.o fs/binfmt_misc.o: warning: objtool: load_misc_binary+0xf4: can't find jump dest instruction at .text+0xf07 make[3]: *** [scripts/Makefile.build:287: fs/binfmt_misc.o] Error 255 make[3]: *** Deleting file 'fs/binfmt_misc.o' make[3]: *** Waiting for unfinished jobs....
LD [M] fs/cramfs/cramfs.o fs/cramfs/cramfs.o: warning: objtool: cramfs_blkdev_fill_super+0x2b2: return with modified stack frame
AR arch/x86/kernel/built-in.a make[2]: *** [scripts/Makefile.build:555: arch/x86] Error 2
LD [M] fs/configfs/configfs.o fs/configfs/configfs.o: error: objtool: configfs_create_link(): can't find starting instruction make[4]: *** [scripts/Makefile.build:502: fs/configfs/configfs.o] Error 255 make[4]: *** Deleting file 'fs/configfs/configfs.o' make[3]: *** [scripts/Makefile.build:555: fs/configfs] Error 2
AR fs/ext4/built-in.a make[2]: *** [scripts/Makefile.build:555: fs] Error 2
AR kernel/built-in.a make[1]: *** [/work/src.git/linux/Makefile:2003: .] Error 2 make: *** [Makefile:248: __sub-make] Error 2
On Mon, Jul 28, 2025 at 09:41:35AM +0100, Alan J. Wylie wrote:
#regzbot introduced: 6.15.8..6.16
Linus Torvalds torvalds@linux-foundation.org writes:
It's Sunday afternoon, and the release cycle has come to an end. Last week was nice and calm, and there were no big show-stopper surprises to keep us from the regular schedule, so I've tagged and pushed out 6.16 as planned.
Even after a "make mrproper" and "git clean -fxd" I'm seeing lots of warnings and errors.
can't find jump dest instruction stack state mismatch return with modified stack frame objtool: can't decode instruction can't find starting instruction
gcc (Gentoo Hardened 14.3.0 p8) 14.3.0
I selected "Y" to the new config option "X86_NATIVE_CPU"
CPU is AMD FX-8350
.config attached
The problem is likely that CONFIG_X86_NATIVE_CPU is using some AMD-specific instruction(s) which objtool doesn't know how to decode.
Building with KCFLAGS="-march=bdver2", I see the following:
0000000000000150 <amd_uncore_df_ctx_scan>: 150: f3 0f 1e fa endbr64 154: e8 00 00 00 00 call 159 <amd_uncore_df_ctx_scan+0x9> 155: R_X86_64_PLT32 __fentry__-0x4 159: 48 8b 05 00 00 00 00 mov 0x0(%rip),%rax # 160 <amd_uncore_df_ctx_scan+0x10> 15c: R_X86_64_PC32 boot_cpu_data+0x2c 160: a9 00 00 00 01 test $0x1000000,%eax 165: 74 64 je 1cb <amd_uncore_df_ctx_scan+0x7b> 167: 48 c7 c0 00 00 00 00 mov $0x0,%rax 16a: R_X86_64_32S cpu_info 16e: 89 f6 mov %esi,%esi 170: 53 push %rbx 171: 83 3d 00 00 00 00 01 cmpl $0x1,0x0(%rip) # 178 <amd_uncore_df_ctx_scan+0x28> 173: R_X86_64_PC32 .bss-0x5 178: 48 8b 0c f5 00 00 00 00 mov 0x0(,%rsi,8),%rcx 17c: R_X86_64_32S __per_cpu_offset 180: 49 89 f9 mov %rdi,%r9 183: 44 8b 84 01 ec 00 00 00 mov 0xec(%rcx,%rax,1),%r8d 18b: b8 04 00 00 00 mov $0x4,%eax 190: 7e 1a jle 1ac <amd_uncore_df_ctx_scan+0x5c> 192: b8 22 00 00 80 mov $0x80000022,%eax 197: 31 c9 xor %ecx,%ecx 199: 0f a2 cpuid 19b: 48 8b 0c f5 00 00 00 00 mov 0x0(,%rsi,8),%rcx 19f: R_X86_64_32S __per_cpu_offset 1a3: 8f ea 78 10 c3 0a 06 00 00 bextr $0x60a,%ebx,%eax 1ac: 0f b6 c0 movzbl %al,%eax 1af: 45 0f b6 c0 movzbl %r8b,%r8d 1b3: 49 8b 11 mov (%r9),%rdx 1b6: 49 c1 e0 30 shl $0x30,%r8 1ba: 48 c1 e0 20 shl $0x20,%rax 1be: 4c 09 c0 or %r8,%rax 1c1: 48 89 04 0a mov %rax,(%rdx,%rcx,1) 1c5: 5b pop %rbx 1c6: e9 00 00 00 00 jmp 1cb <amd_uncore_df_ctx_scan+0x7b> 1c7: R_X86_64_PLT32 __x86_return_thunk-0x4 1cb: e9 00 00 00 00 jmp 1d0 <amd_uncore_l3_event_init> 1cc: R_X86_64_PLT32 __x86_return_thunk-0x4
I don't have time to look at this for at least the next few days, but I suspect this one:
1a3: 8f ea 78 10 c3 0a 06 00 00 bextr $0x60a,%ebx,%eax
in which case the kernel's x86 decoder (which objtool also uses) needs to be updated.
On Mon, 28 Jul 2025 at 08:42, Josh Poimboeuf jpoimboe@kernel.org wrote:
The problem is likely that CONFIG_X86_NATIVE_CPU is using some AMD-specific instruction(s) which objtool doesn't know how to decode.
It might be a good idea to add some byte printout in the objtool 'can't decode instruction' error message, to make it easier to immediately see what code sequence cannot be decoded.
I don't have time to look at this for at least the next few days, but I suspect this one:
1a3: 8f ea 78 10 c3 0a 06 00 00 bextr $0x60a,%ebx,%eax
Hmm. We do have BEXTR in our x86-opcode-map.txt file,:
Table: 3-byte opcode 1 (0x0f 0x38) Referrer: 3-byte escape 1 AVXcode: 2 # 0x0f 0x38 0x00-0x0f ... f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v)
but there's apparently two different versions of 'nextr'.
The one we know about is the "BMI encoding", but there's also a TBM encoding ("Trailing Bit Manipulation") that AMD introduced for Bulldozer, and it appears that we don't have those in our opcode maps.
And yeah, I think it's bulldozer-specific, which explains why nobody sees it (because bulldozer was one of the not-very-great AMD uarchs before they got it right with Zen).
Linus
On Mon, 28 Jul 2025 08:42:44 -0700 Josh Poimboeuf jpoimboe@kernel.org wrote:
On Mon, Jul 28, 2025 at 09:41:35AM +0100, Alan J. Wylie wrote:
#regzbot introduced: 6.15.8..6.16
I don't have time to look at this for at least the next few days, but I suspect this one:
1a3: 8f ea 78 10 c3 0a 06 00 00 bextr $0x60a,%ebx,%eax
Thanks for finding! Indeed, this is encoded by XOP which is not currently supported by x86 decodeer.
in which case the kernel's x86 decoder (which objtool also uses) needs to be updated.
OK, let me see how XOP works.
Thank you,
On Tue, 29 Jul 2025 22:40:00 +0900 Masami Hiramatsu (Google) mhiramat@kernel.org wrote:
On Mon, 28 Jul 2025 08:42:44 -0700 Josh Poimboeuf jpoimboe@kernel.org wrote:
On Mon, Jul 28, 2025 at 09:41:35AM +0100, Alan J. Wylie wrote:
#regzbot introduced: 6.15.8..6.16
I don't have time to look at this for at least the next few days, but I suspect this one:
1a3: 8f ea 78 10 c3 0a 06 00 00 bextr $0x60a,%ebx,%eax
Thanks for finding! Indeed, this is encoded by XOP which is not currently supported by x86 decodeer.
in which case the kernel's x86 decoder (which objtool also uses) needs to be updated.
OK, let me see how XOP works.
I've sent it to;
https://lore.kernel.org/all/175386161199.564247.597496379413236944.stgit@dev...
I confirmed it worked with the XOP encoded "bextr".
Thank you,
linux-stable-mirror@lists.linaro.org