+tee-dev
On Mon, Jun 12, 2017 at 10:11 AM, Jens Wiklander
<jens.wiklander(a)linaro.org> wrote:
> Hi Stuart,
>
> On Sat, Jun 10, 2017 at 12:12 AM, Stuart Yoder <stuart.yoder(a)arm.com> wrote:
>>
>> +Volodymyr (correcting corrupted email address)
>>
>>
>> On 6/9/17 11:51 AM, Stuart Yoder wrote:
>>>
>>> All,
>>>
>>> I've been reviewing and trying out Volodymyr's patches related to dynamic
>>> shared memory.
>>>
>>> One thing I found thoroughly confusing was that in the same capabilities list
>>> we use the word "register" in two completely different ways.
>>>
>>> /* Secure world can communicate via previously unregistered shared memory */
>>> #define OPTEE_SMC_SEC_CAP_UNREGISTERED_SHM (1 << 1)
>>> /* Secure world supporst commands "register/unregister shared memory" */
>>> #define OPTEE_SMC_SEC_CAP_REGISTER_SHM (1 << 2)
>>>
>>> As far as I can tell "unregistered shared memory" simply means
>>> "dynamic shared memory" vs a pre-allocated static region.
>>>
>>> It would be much clearer if we tweaked the names:
>>>
>>> /* Secure world can communicate via previously unregistered shared memory */
>>> #define OPTEE_SMC_SEC_CAP_DYNAMIC_SHM (1 << 1)
>>> /* Secure world supporst commands "register/unregister shared memory" */
>>> #define OPTEE_SMC_SEC_CAP_CMD_REGISTER_SHM (1 << 2)
>>>
>>> Are you open to that change?
>
> I agree, what you're proposing is more clear. It's not an ABI change,
> only how it's documented. Since we already have
> OPTEE_SMC_SEC_CAP_UNREGISTERED_SHM defined on the (optee_os) master
> branch we do the change there via a pull request.
>
> If possible please create a pull request at github.
>
> Thanks,
> Jens
tee_drv.h references struct device, but does not include device.h nor
platform_device.h. Therefore, if tee_drv.h is included by some file
that does not pull device.h nor platform_device.h beforehand, we have a
compile warning. Fix this by adding a forward declaration.
Signed-off-by: Jerome Forissier <jerome.forissier(a)linaro.org>
---
include/linux/tee_drv.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h
index 8614713..07bd226 100644
--- a/include/linux/tee_drv.h
+++ b/include/linux/tee_drv.h
@@ -29,6 +29,7 @@
#define TEE_SHM_DMA_BUF BIT(1) /* Memory with dma-buf handle */
#define TEE_SHM_EXT_DMA_BUF BIT(2) /* Memory with dma-buf handle */
+struct device;
struct tee_device;
struct tee_shm;
struct tee_shm_pool;
--
2.7.4
All,
I've been reviewing and trying out Volodymyr's patches related to dynamic
shared memory.
One thing I found thoroughly confusing was that in the same capabilities list
we use the word "register" in two completely different ways.
/* Secure world can communicate via previously unregistered shared memory */
#define OPTEE_SMC_SEC_CAP_UNREGISTERED_SHM (1 << 1)
/* Secure world supporst commands "register/unregister shared memory" */
#define OPTEE_SMC_SEC_CAP_REGISTER_SHM (1 << 2)
As far as I can tell "unregistered shared memory" simply means
"dynamic shared memory" vs a pre-allocated static region.
It would be much clearer if we tweaked the names:
/* Secure world can communicate via previously unregistered shared memory */
#define OPTEE_SMC_SEC_CAP_DYNAMIC_SHM (1 << 1)
/* Secure world supporst commands "register/unregister shared memory" */
#define OPTEE_SMC_SEC_CAP_CMD_REGISTER_SHM (1 << 2)
Are you open to that change?
Thanks,
Stuart