Skip to content
Commit 3b0041f6 authored by Cristian Marussi's avatar Cristian Marussi Committed by Sudeep Holla
Browse files

firmware: arm_scmi: Validate BASE_DISCOVER_LIST_PROTOCOLS response

Do not blindly trust SCMI platform response about list of implemented
protocols, instead validate the reported length of the list of protocols
against the real payload size of the message reply.

Link: https://lore.kernel.org/r/20220330150551.2573938-5-cristian.marussi@arm.com


Fixes: b6f20ff8 ("firmware: arm_scmi: add common infrastructure and support for base protocol")
Signed-off-by: default avatarCristian Marussi <cristian.marussi@arm.com>
[sudeep.holla: Added early break if loop_num_ret = 0 and simplified calc_list_sz
	calculation]
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 8009120e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment