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

Gunar Schorcht notifications at github.com
Thu Jan 17 14:01:10 CET 2019

### Contribution description

This PR adds a memset function `system_secure_memset` which cannot be optimized out by the compiler. It uses the libsodium approach of weak symbols. Function `system_secure_memset` calls the standard `memset` function. Calling an empty function declared with weak attribute after the `memset` call, prevents the compiler to optimize it out. The overhead is only one function call.

### Testing procedure

- For the time being only the successful compilation.
- Once PR #10762 is merged, `examples/gnrc_networking` with `esp_wif` netdev can be used to test.
   CFLAGS='-DESP_WIFI_SSID=\"<your SSID>\" -DESP_WIFI_PASS=\"your passphrase\"' USEMODULE="esp_wifi" make BOARD=esp32-wroom-32 -C examples/gnrc_networking flash

### Issues/PRs references

Fixes the problem described in #10751 for ESP32 vendor code.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/esp32: add memset that cannot be optimized out
  * cpu/esp32: os_memset redefinition

-- File Changes --

    M cpu/esp32/include/syscalls.h (4)
    M cpu/esp32/syscalls.c (15)
    M cpu/esp32/vendor/esp-idf/wpa_supplicant/port/include/os.h (5)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190117/6c32206d/attachment.html>

More information about the notifications mailing list