From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Breno Leitao <leitao@debian.org>, linuxppc-dev@lists.ozlabs.org
Cc: Breno Leitao <leitao@debian.org>,
mikey@neuling.org, gromero@linux.vnet.ibm.com
Subject: Re: [v4] selftests/powerpc: New TM signal self test
Date: Thu, 24 Jan 2019 14:40:14 +1100 (AEDT) [thread overview]
Message-ID: <43lSbL46kkz9sBn@ozlabs.org> (raw)
In-Reply-To: <1546947081-18969-1-git-send-email-leitao@debian.org>
On Tue, 2019-01-08 at 11:31:21 UTC, Breno Leitao wrote:
> A new self test that forces MSR[TS] to be set without calling any TM
> instruction. This test also tries to cause a page fault at a signal
> handler, exactly between MSR[TS] set and tm_recheckpoint(), forcing
> thread->texasr to be rewritten with TEXASR[FS] = 0, which will cause a BUG
> when tm_recheckpoint() is called.
>
> This test is not deterministic, since it is hard to guarantee that the page
> access will cause a page fault. In order to force more page faults at
> signal context, the signal handler and the ucontext are being mapped into a
> MADV_DONTNEED memory chunks.
>
> Tests have shown that the bug could be exposed with few interactions in a
> buggy kernel. This test is configured to loop 5000x, having a good chance
> to hit the kernel issue in just one run. This self test takes less than
> two seconds to run.
>
> This test uses set/getcontext because the kernel will recheckpoint
> zeroed structures, causing the test to segfault, which is undesired because
> the test needs to rerun, so, there is a signal handler for SIGSEGV which
> will restart the test.
>
> v2: Uses the MADV_DONTNEED memory advice
> v3: Fix memcpy and 32-bits compilation
> v4: Does not define unused macros
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/a65329aa7d613288626275546074f1aa
cheers
prev parent reply other threads:[~2019-01-24 3:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 11:31 [PATCH v4] selftests/powerpc: New TM signal self test Breno Leitao
2019-01-24 3:40 ` Michael Ellerman [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=43lSbL46kkz9sBn@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=gromero@linux.vnet.ibm.com \
--cc=leitao@debian.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
/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;
as well as URLs for NNTP newsgroup(s).