Re: [PATCH] ARM: imx: Fix suspend/resume crash with Clang CFI
Nick Desaulniers <[email protected]> Mon, 20 Jul 2026 09:51:35 -0700
| 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 | <CAKwvOdn5xgtqv9NvMew0yBnH5E0xQMLaX+Z=bX3L_a9_K5orHQ@mail.gmail.com> |
On Mon, Jul 20, 2026 at 9:49 AM Nick Desaulniers <[email protected]> wrote: > > On Fri, Jul 17, 2026 at 7:17 AM Yo'av Moshe <[email protected]> wrote: > > > > Relocated suspend code in OCRAM lacks compiler-generated CFI type > > signatures. When CONFIG_CFI=y is active, the indirect call to > > imx6_suspend_in_ocram_fn triggers a strict CFI violation panic. > > > > Annotate imx6q_suspend_finish with __nocfi to bypass CFI checking > > for this specific indirect call. > > > > Cc: [email protected] > > Signed-off-by: Yo'av Moshe <[email protected]> > > Thanks for the patch. > Reviewed-by: Nick Desaulniers <[email protected]> Ah, looks like I'm reviewing v1, but there's already been a v2 and v3. Disregard. > > > --- > > Tested on a Kobo Clara HD (i.MX6SLL SoC) running postmarketOS edge. > > Before this patch, suspending the device caused an immediate silent > > hang requiring a hard-reboot. With this patch applied, suspend and > > resume work successfully. > > > > arch/arm/mach-imx/pm-imx6.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c > > index a671ca498..d9b0c1803 100644 > > --- a/arch/arm/mach-imx/pm-imx6.c > > +++ b/arch/arm/mach-imx/pm-imx6.c > > @@ -360,7 +360,7 @@ int imx6_set_lpm(enum mxc_cpu_pwr_mode mode) > > return 0; > > } > > > > -static int imx6q_suspend_finish(unsigned long val) > > +static int __nocfi imx6q_suspend_finish(unsigned long val) > > { > > if (!imx6_suspend_in_ocram_fn) { > > cpu_do_idle(); > > -- > > 2.55.0 > > > > > -- > Thanks, > ~Nick Desaulniers -- Thanks, ~Nick Desaulniers