[LTP] [PATCH v4 ltp] Add Intel umip(User Mode Instruction Prevention) basic function tests

Pengfei Xu pengfei.xu@intel.com
Wed Jan 16 18:39:45 CET 2019


Hi Cyril,
  Thanks for your advice.
  I make it complex and contain potential risk.

BR.

On 2019-01-16 at 14:45:24 +0100, Cyril Hrubis wrote:
> Hi!
> 
> I think I already tried to explain that signal handler runs
> asynchronously to the rest of the code and that calling anything else
> than a few signal-async-safe functions may cause undefined behavior,
> which mostly translates to deadlocks.
> 
> Why can't we write the test as:
> 
> 	SAFE_WAITPID(pid, &status, 0);
> 
> 	if (WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV) {
> 		tst_res(TPASS, "Got SIGSEGV");
> 		return;
> 	}
> 
> 	tst_res(TFAIL, "Child exitted with %s", tst_strstatus(status));
> }
> 
> 
> -- 
> Cyril Hrubis
> chrubis@suse.cz


More information about the ltp mailing list