diff --git a/firmware/acid-firmware/.cargo/config.toml b/firmware/acid-firmware/.cargo/config.toml index 3fea2d0..f3caf39 100644 --- a/firmware/acid-firmware/.cargo/config.toml +++ b/firmware/acid-firmware/.cargo/config.toml @@ -5,9 +5,15 @@ runner = "espflash flash --monitor" [build] target = "xtensa-esp32s3-none-elf" rustflags = [ - # Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.) - # NOTE: May negatively impact performance of produced code - "-C", "force-frame-pointers", + # Exploit mitigations. + "-Zstack-protector=all", + + # Other unsupported exploit mitigations from: + # https://doc.rust-lang.org/beta/rustc/exploit-mitigations.html#exploit-mitigations-1 + # "-Zsanitizer=cfi,shadow-call-stack,safestack" + + # Required to obtain backtraces on riscv (e.g. when using the "esp-backtrace" crate.) + # "-C", "force-frame-pointers", ]