Fix get operation for chained secure storage providers
The smm-gateway's use of a backend storage provider showed
up an issue with the 'get' operation where the data_size
parameter set by a client is based on the maximum payload
size for the RPC interface between the client and in this
case, the smm-gateway. The request then gets delegated
to a storage SP. Because the RPC buffer sizes between
the client->smm-gateway and smm-gateway->storage SP are
not necessarily the same, the secure storage provider
was rejecting a get request when the data size was bigger
than its immediate RPC response buffer. The PC deployment of
ts-service-test is modified to recreate the problem.
The implemented fix in secure_storage_provider clips
the incoming data_size value if it exceeds the size of
the local response buffer.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I649d585df4ff3d8f6559b476bbcf6acbf256645b
8 files changed