summaryrefslogtreecommitdiff
path: root/include/efi_selftest.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-10-19 07:51:26 +0200
committerAlexander Graf <agraf@suse.de>2018-12-02 21:59:37 +0100
commit4c174394caa814a185121e7b06a41dc4be5c774a (patch)
tree462434baa564d79739f93451ec7afe017ab280a0 /include/efi_selftest.h
parent81ea00838c682da06637bcf208549095181df337 (diff)
downloadu-boot-4c174394caa814a185121e7b06a41dc4be5c774a.tar.gz
u-boot-4c174394caa814a185121e7b06a41dc4be5c774a.tar.bz2
u-boot-4c174394caa814a185121e7b06a41dc4be5c774a.zip
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 <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/efi_selftest.h')
-rw-r--r--include/efi_selftest.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/efi_selftest.h b/include/efi_selftest.h
index 56beac305e..49d3d6d0b4 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;
};