You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
firmware: arm_ffa: Explicitly cast return value from NOTIFICATION_INFO_GET
JIRA: https://issues.redhat.com/browse/RHEL-102691
commit 3e282f4
Author: Sudeep Holla <[email protected]>
Date: Fri, 21 Feb 2025 09:56:32 +0000
The return value ret.a2 is of type unsigned long and FFA_RET_NO_DATA is
a negative value.
Since the return value from the firmware can be just 32-bit even on
64-bit systems as FFA specification mentions it as int32 error code in
w0 register, explicitly casting to s32 ensures correct sign interpretation
when comparing against a signed error code FFA_RET_NO_DATA.
Without casting, comparison between unsigned long and a negative
constant could lead to unintended results due to type promotions.
Fixes: 3522be4 ("firmware: arm_ffa: Implement the NOTIFICATION_INFO_GET interface")
Reported-by: Andrei Homescu <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
Signed-off-by: Marcin Juszkiewicz <[email protected]>
0 commit comments