Searched hist:d5d50c3c17d8ff5dab9eae767e54054abeba20d2 (Results 1 – 2 of 2) sorted by relevance
| /optee_os/lib/libutee/ |
| H A D | tee_api_property.c | d5d50c3c17d8ff5dab9eae767e54054abeba20d2 Wed Dec 27 13:21:21 UTC 2017 Jens Wiklander <jens.wiklander@linaro.org> Fix USER_TA_PROP_TYPE_BOOL handling
In 'ta_props' in ta/arch/arm/user_ta_header.c properties tagged as USER_TA_PROP_TYPE_BOOL are assigned a pointer to a bool, but is in the rest of the code handled as if it was a pointer to a uint32_t. This works as long as a bool is four bytes, with certain compilers the size of a `bool` is 1 instead leading to errors.
TA properties can be supplied via the define TA_CURRENT_TA_EXT_PROPERTIES. The pattern used in ta/arch/arm/user_ta_header.c is likely copied when assigning properties via TA_CURRENT_TA_EXT_PROPERTIES.
This patch is fixing the assumption that the size of a `bool` is the same as the size of a `uint32_t` by changing all handling of USER_TA_PROP_TYPE_BOOL to base it on the type `bool` instead of `uint32_t`.
Reviewed-by: Jianhui Li <airbak.li@hisilicon.com> Tested by: Jianhui Li <airbak.li@hisilicon.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|
| /optee_os/core/tee/ |
| H A D | tee_svc.c | d5d50c3c17d8ff5dab9eae767e54054abeba20d2 Wed Dec 27 13:21:21 UTC 2017 Jens Wiklander <jens.wiklander@linaro.org> Fix USER_TA_PROP_TYPE_BOOL handling
In 'ta_props' in ta/arch/arm/user_ta_header.c properties tagged as USER_TA_PROP_TYPE_BOOL are assigned a pointer to a bool, but is in the rest of the code handled as if it was a pointer to a uint32_t. This works as long as a bool is four bytes, with certain compilers the size of a `bool` is 1 instead leading to errors.
TA properties can be supplied via the define TA_CURRENT_TA_EXT_PROPERTIES. The pattern used in ta/arch/arm/user_ta_header.c is likely copied when assigning properties via TA_CURRENT_TA_EXT_PROPERTIES.
This patch is fixing the assumption that the size of a `bool` is the same as the size of a `uint32_t` by changing all handling of USER_TA_PROP_TYPE_BOOL to base it on the type `bool` instead of `uint32_t`.
Reviewed-by: Jianhui Li <airbak.li@hisilicon.com> Tested by: Jianhui Li <airbak.li@hisilicon.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|