[PATCH v3] ARM: imx: Fix suspend/resume crash with Clang CFI
Yo'av Moshe
linux at yoavmoshe.com
Wed Jul 22 10:46:42 PDT 2026
On 2026-07-22 5:00 PM, Sami Tolvanen wrote:
> Are relocations applied to this code before the function is copied?
> Because SYM_TYPED_FUNC_START doesn't embed the actual CFI hash in the
> binary, just a reference to a symbol that contains the hash, and it
> relies on the kernel to apply relocations before indirect calls are
> made to the function.
Hi Sami,
AFAICT, kernel relocations are already applied at boot before fncpy()
is called during init.
I think the issue might be a parameter mismatch: in C, the pointer is
declared as taking a parameter `void (*)(void __iomem *)`, but in assembly
`imx6_suspend` has no parameters, so Clang generates two different hashes
for them?
Best regards,
Yo'av
More information about the linux-arm-kernel
mailing list