[PATCH 1/2] powerpc/powernv: Fix fortify source warnings in opal-prd.c

Michael Ellerman patch-notifications at ellerman.id.au
Thu Aug 31 14:02:30 AEST 2023


On Tue, 22 Aug 2023 00:28:19 +1000, Michael Ellerman wrote:
> As reported by Mahesh & Aneesh, opal_prd_msg_notifier() triggers a
> FORTIFY_SOURCE warning:
> 
>   memcpy: detected field-spanning write (size 32) of single field "&item->msg" at arch/powerpc/platforms/powernv/opal-prd.c:355 (size 4)
>   WARNING: CPU: 9 PID: 660 at arch/powerpc/platforms/powernv/opal-prd.c:355 opal_prd_msg_notifier+0x174/0x188 [opal_prd]
>   NIP opal_prd_msg_notifier+0x174/0x188 [opal_prd]
>   LR  opal_prd_msg_notifier+0x170/0x188 [opal_prd]
>   Call Trace:
>     opal_prd_msg_notifier+0x170/0x188 [opal_prd] (unreliable)
>     notifier_call_chain+0xc0/0x1b0
>     atomic_notifier_call_chain+0x2c/0x40
>     opal_message_notify+0xf4/0x2c0
> 
> [...]

Applied to powerpc/next.

[1/2] powerpc/powernv: Fix fortify source warnings in opal-prd.c
      https://git.kernel.org/powerpc/c/feea65a338e52297b68ceb688eaf0ffc50310a83
[2/2] powerpc/powernv: Use struct opal_prd_msg in more places
      https://git.kernel.org/powerpc/c/22b165617b779418166319a19fd926a9c6feb9a3

cheers


More information about the Linuxppc-dev mailing list