Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-19 Thread Stefano Stabellini
On Fri, 19 Jun 2020, Julien Grall wrote: > On 19/06/2020 18:15, Stefano Stabellini wrote: > > On Fri, 19 Jun 2020, Julien Grall wrote: > > > Hi Volodymyr, > > > > > > On 19/06/2020 10:52, Volodymyr Babchuk wrote: > > > > > > > > OP-TEE represents this null memory reference as a TMEM parameter > >

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-19 Thread Julien Grall
On 19/06/2020 18:15, Stefano Stabellini wrote: On Fri, 19 Jun 2020, Julien Grall wrote: Hi Volodymyr, On 19/06/2020 10:52, Volodymyr Babchuk wrote: OP-TEE represents this null memory reference as a TMEM parameter with buf_ptr == NULL. This is the only case when we should allow TMEM buffer

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-19 Thread Stefano Stabellini
On Fri, 19 Jun 2020, Julien Grall wrote: > Hi Volodymyr, > > On 19/06/2020 10:52, Volodymyr Babchuk wrote: > > > > > > OP-TEE represents this null memory reference as a TMEM parameter > > > > > > with > > > > > > buf_ptr == NULL. This is the only case when we should allow TMEM > > > > > > buffer

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-19 Thread Julien Grall
Hi Volodymyr, On 19/06/2020 10:52, Volodymyr Babchuk wrote: OP-TEE represents this null memory reference as a TMEM parameter with buf_ptr == NULL. This is the only case when we should allow TMEM buffer without the OPTEE_MSG_ATTR_NONCONTIG flag. IIUC, 0 with OPTEE_MSG_ATTR_NONCONTIG set would

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-19 Thread Volodymyr Babchuk
Julien Grall writes: > On 19/06/2020 00:29, Volodymyr Babchuk wrote: >> >> Hi Julien, > > Hi Volodymyr, > >> >> Julien Grall writes: >> >>> (+Paul) >>> >>> Hi, >>> >>> On 18/05/2020 02:53, Volodymyr Babchuk wrote: Trusted Applications use popular approach to determine required size of

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-19 Thread Julien Grall
On 19/06/2020 00:29, Volodymyr Babchuk wrote: Hi Julien, Hi Volodymyr, Julien Grall writes: (+Paul) Hi, On 18/05/2020 02:53, Volodymyr Babchuk wrote: Trusted Applications use popular approach to determine required size of buffer: client provides a memory reference with the NULL

RE: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-19 Thread Paul Durrant
ect: Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL > address > > Hi Paul, Julien, Volodymyr, > > This is another bug fix that I would like to get in 4.14. It doesn't > look like we need any changes to this patch, assuming that it is > accurate to the spec. > &g

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-18 Thread Volodymyr Babchuk
Hi Stefano, Stefano Stabellini writes: > Hi Paul, Julien, Volodymyr, > > This is another bug fix that I would like to get in 4.14. It doesn't > look like we need any changes to this patch, assuming that it is > accurate to the spec. > > It would be nice if Volodymyr could provide more info on

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-18 Thread Volodymyr Babchuk
Hi Julien, Julien Grall writes: > (+Paul) > > Hi, > > On 18/05/2020 02:53, Volodymyr Babchuk wrote: >> Trusted Applications use popular approach to determine required size >> of buffer: client provides a memory reference with the NULL pointer to >> a buffer. This is so called "Null memory

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-18 Thread Stefano Stabellini
Hi Paul, Julien, Volodymyr, This is another bug fix that I would like to get in 4.14. It doesn't look like we need any changes to this patch, assuming that it is accurate to the spec. It would be nice if Volodymyr could provide more info on the spec side, but honestly I trust his experience on

Re: [PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-06-06 Thread Julien Grall
(+Paul) Hi, On 18/05/2020 02:53, Volodymyr Babchuk wrote: Trusted Applications use popular approach to determine required size of buffer: client provides a memory reference with the NULL pointer to a buffer. This is so called "Null memory reference". TA updates the NIT: You use double space

[PATCH] xen/arm: optee: allow plain TMEM buffers with NULL address

2020-05-17 Thread Volodymyr Babchuk
Trusted Applications use popular approach to determine required size of buffer: client provides a memory reference with the NULL pointer to a buffer. This is so called "Null memory reference". TA updates the reference with the required size and returns it back to client. Then client allocates