[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator
Hi Stefano, On 05.12.17 00:06, Stefano Stabellini wrote: No, you are right. It is I who missed to complete this piece of code. There should be a list of all known OPTEE_SMC_* commands, plus "return false" in "default" case.On Mon, 4 Dec 2017, Volodymyr Babchuk wrote:= Xen command forwarding = In the code below, it looks like Xen is forwarding everything to OP-TEE. Are there some commands Xen should avoid forwarding? Should we have a whitelist or a blacklist?My code implements whitelists (at least, I hope so :-) ). It forwards only known requests. If it does not know type of the request, it returns error back to a caller.Actually, see below:+static bool optee_handle_smc(struct cpu_user_regs *regs) +{ + + switch ( get_user_reg(regs, 0) ) + { + case OPTEE_SMC_GET_SHM_CONFIG: + return handle_get_shm_config(regs); + case OPTEE_SMC_EXCHANGE_CAPABILITIES: + return handle_exchange_capabilities(regs); + case OPTEE_SMC_CALL_WITH_ARG: + return handle_std_call(regs); + case OPTEE_SMC_CALL_RETURN_FROM_RPC: + return handle_rpc(regs); + default: + return forward_call(regs); + } + return false; +}In the unknown ("default") case the smc is still forwarded. Am I missing anything? WBR, -- Volodymyr Babchuk _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |