diff --git a/core/experiments/weathermonitor/experimentInfo.hpp b/core/experiments/weathermonitor/experimentInfo.hpp index 694793ce..9aec4ac3 100644 --- a/core/experiments/weathermonitor/experimentInfo.hpp +++ b/core/experiments/weathermonitor/experimentInfo.hpp @@ -3,9 +3,10 @@ // autogenerated, don't edit! -#define GUARDED_WEATHERMONITOR 0 +// 0 = vanilla, 1 = guarded, 2 = plausibility +#define WEATHERMONITOR_VARIANT 0 -#if !GUARDED_WEATHERMONITOR // without vptr guards +#if WEATHERMONITOR_VARIANT == 0 // without vptr guards // main() address: // nm -C vanilla.elf|fgrep main @@ -30,7 +31,7 @@ #define WEATHER_NUMINSTR_AFTER 10232 // data/BSS begin: // nm -C vanilla.elf|fgrep ___DATA_START__ -#define WEATHER_DATA_START 0x00101820 +#define WEATHER_DATA_START 0x00101814 // data/BSS end: // nm -C vanilla.elf|fgrep ___BSS_END__ #define WEATHER_DATA_END 0x00103108 @@ -41,7 +42,7 @@ // nm -C vanilla.elf|fgrep ___TEXT_END__ #define WEATHER_TEXT_END 0x0010165b -#else // with guards +#elif WEATHERMONITOR_VARIANT == 1 // with guards // main() address: // nm -C guarded.elf|fgrep main @@ -66,10 +67,10 @@ #define WEATHER_NUMINSTR_AFTER 10232 // data/BSS begin: // nm -C guarded.elf|fgrep ___DATA_START__ -#define WEATHER_DATA_START 0x00101b84 +#define WEATHER_DATA_START 0x00101b98 // data/BSS end: // nm -C guarded.elf|fgrep ___BSS_END__ -#define WEATHER_DATA_END 0x001034ac +#define WEATHER_DATA_END 0x001034cc // text begin: // nm -C guarded.elf|fgrep ___TEXT_START__ #define WEATHER_TEXT_START 0x00100000 @@ -77,6 +78,44 @@ // nm -C guarded.elf|fgrep ___TEXT_END__ #define WEATHER_TEXT_END 0x001019db +#elif WEATHERMONITOR_VARIANT == 2 // with guards + plausibility check + +// main() address: +// nm -C plausibility.elf|fgrep main +#define WEATHER_FUNC_MAIN 0x00100e60 +// wait_begin address +#define WEATHER_FUNC_WAIT_BEGIN 0x00100e40 +// wait_end address +#define WEATHER_FUNC_WAIT_END 0x00100e50 +// vptr_panic address (only exists in guarded variant) +#define WEATHER_FUNC_VPTR_PANIC 0x001012d0 +// number of main loop iterations to trace +// (determines trace length and therefore fault-space width) +#define WEATHER_NUMITER_TRACING 4 +// number of instructions needed for these iterations in golden run (taken from +// experiment step #2) +#define WEATHER_NUMINSTR_TRACING 20549 +// number of additional loop iterations for FI experiments (to see whether +// everything continues working fine) +#define WEATHER_NUMITER_AFTER 2 +// number of instructions needed for these iterations in golden run (taken from +// experiment step #2) +#define WEATHER_NUMINSTR_AFTER 10232 +// data/BSS begin: +// nm -C plausibility.elf|fgrep ___DATA_START__ +#define WEATHER_DATA_START 0x00101dd8 +// data/BSS end: +// nm -C plausibility.elf|fgrep ___BSS_END__ +#define WEATHER_DATA_END 0x0010370c +// text begin: +// nm -C plausibility.elf|fgrep ___TEXT_START__ +#define WEATHER_TEXT_START 0x00100000 +// text end: +// nm -C plausibility.elf|fgrep ___TEXT_END__ +#define WEATHER_TEXT_END 0x00101c1b + +#else +#error Unknown WEATHERMONITOR_VARIANT #endif #endif diff --git a/core/experiments/weathermonitor/experimentInfo.hpp.sh b/core/experiments/weathermonitor/experimentInfo.hpp.sh index 2580695a..0d72628b 100755 --- a/core/experiments/weathermonitor/experimentInfo.hpp.sh +++ b/core/experiments/weathermonitor/experimentInfo.hpp.sh @@ -2,7 +2,7 @@ set -e TARGET=experimentInfo.hpp -[ ! -e "$1" -o ! -e "$2" ] && echo "usage: $0 vanilla.elf guarded.elf" && exit 1 +[ ! -e "$1" -o ! -e "$2" -o ! -e "$3" ] && echo "usage: $0 vanilla.elf guarded.elf plausibility.elf" && exit 1 function addrof() { nm -C $1 | (fgrep "$2" || echo 99999999) | awk '{print $1}'; } @@ -12,9 +12,10 @@ cat >$TARGET <>$TARGET - cat >>$TARGET <>$TARGET - cat >>$TARGET <>$TARGET +cat >>$TARGET <