qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: fam@euphon.net, berrange@redhat.com, cohuck@redhat.com,
	richard.henderson@linaro.org, f4bug@amsat.org,
	"Laurent Vivier" <laurent@vivier.eu>,
	stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com,
	"Alex Bennée" <alex.bennee@linaro.org>,
	aurelien@aurel32.net
Subject: Re: [RFC PATCH] tests/tcg: add a multiarch signals test to stress test signal delivery
Date: Wed, 21 Apr 2021 20:47:52 +0100	[thread overview]
Message-ID: <8735vj8llf.fsf@linaro.org> (raw)
In-Reply-To: <0edb902de3407d276c264a87335550d4d0e8f93af530ff196e5bd69064b92a74@mu>


Alex Bennée <alex.bennee@linaro.org> writes:

> Alex Bennée <alex.bennee@linaro.org> writes:
>
>> This adds a simple signal test that combines the POSIX timer_create
>> with signal delivery across multiple threads.
>>
>> [AJB: So I wrote this in an attempt to flush out issues with the
>> s390x-linux-user handling. However I suspect I've done something wrong
>> or opened a can of signal handling worms.
>>
>> Nominally this runs fine on real hardware but I variously get failures
>> when running it under translation and while debugging QEMU running the
>> test. I've also exposed a shortcomming with the gdb stub when dealing
>> with guest TLS data so yay ;-). So I post this as an RFC in case
>> anyone else can offer insight or can verify they are seeing the same
>> strange behaviour?]
>
> To further document my confusion:
>
>   gdb --args $QEMU ./tests/tcg/$ARCH/signals
>
> will SEGV in generated code for every target I've run. This seems to be
> some sort of change of behaviour by running inside a debug
> environment.

This bit at least seems to be triggered by the page protections for
detecting SMC - I think. If you skip past them it triggers:

    if (is_write && info->si_signo == SIGSEGV && info->si_code == SEGV_ACCERR &&
        h2g_valid(address)) {
        switch (page_unprotect(h2g(address), pc)) {

and runs.

-- 
Alex Bennée


  parent reply	other threads:[~2021-04-21 19:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 13:29 [RFC PATCH] tests/tcg: add a multiarch signals test to stress test signal delivery Alex Bennée
2021-04-21 13:41 ` Philippe Mathieu-Daudé
2021-04-21 16:21 ` Alex Bennée
     [not found] ` <0edb902de3407d276c264a87335550d4d0e8f93af530ff196e5bd69064b92a74@mu>
2021-04-21 19:47   ` Alex Bennée [this message]
2021-04-21 19:56     ` Peter Maydell

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=8735vj8llf.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=fam@euphon.net \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    /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).