aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2019-11-18 15:14:29 +0000
committerLinaro Code Review <review@review.linaro.org>2019-11-18 15:14:29 +0000
commit8fa21d2e7d5102f580d65c925e74c5c4481c7291 (patch)
treedfd2ed9262bd46934144d0a16d609ba029508386
parent7aa6c044798f2e074286415dd0b209951824a018 (diff)
parentef1c907c684327609164dcc5bca856f98ba5445c (diff)
Merge "optee-test: remove old patches"
-rw-r--r--meta-optee/recipes-security/optee/optee-test/fix-build-failure-with-GCC6.patch21
-rw-r--r--meta-optee/recipes-security/optee/optee-test/regression-4011-correct-potential-overflow.patch68
-rw-r--r--meta-optee/recipes-security/optee/optee-test/xtest-prevent-unexpected-build-warning-with-strncpy.patch62
3 files changed, 0 insertions, 151 deletions
diff --git a/meta-optee/recipes-security/optee/optee-test/fix-build-failure-with-GCC6.patch b/meta-optee/recipes-security/optee/optee-test/fix-build-failure-with-GCC6.patch
deleted file mode 100644
index 324e6de0..00000000
--- a/meta-optee/recipes-security/optee/optee-test/fix-build-failure-with-GCC6.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-[PATCH] optee-test: fix build failure with GCC 6
-
-Add -Wno-unused-const-variable to disable errors introduced with the upgrade
-to GCC 6:
-error: 'pbkdf2_4_dkm' defined but not used [-Werror=unused-const-variable=]
-
-Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
-diff --git a/host/xtest/Makefile b/host/xtest/Makefile
-index 368d826..7960e5e 100644
---- a/host/xtest/Makefile
-+++ b/host/xtest/Makefile
-@@ -128,7 +128,8 @@ CFLAGS += -Wall -Wcast-align -Werror \
- -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
- -Wshadow -Wstrict-prototypes -Wswitch-default \
- -Wwrite-strings \
-- -Wno-missing-field-initializers -Wno-format-zero-length
-+ -Wno-missing-field-initializers -Wno-format-zero-length \
-+ -Wno-unused-const-variable
- endif
-
- CFLAGS += -g3
diff --git a/meta-optee/recipes-security/optee/optee-test/regression-4011-correct-potential-overflow.patch b/meta-optee/recipes-security/optee/optee-test/regression-4011-correct-potential-overflow.patch
deleted file mode 100644
index dfe33df5..00000000
--- a/meta-optee/recipes-security/optee/optee-test/regression-4011-correct-potential-overflow.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From ee5e039664065e7df44118c0a25967c9e16ab5fa Mon Sep 17 00:00:00 2001
-From: Etienne Carriere <etienne.carriere@linaro.org>
-Date: Fri, 21 Dec 2018 15:36:25 +0100
-Subject: [PATCH 1/2] regression 4011: correct potential overflow
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fix issues reported by GCC 8.2.0.
-
-build/optee_test/host/xtest/regression_4000.c: In function ‘xtest_tee_test_4011’:
-build/optee_test/host/xtest/regression_4000.c:5029:3: error: ‘memmove’ pointer overflow between offset [0, 8] and size [4294967295, 2147483647] accessing array ‘tmp’ with type ‘uint8_t[1024]’ {aka ‘unsigned char[1024]’} [-Werror=array-bounds]
- memmove(tmp + n + i, tmp + m, tmp_size - m);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-build/optee_test/host/xtest/regression_4000.c:4927:10: note: array ‘tmp’ declared here
- uint8_t tmp[1024];
- ^~~
-build/optee_test/host/xtest/regression_4000.c:5029:3: error: ‘memmove’ specified size 4294967295 exceeds maximum object size 2147483647 [-Werror=stringop-overflow=]
- memmove(tmp + n + i, tmp + m, tmp_size - m);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-cc1: all warnings being treated as errors
-
-Reported-by: Simon Hughes <simon.hughes@arm.com>
-Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
-Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
----
- host/xtest/regression_4000.c | 16 +++++++++++++---
- 1 file changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/host/xtest/regression_4000.c b/host/xtest/regression_4000.c
-index 380bdf4..08c814b 100644
---- a/host/xtest/regression_4000.c
-+++ b/host/xtest/regression_4000.c
-@@ -5006,18 +5006,28 @@ static void xtest_tee_test_4011(ADBG_Case_t *c)
- out, out_size, tmp, &tmp_size)))
- goto out;
-
-+ if (!ADBG_EXPECT_COMPARE_UNSIGNED(c, tmp_size, <=, sizeof(tmp)))
-+ goto out;
-+
- /* 4.1 */
-- for (n = 0; n < tmp_size; n++)
-+ for (n = 0; n < tmp_size - i; n++)
- if (tmp[n] == 0xff)
- break;
-+
-+ /* Shall find at least a padding start before buffer end */
-+ if (!ADBG_EXPECT_COMPARE_UNSIGNED(c, n, <, tmp_size - i - 1))
-+ goto out;
-+
- for (m = n + 1; m < tmp_size; m++)
- if (tmp[m] != 0xff)
- break;
-+
- /* 4.2 */
- memmove(tmp + n + i, tmp + m, tmp_size - m);
-+
- /* 4.3 */
-- for (n = n + tmp_size - m + i; n < tmp_size; n++)
-- tmp[n] = 0;
-+ n = n + i + tmp_size - m;
-+ memset(tmp + n, 0, tmp_size - n);
-
- /* 5 */
- out_size = sizeof(out);
---
-2.17.1
-
diff --git a/meta-optee/recipes-security/optee/optee-test/xtest-prevent-unexpected-build-warning-with-strncpy.patch b/meta-optee/recipes-security/optee/optee-test/xtest-prevent-unexpected-build-warning-with-strncpy.patch
deleted file mode 100644
index aabc0815..00000000
--- a/meta-optee/recipes-security/optee/optee-test/xtest-prevent-unexpected-build-warning-with-strncpy.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 2559e0f4acbcffeafbdf990d288f647a88608b92 Mon Sep 17 00:00:00 2001
-From: Etienne Carriere <etienne.carriere@linaro.org>
-Date: Fri, 21 Dec 2018 15:36:00 +0100
-Subject: [PATCH 2/2] xtest: prevent unexpected build warning with strncpy
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This change modifies adbg_run.c to prevent a false positive
-warning reported by GCC 8.2 on usage of strncpy():
-
- build/optee_test/host/xtest/adbg/src/adbg_run.c: In function ‘Do_ADBG_AppendToSuite’:
- build/optee_test/host/xtest/adbg/src/adbg_run.c:103:3: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
- strncpy(p, Source_p->SuiteID_p, size);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- build/optee_test/host/xtest/adbg/src/adbg_run.c:88:9: note: length computed here
- size = strlen(Source_p->SuiteID_p);
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~
- cc1: all warnings being treated as errors
-
-From [1]:
- Using strncpy Safely
- In general, it is not possible to avoid string truncation by strncpy
- except by sizing the destination to be at least a byte larger than
- the length of the source string. With that approach, however, using
- strncpy becomes unnecessary and the function can be avoided in favor
- of other APIs such as strcpy or (less preferably) memcpy. Much has
- been written about the problems with strncpy and we recommend to
- avoid it whenever possible. It is, however, worth keeping in mind
- that unlike other standard string-handling functions, strncpy always
- writes exactly as many characters as specified by the third argument;
- if the source string is shorter, the function fills the remaining
- bytes with NULs.
-
-This change prefers using a snprintf() as used in the alternate
-instruction block of the strncpy() call.
-
-[1] https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/
-
-Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
-Signed-off-by: Simon Hughes <simon.hughes@arm.com>
-Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
----
- host/xtest/adbg/src/adbg_run.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/host/xtest/adbg/src/adbg_run.c b/host/xtest/adbg/src/adbg_run.c
-index 406e429..2739db5 100644
---- a/host/xtest/adbg/src/adbg_run.c
-+++ b/host/xtest/adbg/src/adbg_run.c
-@@ -100,7 +100,7 @@ int Do_ADBG_AppendToSuite(
- snprintf(p, size, "%s+%s", Dest_p->SuiteID_p,
- Source_p->SuiteID_p);
- else
-- strncpy(p, Source_p->SuiteID_p, size);
-+ snprintf(p, size, "%s", Source_p->SuiteID_p);
- free((void *)Dest_p->SuiteID_p);
- Dest_p->SuiteID_p = p;
-
---
-2.17.1
-