core: rpc alloc check memory is valid
core: rpc alloc check memory is valid

thread_rpc_alloc_arg() and thread_rpc_alloc_payload() only succeeds if
the allocated shared memory is valid shared memory.

Reviewed-by: etienne carriere <f21bc5b8f3ea1962eb45af359f1abea6578cab94@linaro.org>
Tested-by: Jens Wiklander <7706914404370d7502c27a0eff493dcf491feb51@linaro.org> (QEMU)
Signed-off-by: Jens Wiklander <7706914404370d7502c27a0eff493dcf491feb51@linaro.org>

pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,matt2048/optee_os,matt2048/optee_os,pascal-brand-st-dev/optee_os,matt2048/optee_os,matt2048/optee_os