From 4c174394caa814a185121e7b06a41dc4be5c774a Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 19 Oct 2018 07:51:26 +0200 Subject: efi_selftest: do not write to linker generated array Linker generated arrays may be stored in code sections of memory that are not writable. So let's allocate setup_ok as an array at runtime. This avoids an illegal memory access observed in the sandbox. Reported-by: Simon Glass Signed-off-by: Heinrich Schuchardt Signed-off-by: Alexander Graf --- include/efi_selftest.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/efi_selftest.h') diff --git a/include/efi_selftest.h b/include/efi_selftest.h index 56beac3..49d3d6d 100644 --- a/include/efi_selftest.h +++ b/include/efi_selftest.h @@ -129,7 +129,6 @@ u16 efi_st_get_key(void); * @setup: set up the unit test * @teardown: tear down the unit test * @execute: execute the unit test - * @setup_ok: setup was successful (set at runtime) * @on_request: test is only executed on request */ struct efi_unit_test { @@ -139,7 +138,6 @@ struct efi_unit_test { const struct efi_system_table *systable); int (*execute)(void); int (*teardown)(void); - int setup_ok; bool on_request; }; -- cgit v1.1