This avoids inconsistent output when external code gets linked in that
directly links against newlib's assert implementation (e.g. binary blobs
or packages that do not add `core/lib/include` to the include paths).
This also greatly benefits wrapping printf, as newlib's `__assert_func()`
directly links to internal printf functions of newlib.
Co-authored-by: crasbe <crasbe@gmail.com>
This drops a workaround that initialized newlib's reentrancy structure
on boot to reduce the chances of crashes when using the non-thread-safe
(unless reentrancy hooks are provided) stdio implementation of newlib.
Now that the newlib stdio implementation is only ever used if it is
thread-safe, we no longer need a workaround that reduces the chance
of crashes on concurrent use of stdio.
This makes use of the new bug modeling to declare all platforms that
can use newlib and have no reentrancy hooks as affected by the
non-thread-safe stdio bug. (Which is every platform but ESP* and AVR,
the former because the reentrancy hooks are provided, the latter because
we do not and never will support newlib on them.)
Building on that, the mpaland-printf package is used when newlib is
used and the bug is present. This way we can rely on the stdio being
thread-safe on every platform and not causing random crashes at run
time.
Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
Currently PSA mac backends can only implement psa_mac_compute() from
the PSA crypto API, but not psa_mac_verify() and the associated
multi-part functions.
Extend the location and algorithm dispatchers to connect the above
PSA API functions to suitable backends. Also extend the MAC backend
API to allow backends to implement those additional functions. Due
to a design issue with the SE backend API (context size is dynamic,
thus requiring a memory allocation) only psa_mac_verify() can be
accelerated by SE backends.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
`gnrc_rpl_dodag_remove_all_parents` sets the node's rank in the DODAG to
`GNRC_RPL_INFINITE_RANK`, so checking the (old) rank should be done
before that function call.