Re: [PATCH v3 03/19] x86/startup_64: Drop long return to initial_code pointer
From: Borislav Petkov
Date: Wed Jan 31 2024 - 11:32:36 EST
On Wed, Jan 31, 2024 at 03:07:50PM +0100, Ard Biesheuvel wrote:
> > s/int3/RET seems to do the trick.
> >
> or ud2, even better,
Yap, that does it. And yes, we don't return here. I guess objtool
complains because
"7. file: warning: objtool: func()+0x5c: stack state mismatch
The instruction's frame pointer state is inconsistent, depending on
which execution path was taken to reach the instruction.
...
Another possibility is that the code has some asm or inline asm which
does some unusual things to the stack or the frame pointer. In such
cases it's probably appropriate to use the unwind hint macros in
asm/unwind_hints.h.
"
Lemme test this one a bit on my machines and queue it.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette