Skip to contentSkip to conversation

ARM: OMAP2+: Add CFI type for omap4_finish_suspend

PATCH Applied Mithil Bavishi 2 participants 2 messages Jun 4 – Jun 9

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: OMAP2+: Add CFI type for omap4_finish_suspend

With CONFIG_CFI enabled, OMAP4 can trap in omap4_enter_lowpower() because omap_pm_ops.finish_suspend points directly to the assembly routine omap4_finish_suspend, which lacks the expected KCFI type metadata.

Annotate omap4_finish_suspend with SYM_TYPED_FUNC_START so the assembly routine carries the KCFI type metadata.

---
 arch/arm/mach-omap2/sleep44xx.S | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/sleep44xx.S +3 -2
index f09c91978..8b515f300 100644
@@ -6,6 +6,7 @@
  * 	Santosh Shilimkar <[email protected]>
  */
 
+#include <linux/cfi_types.h>
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/smp_scu.h>
@@ -58,7 +59,7 @@
  * stack frame and it expects the caller to take care of it. Hence the entire
  * stack frame is saved to avoid possible stack corruption.
  */
-ENTRY(omap4_finish_suspend)
+SYM_TYPED_FUNC_START(omap4_finish_suspend)
 	stmfd	sp!, {r4-r12, lr}
 	cmp	r0, #0x0
 	beq	do_WFI				@ No lowpower state, jump to WFI
@@ -223,7 +224,7 @@ skip_scu_gp_clear:
 	isb
 	dsb
 	ldmfd	sp!, {r4-r12, pc}
-ENDPROC(omap4_finish_suspend)
+SYM_FUNC_END(omap4_finish_suspend)
 
 /*
  * ============================
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 9 lines · Mithil Bavishi

With CONFIG_CFI enabled, OMAP4 can trap in omap4_enter_lowpower() because omap_pm_ops.finish_suspend points directly to the assembly routine omap4_finish_suspend, which lacks the expected KCFI type metadata.

Annotate omap4_finish_suspend with SYM_TYPED_FUNC_START so the assembly routine carries the KCFI type metadata.

[...]

Applied, thanks!

[1/1] ARM: OMAP2+: Add CFI type for omap4_finish_suspend

      commit: d58849ac304472fdc75f44c468743d75ca75c2ce

Best regards,

Signature · 1 line
Kevin Hilman (TI) <[email protected]>