aboutsummaryrefslogtreecommitdiff
path: root/core/arch/arm/kernel/pseudo_ta.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/arch/arm/kernel/pseudo_ta.c')
-rw-r--r--core/arch/arm/kernel/pseudo_ta.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/arch/arm/kernel/pseudo_ta.c b/core/arch/arm/kernel/pseudo_ta.c
index a6aa06c6..703d1dea 100644
--- a/core/arch/arm/kernel/pseudo_ta.c
+++ b/core/arch/arm/kernel/pseudo_ta.c
@@ -233,17 +233,20 @@ bool is_pseudo_ta_ctx(struct tee_ta_ctx *ctx)
/* Insures declared pseudo TAs conforms with core expectations */
static TEE_Result verify_pseudo_tas_conformance(void)
{
- const struct pseudo_ta_head *start = &__start_ta_head_section;
- const struct pseudo_ta_head *end = &__stop_ta_head_section;
+ const struct pseudo_ta_head *start =
+ SCATTERED_ARRAY_BEGIN(pseudo_tas, struct pseudo_ta_head);
+ const struct pseudo_ta_head *end =
+ SCATTERED_ARRAY_END(pseudo_tas, struct pseudo_ta_head);
const struct pseudo_ta_head *pta;
for (pta = start; pta < end; pta++) {
const struct pseudo_ta_head *pta2;
/* PTAs must all have a specific UUID */
- for (pta2 = pta + 1; pta2 < end; pta2++)
+ for (pta2 = pta + 1; pta2 < end; pta2++) {
if (!memcmp(&pta->uuid, &pta2->uuid, sizeof(TEE_UUID)))
goto err;
+ }
if (!pta->name ||
(pta->flags & PTA_MANDATORY_FLAGS) != PTA_MANDATORY_FLAGS ||
@@ -272,9 +275,10 @@ TEE_Result tee_ta_init_pseudo_ta_session(const TEE_UUID *uuid,
DMSG("Lookup pseudo TA %pUl", (void *)uuid);
- ta = &__start_ta_head_section;
+ ta = SCATTERED_ARRAY_BEGIN(pseudo_tas, struct pseudo_ta_head);
while (true) {
- if (ta >= &__stop_ta_head_section)
+ if (ta >= SCATTERED_ARRAY_END(pseudo_tas,
+ struct pseudo_ta_head))
return TEE_ERROR_ITEM_NOT_FOUND;
if (memcmp(&ta->uuid, uuid, sizeof(TEE_UUID)) == 0)
break;