From 7fca722f24857d115d43f26d10d17fc46f297bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Hlusi=C4=8Dka?= Date: Thu, 22 Jan 2026 18:16:37 +0100 Subject: [PATCH] Disable `-C force-frame-pointers`, as it is only applicable to riscv --- firmware/acid-firmware/.cargo/config.toml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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", ]