Re: [PATCH v3] ARM: imx: Fix suspend/resume crash with Clang CFI
Yo'av Moshe <[email protected]> Wed, 22 Jul 2026 19:46:42 +0200
| Newsgroups | dev.linux.lists.llvm,dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
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