[riot-notifications] [RIOT-OS/RIOT] cpu/esp32: fixes the memset optimization problem in esp_wifi/wpa_supplicant (#10801)

Kees Bakker notifications at github.com
Thu Jan 17 20:52:58 CET 2019


keestux commented on this pull request.



> @@ -595,3 +595,18 @@ void system_wdt_start (void)
     TIMERG0.wdt_wprotect = 0;     /* enable write protection */
     xt_ints_on(BIT(CPU_INUM_WDT));
 }
+
+__attribute__((weak)) void
+_system_prevent_memset_lto(void *const  s, int c, const size_t n)
+{
+    (void) s;
+    (void) c;
+    (void) n;
+}
+
+void *system_secure_memset(void *s, int c, size_t n)
+{
+    memset(s, c, n);
+    _system_prevent_memset_lto(s, c, n);

In libsodium there is also
```
__asm__ __volatile__ ("" : : "r"(s) : "memory");
```
Did you leave that out on purpose?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10801#pullrequestreview-193811776
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190117/f6747f42/attachment.html>


More information about the notifications mailing list