Skip to content
Commit 389c3643 authored by Leandro Pereira's avatar Leandro Pereira Committed by Andrew Boie
Browse files

kernel: init: Use entropy API directly to initialize stack canary



Some sys_rand32_get() implementation will use shared state and protect
that using some synchronization primitive such as a mutex or a
semaphore.  It's too early in the boot process to use any of them,
which causes some issues.

Use the entropy API directly to set up the stack canaries.

This doesn't completely solve the problem, as some drivers will use the
same synchronization primitives anyway.  Some drivers (e.g.  the NRF5
entropy driver) provide an API to be used by ISRs that might be
suitable here, but not all drivers do that.

Signed-off-by: default avatarLeandro Pereira <leandro.pereira@intel.com>
parent 982d5c8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment