int sef_self_priv_flags;
int sef_self_init_flags;
int sef_self_receiving;
+int sef_controlled_crash;
/* Extern variables. */
EXTERN int sef_lu_state;
sef_self_priv_flags = priv_flags;
sef_self_init_flags = init_flags;
sef_lu_state = SEF_LU_STATE_NULL;
+ sef_controlled_crash = FALSE;
old_endpoint = NONE;
if(init_flags & SEF_LU_NOMMAP) {
sys_upd_flags |= SF_VM_NOMMAP;
sef_self_priv_flags = priv_flags;
sef_self_init_flags = init_flags;
sef_lu_state = SEF_LU_STATE_NULL;
+ sef_controlled_crash = FALSE;
}
/*===========================================================================*
EXTERN int do_sef_fi_request(message *m_ptr);
+EXTERN int sef_controlled_crash;
+
/*===========================================================================*
* do_sef_fi_request *
*===========================================================================*/
int do_sef_fi_request(message *m_ptr)
{
/* See if we are simply asked to crash. */
- if (m_ptr->m_lsys_fi_ctl.subtype == RS_FI_CRASH)
+ if (m_ptr->m_lsys_fi_ctl.subtype == RS_FI_CRASH) {
+ sef_controlled_crash = TRUE;
panic("Crash!");
+ }
#if SEF_FI_ALLOW_EDFI
/* Forward the request to the EDFI fault injector, if linked in. */
EXTERN endpoint_t sef_self_endpoint;
EXTERN endpoint_t sef_self_priv_flags;
EXTERN endpoint_t sef_self_init_flags;
+EXTERN int sef_controlled_crash;
#ifndef ST_STACK_REFS_BUFF_SIZE
#define ST_STACK_REFS_BUFF_SIZE 1024
/* Restore stack refs. */
sef_llvm_stack_refs_restore(stack_buff);
+ if (sef_controlled_crash == FALSE) {
+ printf("SEF(%d): crash was not controlled, "
+ "aborting transparent restart\n", sef_self_endpoint);
+ return EGENERIC; /* actual error code does not matter */
+ }
+
return OK;
}