Re: [PATCH v5 07/20] x86/kexec: Invoke copy of relocate_kernel() instead of the original

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2024-12-18 at 13:23 -0800, Josh Poimboeuf wrote:
> 
> The linker script does place it in .data, but objtool runs on the object
> file before linking, where it's still in an executable section
> (.text..relocate_kernel).
> 
> How about something like below?
> 
>   - move text to .data..relocate_kernel
>   - remove objtool annotations
>   - replace the alternative with a runtime check

That leaves me unable to use 'objdump -S
arch/x86/kernel/relocate_kernel_64.o' so I hate it :)

At the moment objtool is *mostly* happy with the code in here; is there
no way to make it happy even with the CFI annotation?

In practice I probably don't even need to use SYM_TYPED_FUNC_START()
anyway, as it's doing the wrong thing. It's pointless if it just uses
the external __cfi_typeid_relocate_kernel symbol that the C code emits,
because that's obviously going to match the prototype that the C code
expects.

So I might emit the __cfi_relocate_kernel prologue entirely manually,
and then maybe objtool will thinking it's entitled to opinions :)


<<attachment: smime.p7s>>


[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux