From 6203b8769beff4eccf7104a6474991114691bf90 Mon Sep 17 00:00:00 2001 From: Jens Wiklander Date: Thu, 8 Dec 2016 19:18:29 +0100 Subject: [PATCH] Format UUID strings correctly Prior to this patch although GlobalPlatform specifies that TAs and such are identified with UUIDs, we don't format them quite right when turning them into strings. Per https://www.ietf.org/rfc/rfc4122.txt, there should be another hyphen after the first two bytes of clockSeqAndNode. Unfortunately, fixing this breaks compatibility between how TAs are built, and when the OS loads them. With this patch UUID string are formated with the additional hyphen as for instance: f81d4fae-7dec-11d0-a765-00a0c91e6bf6 Reviewed-by: Jerome Forissier Fixes: https://github.com/OP-TEE/optee_os/issues/857 Signed-off-by: Jens Wiklander --- host/xtest/xtest_1000.c | 2 +- ta/aes_perf/Android.mk | 2 +- ta/aes_perf/Makefile | 2 +- ta/concurrent/Android.mk | 2 +- ta/concurrent/Makefile | 2 +- ta/concurrent_large/Android.mk | 2 +- ta/concurrent_large/Makefile | 2 +- ta/create_fail_test/Android.mk | 2 +- ta/create_fail_test/Makefile | 2 +- ta/crypt/Android.mk | 2 +- ta/crypt/Makefile | 2 +- ta/os_test/Android.mk | 2 +- ta/os_test/Makefile | 2 +- ta/rpc_test/Android.mk | 2 +- ta/rpc_test/Makefile | 2 +- ta/sha_perf/Android.mk | 2 +- ta/sha_perf/Makefile | 2 +- ta/sims/Android.mk | 2 +- ta/sims/Makefile | 2 +- ta/storage/Android.mk | 2 +- ta/storage/Makefile | 2 +- ta/storage2/Android.mk | 2 +- ta/storage2/Makefile | 2 +- ta/storage_benchmark/Android.mk | 2 +- ta/storage_benchmark/Makefile | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/host/xtest/xtest_1000.c b/host/xtest/xtest_1000.c index fd947c94d..d208578f3 100644 --- a/host/xtest/xtest_1000.c +++ b/host/xtest/xtest_1000.c @@ -529,7 +529,7 @@ static void uuid_to_full_name(char *buf, size_t blen, const TEEC_UUID *uuid, bool for_write) { snprintf(buf, blen, - "%s/%08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x.ta", + "%s/%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x.ta", for_write ? TA_TEST_DIR : TA_DIR, uuid->timeLow, uuid->timeMid, uuid->timeHiAndVersion, uuid->clockSeqAndNode[0], uuid->clockSeqAndNode[1], diff --git a/ta/aes_perf/Android.mk b/ta/aes_perf/Android.mk index dac214df4..8fc8de6d3 100644 --- a/ta/aes_perf/Android.mk +++ b/ta/aes_perf/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := e626662e-c0e2-485c-b8c809fbce6edf3d.ta +local_module := e626662e-c0e2-485c-b8c8-09fbce6edf3d.ta include $(BUILD_OPTEE_MK) diff --git a/ta/aes_perf/Makefile b/ta/aes_perf/Makefile index 294d87291..20582c949 100644 --- a/ta/aes_perf/Makefile +++ b/ta/aes_perf/Makefile @@ -1,3 +1,3 @@ -BINARY = e626662e-c0e2-485c-b8c809fbce6edf3d +BINARY = e626662e-c0e2-485c-b8c8-09fbce6edf3d include ../ta_common.mk diff --git a/ta/concurrent/Android.mk b/ta/concurrent/Android.mk index bf67ff2c4..06cc783f0 100644 --- a/ta/concurrent/Android.mk +++ b/ta/concurrent/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := e13010e0-2ae1-11e5-896a0002a5d5c51b.ta +local_module := e13010e0-2ae1-11e5-896a-0002a5d5c51b.ta include $(BUILD_OPTEE_MK) diff --git a/ta/concurrent/Makefile b/ta/concurrent/Makefile index 6145b5954..42eb54e00 100644 --- a/ta/concurrent/Makefile +++ b/ta/concurrent/Makefile @@ -1,2 +1,2 @@ -BINARY = e13010e0-2ae1-11e5-896a0002a5d5c51b +BINARY = e13010e0-2ae1-11e5-896a-0002a5d5c51b include ../ta_common.mk diff --git a/ta/concurrent_large/Android.mk b/ta/concurrent_large/Android.mk index 0409b9bc9..029306a94 100644 --- a/ta/concurrent_large/Android.mk +++ b/ta/concurrent_large/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := 5ce0c432-0ab0-40e5-a056782ca0e6aba2.ta +local_module := 5ce0c432-0ab0-40e5-a056-782ca0e6aba2.ta include $(BUILD_OPTEE_MK) diff --git a/ta/concurrent_large/Makefile b/ta/concurrent_large/Makefile index d45b0fdde..c3fda13f8 100644 --- a/ta/concurrent_large/Makefile +++ b/ta/concurrent_large/Makefile @@ -1,2 +1,2 @@ -BINARY = 5ce0c432-0ab0-40e5-a056782ca0e6aba2 +BINARY = 5ce0c432-0ab0-40e5-a056-782ca0e6aba2 include ../ta_common.mk diff --git a/ta/create_fail_test/Android.mk b/ta/create_fail_test/Android.mk index 55a68abe9..c0c6bbab8 100644 --- a/ta/create_fail_test/Android.mk +++ b/ta/create_fail_test/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := c3f6e2c0-3548-11e1-b86c0800200c9a66.ta +local_module := c3f6e2c0-3548-11e1-b86c-0800200c9a66.ta include $(BUILD_OPTEE_MK) diff --git a/ta/create_fail_test/Makefile b/ta/create_fail_test/Makefile index c1b077c8f..1df9e2c14 100644 --- a/ta/create_fail_test/Makefile +++ b/ta/create_fail_test/Makefile @@ -1,2 +1,2 @@ -BINARY = c3f6e2c0-3548-11e1-b86c0800200c9a66 +BINARY = c3f6e2c0-3548-11e1-b86c-0800200c9a66 include ../ta_common.mk diff --git a/ta/crypt/Android.mk b/ta/crypt/Android.mk index 6ff48a514..bc9e4454e 100644 --- a/ta/crypt/Android.mk +++ b/ta/crypt/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := cb3e5ba0-adf1-11e0-998b0002a5d5c51b.ta +local_module := cb3e5ba0-adf1-11e0-998b-0002a5d5c51b.ta include $(BUILD_OPTEE_MK) diff --git a/ta/crypt/Makefile b/ta/crypt/Makefile index ed9caa5e5..383c6d53f 100644 --- a/ta/crypt/Makefile +++ b/ta/crypt/Makefile @@ -1,2 +1,2 @@ -BINARY = cb3e5ba0-adf1-11e0-998b0002a5d5c51b +BINARY = cb3e5ba0-adf1-11e0-998b-0002a5d5c51b include ../ta_common.mk diff --git a/ta/os_test/Android.mk b/ta/os_test/Android.mk index 639a460fc..8136a3b8b 100644 --- a/ta/os_test/Android.mk +++ b/ta/os_test/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := 5b9e0e40-2636-11e1-ad9e0002a5d5c51b.ta +local_module := 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b.ta include $(BUILD_OPTEE_MK) diff --git a/ta/os_test/Makefile b/ta/os_test/Makefile index add25bb24..bc089056f 100644 --- a/ta/os_test/Makefile +++ b/ta/os_test/Makefile @@ -1,2 +1,2 @@ -BINARY = 5b9e0e40-2636-11e1-ad9e0002a5d5c51b +BINARY = 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b include ../ta_common.mk diff --git a/ta/rpc_test/Android.mk b/ta/rpc_test/Android.mk index 46adc6972..1b570f355 100644 --- a/ta/rpc_test/Android.mk +++ b/ta/rpc_test/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := d17f73a0-36ef-11e1-984a0002a5d5c51b.ta +local_module := d17f73a0-36ef-11e1-984a-0002a5d5c51b.ta include $(BUILD_OPTEE_MK) diff --git a/ta/rpc_test/Makefile b/ta/rpc_test/Makefile index 3d461a6f4..c68b8e4e2 100644 --- a/ta/rpc_test/Makefile +++ b/ta/rpc_test/Makefile @@ -1,2 +1,2 @@ -BINARY = d17f73a0-36ef-11e1-984a0002a5d5c51b +BINARY = d17f73a0-36ef-11e1-984a-0002a5d5c51b include ../ta_common.mk diff --git a/ta/sha_perf/Android.mk b/ta/sha_perf/Android.mk index 5fa6bd25c..646909504 100644 --- a/ta/sha_perf/Android.mk +++ b/ta/sha_perf/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := 614789f2-39c0-4ebf-b23592b32ac107ed.ta +local_module := 614789f2-39c0-4ebf-b235-92b32ac107ed.ta include $(BUILD_OPTEE_MK) diff --git a/ta/sha_perf/Makefile b/ta/sha_perf/Makefile index ce5e908a2..c6e15a4ab 100644 --- a/ta/sha_perf/Makefile +++ b/ta/sha_perf/Makefile @@ -1,3 +1,3 @@ -BINARY = 614789f2-39c0-4ebf-b23592b32ac107ed +BINARY = 614789f2-39c0-4ebf-b235-92b32ac107ed include ../ta_common.mk diff --git a/ta/sims/Android.mk b/ta/sims/Android.mk index 4c8653d89..52aa62fec 100644 --- a/ta/sims/Android.mk +++ b/ta/sims/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := e6a33ed4-562b-463a-bb7eff5e15a493c8.ta +local_module := e6a33ed4-562b-463a-bb7e-ff5e15a493c8.ta include $(BUILD_OPTEE_MK) diff --git a/ta/sims/Makefile b/ta/sims/Makefile index 497945209..70ab76337 100644 --- a/ta/sims/Makefile +++ b/ta/sims/Makefile @@ -1,2 +1,2 @@ -BINARY = e6a33ed4-562b-463a-bb7eff5e15a493c8 +BINARY = e6a33ed4-562b-463a-bb7e-ff5e15a493c8 include ../ta_common.mk diff --git a/ta/storage/Android.mk b/ta/storage/Android.mk index 6fe1651dd..c19b55d74 100644 --- a/ta/storage/Android.mk +++ b/ta/storage/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := b689f2a7-8adf-477a-9f9932e90c0ad0a2.ta +local_module := b689f2a7-8adf-477a-9f99-32e90c0ad0a2.ta include $(BUILD_OPTEE_MK) diff --git a/ta/storage/Makefile b/ta/storage/Makefile index 773c6f288..b30802f06 100644 --- a/ta/storage/Makefile +++ b/ta/storage/Makefile @@ -1,2 +1,2 @@ -BINARY = b689f2a7-8adf-477a-9f9932e90c0ad0a2 +BINARY = b689f2a7-8adf-477a-9f99-32e90c0ad0a2 include ../ta_common.mk diff --git a/ta/storage2/Android.mk b/ta/storage2/Android.mk index 98230f284..b123bf88b 100644 --- a/ta/storage2/Android.mk +++ b/ta/storage2/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := 731e279e-aafb-4575-a77138caa6f0cca6.ta +local_module := 731e279e-aafb-4575-a771-38caa6f0cca6.ta include $(BUILD_OPTEE_MK) diff --git a/ta/storage2/Makefile b/ta/storage2/Makefile index 9f0a3079b..65f779580 100644 --- a/ta/storage2/Makefile +++ b/ta/storage2/Makefile @@ -1,2 +1,2 @@ -BINARY = 731e279e-aafb-4575-a77138caa6f0cca6 +BINARY = 731e279e-aafb-4575-a771-38caa6f0cca6 include ../ta_common.mk diff --git a/ta/storage_benchmark/Android.mk b/ta/storage_benchmark/Android.mk index a1e7f8714..c3eeb7659 100644 --- a/ta/storage_benchmark/Android.mk +++ b/ta/storage_benchmark/Android.mk @@ -1,4 +1,4 @@ LOCAL_PATH := $(call my-dir) -local_module := f157cda0-550c-11e5-a6fa0002a5d5c51b.ta +local_module := f157cda0-550c-11e5-a6fa-0002a5d5c51b.ta include $(BUILD_OPTEE_MK) diff --git a/ta/storage_benchmark/Makefile b/ta/storage_benchmark/Makefile index 6f82f0779..eb7cf0d84 100644 --- a/ta/storage_benchmark/Makefile +++ b/ta/storage_benchmark/Makefile @@ -1,2 +1,2 @@ -BINARY = f157cda0-550c-11e5-a6fa0002a5d5c51b +BINARY = f157cda0-550c-11e5-a6fa-0002a5d5c51b include ../ta_common.mk