kernel: mark z_cstart to not have stack protector

Most of the time, z_cstart() is running on an arbitrary region
of memory as stack, where the necessary stack setup has not been
performed. This prevents stack protection to work correctly,
as the stack canary has not been populated. So mark z_cstart()
to have no stack protection at all inside the function to avoid
raising exception during boot.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2022-12-15 15:54:56 -08:00 committed by Anas Nashif
commit 256db60ebf

View file

@ -498,6 +498,7 @@ sys_rand_fallback:
* @return Does not return
*/
__boot_func
FUNC_NO_STACK_PROTECTOR
FUNC_NORETURN void z_cstart(void)
{
/* gcov hook needed to get the coverage report.*/