[riot-commits] [RIOT-OS/RIOT] 2215f2: cpu/esp32: add memset that cannot be optimized out

Martine Lenders authmillenon at gmail.com
Fri Jan 18 22:31:44 CET 2019


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 2215f29883ba140d2d16322462b035bf3a36c385
      https://github.com/RIOT-OS/RIOT/commit/2215f29883ba140d2d16322462b035bf3a36c385
  Author: Gunar Schorcht <gunar at schorcht.net>
  Date:   2019-01-17 (Thu, 17 Jan 2019)

  Changed paths:
    M cpu/esp32/include/syscalls.h
    M cpu/esp32/syscalls.c

  Log Message:
  -----------
  cpu/esp32: add memset that cannot be optimized out

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. 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.


  Commit: 6c61b69164fedb386e1168d69cecdd0745456ce8
      https://github.com/RIOT-OS/RIOT/commit/6c61b69164fedb386e1168d69cecdd0745456ce8
  Author: Gunar Schorcht <gunar at schorcht.net>
  Date:   2019-01-17 (Thu, 17 Jan 2019)

  Changed paths:
    M cpu/esp32/vendor/esp-idf/wpa_supplicant/port/include/os.h

  Log Message:
  -----------
  cpu/esp32: os_memset redefinition

os_memset uses system_secure_memset.


  Commit: f91f62155d54acfbc56d8f5b62f46dc1741005e0
      https://github.com/RIOT-OS/RIOT/commit/f91f62155d54acfbc56d8f5b62f46dc1741005e0
  Author: Martine Lenders <authmillenon at gmail.com>
  Date:   2019-01-18 (Fri, 18 Jan 2019)

  Changed paths:
    M cpu/esp32/include/syscalls.h
    M cpu/esp32/syscalls.c
    M cpu/esp32/vendor/esp-idf/wpa_supplicant/port/include/os.h

  Log Message:
  -----------
  Merge pull request #10801 from gschorcht/esp32_fix_memset_opt

cpu/esp32: fixes the memset optimization problem in esp_wifi/wpa_supplicant


Compare: https://github.com/RIOT-OS/RIOT/compare/49a05ad7e25a...f91f62155d54
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the commits mailing list