[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 08/10] xen/arm: optee: add support for RPC commands



Hi Julien,

Julien Grall writes:

>>       if ( shm_rpc->guest_page )
>>           put_page(shm_rpc->guest_page);
>> +
>
> Spurious change.

Good catch. Thank you.

>
>> +        /*
>> +         * TODO: With current implementation, OP-TEE will not issue
>> +         * RPC to free this buffer. Guest and OP-TEE will be out of
>> +         * sync: guest believes that it provided buffer to OP-TEE,
>> +         * while OP-TEE thinks of opposite. Ideally, we need to
>> +         * emulate RPC with OPTEE_MSG_RPC_CMD_SHM_FREE command.
>> +         */
> Can this condition happen if Xen runs out of memory?

Yes, this is one of reasons why translate_noncontig() might fail. It
uses both xenheap to allocate data structure and domheap to allocate
pagelists buffers. Any of those can fail, resulting in inconsistency.

You gave me idea to put gdprintk() with big fat warning there.

-- 
Best regards,Volodymyr Babchuk
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.