On Fri, Mar 14, 2025 at 05:23:15PM +0000, David Woodhouse wrote: > ISTR this version is OK with Clang and CONFIG_CFI_CLANG but with GCC I > get this: > > vmlinux.o: warning: objtool: relocate_kernel+0x69: unsupported stack register modification > > /* setup a new stack at the end of the physical control page */ > lea PAGE_SIZE(%rsi), %rsp > 79: 48 8d a6 00 10 00 00 lea 0x1000(%rsi),%rsp > > > Maybe the answer is to put the UNWIND_HINT_FUNC into #ifdef > CONFIG_CFI_CLANG but that seems wrong. The UNWIND_HINT_FUNC definitely looks wrong, why would Clang need it? > I'll have another look at putting it in the data section, and see if I > can remember why I didn't want to do that before (and if that's still > relevant now). IIRC, the reasons were the patched alternative, and also you wanted to disassemble (but note that's still possible with gdb). Here was a patch to make it work: https://lore.kernel.org/20241218212326.44qff3i5n6cxuu5d@jpoimboe -- Josh