x86: enable stack overflow detection on 64-bit

CONFIG_HW_STACK_PROTECTION is now available.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-11-05 14:00:30 -08:00 committed by Andrew Boie
commit 7d1ae023f8
4 changed files with 30 additions and 3 deletions

View file

@ -15,5 +15,11 @@ void z_x86_exception(const z_arch_esf_t *esf)
LOG_ERR("** CPU Exception %ld (code %ld/0x%lx) **",
esf->vector, esf->code, esf->code);
#ifdef CONFIG_THREAD_STACK_INFO
if (z_x86_check_stack_bounds(esf->rsp, 0, esf->cs)) {
z_x86_fatal_error(K_ERR_STACK_CHK_FAIL, esf);
}
#endif
z_x86_fatal_error(K_ERR_CPU_EXCEPTION, esf);
}