https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102952
--- Comment #13 from peterz at infradead dot org --- (In reply to H.J. Lu from comment #12) > (In reply to peterz from comment #9) > > Created attachment 51683 [details] > > kernel patch to test -mharden-sls=all > > > > $ make O=defconfig CC=gcc-12.0.0 arch/x86/entry/common.o > > ... > > arch/x86/entry/common.o: warning: objtool: do_SYSENTER_32()+0x1b: > > unreachable instruction > > Please try the v2 patch. Per comment #6 this should be v3, no? Anyway, the good news is that I now seem to have a kernel image with lots of extra int3 instructions, but all in the right place. *However*, I seem to be missing a few: 36f4: 41 5f pop %r15 36f6: e9 00 00 00 00 jmp 36fb <__do_set_cpus_allowed+0x5b> 36f7: R_X86_64_PLT32 __x86_indirect_thunk_rax-0x4 36fb: 48 8b 87 90 02 00 00 mov 0x290(%rdi),%rax There should be one after the jmp __x86_indirect_thunk_* thingy. I'll do an objtool patch to search for missing int3, but that'll have to wait until tomorrow, it's past midnight.