* [PATCH] tee: optee: fix uuid comparisons on service discovery
@ 2023-01-19 9:21 Ilias Apalodimas
2023-01-19 15:09 ` Jens Wiklander
2023-01-20 7:51 ` Etienne Carriere
0 siblings, 2 replies; 3+ messages in thread
From: Ilias Apalodimas @ 2023-01-19 9:21 UTC (permalink / raw)
To: u-boot
Cc: Ilias Apalodimas, Jens Wiklander, Etienne Carriere,
Patrick Delaunay, Patrice Chotard
When comparing UUIDs for discovered services we only compare up to the
ptr size instead of the entire UUID
Fixes: 94ccfb78a4d61 ("drivers: tee: optee: discover OP-TEE services")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
drivers/tee/optee/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 88e23d252bcd..9a9b697e91f5 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -73,7 +73,7 @@ static struct optee_service *find_service_driver(const struct tee_optee_ta_uuid
for (idx = 0; idx < service_cnt; idx++, service++) {
tee_optee_ta_uuid_to_octets(loc_uuid, &service->uuid);
- if (!memcmp(uuid, loc_uuid, sizeof(uuid)))
+ if (!memcmp(uuid, loc_uuid, sizeof(*uuid)))
return service;
}
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tee: optee: fix uuid comparisons on service discovery
2023-01-19 9:21 [PATCH] tee: optee: fix uuid comparisons on service discovery Ilias Apalodimas
@ 2023-01-19 15:09 ` Jens Wiklander
2023-01-20 7:51 ` Etienne Carriere
1 sibling, 0 replies; 3+ messages in thread
From: Jens Wiklander @ 2023-01-19 15:09 UTC (permalink / raw)
To: Ilias Apalodimas
Cc: u-boot, Etienne Carriere, Patrick Delaunay, Patrice Chotard
On Thu, Jan 19, 2023 at 10:21 AM Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> When comparing UUIDs for discovered services we only compare up to the
> ptr size instead of the entire UUID
>
> Fixes: 94ccfb78a4d61 ("drivers: tee: optee: discover OP-TEE services")
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> ---
> drivers/tee/optee/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Cheers,
Jens
>
> diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
> index 88e23d252bcd..9a9b697e91f5 100644
> --- a/drivers/tee/optee/core.c
> +++ b/drivers/tee/optee/core.c
> @@ -73,7 +73,7 @@ static struct optee_service *find_service_driver(const struct tee_optee_ta_uuid
>
> for (idx = 0; idx < service_cnt; idx++, service++) {
> tee_optee_ta_uuid_to_octets(loc_uuid, &service->uuid);
> - if (!memcmp(uuid, loc_uuid, sizeof(uuid)))
> + if (!memcmp(uuid, loc_uuid, sizeof(*uuid)))
> return service;
> }
>
> --
> 2.38.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tee: optee: fix uuid comparisons on service discovery
2023-01-19 9:21 [PATCH] tee: optee: fix uuid comparisons on service discovery Ilias Apalodimas
2023-01-19 15:09 ` Jens Wiklander
@ 2023-01-20 7:51 ` Etienne Carriere
1 sibling, 0 replies; 3+ messages in thread
From: Etienne Carriere @ 2023-01-20 7:51 UTC (permalink / raw)
To: Ilias Apalodimas
Cc: u-boot, Jens Wiklander, Patrick Delaunay, Patrice Chotard
On Thu, 19 Jan 2023 at 10:21, Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> When comparing UUIDs for discovered services we only compare up to the
> ptr size instead of the entire UUID
>
> Fixes: 94ccfb78a4d61 ("drivers: tee: optee: discover OP-TEE services")
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> ---
> drivers/tee/optee/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
> index 88e23d252bcd..9a9b697e91f5 100644
> --- a/drivers/tee/optee/core.c
> +++ b/drivers/tee/optee/core.c
> @@ -73,7 +73,7 @@ static struct optee_service *find_service_driver(const struct tee_optee_ta_uuid
>
> for (idx = 0; idx < service_cnt; idx++, service++) {
> tee_optee_ta_uuid_to_octets(loc_uuid, &service->uuid);
> - if (!memcmp(uuid, loc_uuid, sizeof(uuid)))
> + if (!memcmp(uuid, loc_uuid, sizeof(*uuid)))
> return service;
> }
>
> --
> 2.38.1
>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-20 7:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19 9:21 [PATCH] tee: optee: fix uuid comparisons on service discovery Ilias Apalodimas
2023-01-19 15:09 ` Jens Wiklander
2023-01-20 7:51 ` Etienne Carriere
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.