summaryrefslogtreecommitdiff
path: root/fuzz/fuzz_config.h
diff options
context:
space:
mode:
authorAllen Webb <allenwebb@google.com>2018-08-21 12:11:38 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-12-03 12:43:22 -0800
commita5e1a639e55d1c6382b4d690c6b78f6f85e8fbc9 (patch)
tree04ea72cd9750bc6b3e792550f7fd9515186a3636 /fuzz/fuzz_config.h
parentb343c963b38b03df97a1bc57f201e26640c89e47 (diff)
downloadchrome-ec-a5e1a639e55d1c6382b4d690c6b78f6f85e8fbc9.tar.gz
cr50_fuzz: Add libprotobuf-mutator support.
This uses protocol buffers to model what actions can be taken with pinweaver at a higher level of abstraction than the raw requests to greatly increase the coverage that can be achieved by fuzzing, while still allowing for invalid inputs to be checked. BRANCH=none BUG=chromium:876582 TEST=sudo emerge libprotobuf-mutator && make -j buildfuzztests && ./build/host/cr50_fuzz/cr50_fuzz.exe Change-Id: Ie7ce569650ca06866f277f36eae61df2684de60c Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/1184107 Reviewed-by: Mattias Nissler <mnissler@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'fuzz/fuzz_config.h')
-rw-r--r--fuzz/fuzz_config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fuzz/fuzz_config.h b/fuzz/fuzz_config.h
index 9a64166fa2..bcf7284ac4 100644
--- a/fuzz/fuzz_config.h
+++ b/fuzz/fuzz_config.h
@@ -61,6 +61,10 @@ enum nvmem_users {
NVMEM_NUM_USERS
};
#endif
+
+#define NVMEM_TPM_SIZE \
+ (sizeof(((nvmem_partition *)(0))->buffer) - NVMEM_CR50_SIZE)
+
#define CONFIG_FLASH_NVMEM_VARS_USER_NUM NVMEM_CR50
/******************************************************************************/