From: Pengfei Xu <pengfei.xu@intel.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4 ltp] Add Intel umip(User Mode Instruction Prevention) basic function tests
Date: Thu, 17 Jan 2019 01:39:45 +0800 [thread overview]
Message-ID: <20190116173945.sr5lued43raaczu5@xpf-desktop> (raw)
In-Reply-To: <20190116134523.GE24833@rei>
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
prev parent reply other threads:[~2019-01-16 17:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 10:58 [LTP] [PATCH v4 ltp] Add Intel umip(User Mode Instruction Prevention) basic function tests Pengfei Xu
2019-01-16 13:45 ` Cyril Hrubis
2019-01-16 17:39 ` Pengfei Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190116173945.sr5lued43raaczu5@xpf-desktop \
--to=pengfei.xu@intel.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox