[PULL 0/3] SIGSEGV fixes

Taylor Simpson posted 3 patches 2 years, 9 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1626902375-7002-1-git-send-email-tsimpson@quicinc.com
There is a newer version of this series
target/hexagon/op_helper.c       | 42 +++++++++++++++++++---------------------
tests/tcg/multiarch/linux-test.c |  8 ++++++++
2 files changed, 28 insertions(+), 22 deletions(-)
[PULL 0/3] SIGSEGV fixes
Posted by Taylor Simpson 2 years, 9 months ago
The following changes since commit 7457b407edd6e8555e4b46488aab2f13959fccf8:

  Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-07-19' into staging (2021-07-19 11:34:08 +0100)

are available in the git repository at:

  https://github.com/quic/qemu tags/pull-hex-20210721

for you to fetch changes up to 953ea3e4b426ee0c8349343c53e3358cfec720f2:

  linux-test (tests/tcg/multiarch/linux-test.c) add check (2021-07-21 15:54:28 -0500)

----------------------------------------------------------------
The Hexagon target was silently failing the SIGSEGV test because
the signal handler was not called.

Patch 1/3 fixes the Hexagon target
Patch 2/3 drops include qemu.h from target/hexagon/op_helper.c
Patch 3/3 adds a check that the signal handler is called

----------------------------------------------------------------
Peter Maydell (1):
      target/hexagon: Drop include of qemu.h

Taylor Simpson (2):
      Hexagon (target/hexagon) remove put_user_*/get_user_*
      linux-test (tests/tcg/multiarch/linux-test.c) add check

 target/hexagon/op_helper.c       | 42 +++++++++++++++++++---------------------
 tests/tcg/multiarch/linux-test.c |  8 ++++++++
 2 files changed, 28 insertions(+), 22 deletions(-)
Re: [PULL 0/3] SIGSEGV fixes
Posted by Peter Maydell 2 years, 9 months ago
On Wed, 21 Jul 2021 at 22:19, Taylor Simpson <tsimpson@quicinc.com> wrote:
>
> The following changes since commit 7457b407edd6e8555e4b46488aab2f13959fccf8:
>
>   Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-07-19' into staging (2021-07-19 11:34:08 +0100)
>
> are available in the git repository at:
>
>   https://github.com/quic/qemu tags/pull-hex-20210721
>
> for you to fetch changes up to 953ea3e4b426ee0c8349343c53e3358cfec720f2:
>
>   linux-test (tests/tcg/multiarch/linux-test.c) add check (2021-07-21 15:54:28 -0500)
>
> ----------------------------------------------------------------
> The Hexagon target was silently failing the SIGSEGV test because
> the signal handler was not called.
>
> Patch 1/3 fixes the Hexagon target
> Patch 2/3 drops include qemu.h from target/hexagon/op_helper.c
> Patch 3/3 adds a check that the signal handler is called
>
> ----------------------------------------------------------------

Hi; the check added in patch 2 seems to fire about 50% of the
time for qemu-riscv64, causing 'make check-tcg' to fail.

$ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
$ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
$ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
$ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
/mnt/nvmedisk/linaro/qemu-for-merges/tests/tcg/multiarch/linux-test.c:500:
SIGSEGV handler not called
$ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
$ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
/mnt/nvmedisk/linaro/qemu-for-merges/tests/tcg/multiarch/linux-test.c:500:
SIGSEGV handler not called
$ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
/mnt/nvmedisk/linaro/qemu-for-merges/tests/tcg/multiarch/linux-test.c:500:
SIGSEGV handler not called


thanks
-- PMM

RE: [PULL 0/3] SIGSEGV fixes
Posted by Taylor Simpson 2 years, 9 months ago
I've added the riscv maintainers and Laurent and Alex to the CC list.

Please advise on how to proceed.  Is this a known issue with riscv?  Should I try to debug the riscv target or remove the change to linux-test.c from the pull request?


Thanks,
Taylor

> -----Original Message-----
> From: Peter Maydell <peter.maydell@linaro.org>
> Sent: Thursday, July 22, 2021 12:31 PM
> To: Taylor Simpson <tsimpson@quicinc.com>
> Cc: QEMU Developers <qemu-devel@nongnu.org>; Richard Henderson
> <richard.henderson@linaro.org>; Philippe Mathieu-Daudé
> <philmd@redhat.com>; Alessandro Di Federico <ale@rev.ng>; Brian Cain
> <bcain@quicinc.com>
> Subject: Re: [PULL 0/3] SIGSEGV fixes
> 
> On Wed, 21 Jul 2021 at 22:19, Taylor Simpson <tsimpson@quicinc.com>
> wrote:
> >
> > The following changes since commit
> 7457b407edd6e8555e4b46488aab2f13959fccf8:
> >
> >   Merge remote-tracking branch
> > 'remotes/thuth-gitlab/tags/pull-request-2021-07-19' into staging
> > (2021-07-19 11:34:08 +0100)
> >
> > are available in the git repository at:
> >
> >   https://github.com/quic/qemu tags/pull-hex-20210721
> >
> > for you to fetch changes up to
> 953ea3e4b426ee0c8349343c53e3358cfec720f2:
> >
> >   linux-test (tests/tcg/multiarch/linux-test.c) add check (2021-07-21
> > 15:54:28 -0500)
> >
> > ----------------------------------------------------------------
> > The Hexagon target was silently failing the SIGSEGV test because the
> > signal handler was not called.
> >
> > Patch 1/3 fixes the Hexagon target
> > Patch 2/3 drops include qemu.h from target/hexagon/op_helper.c Patch
> > 3/3 adds a check that the signal handler is called
> >
> > ----------------------------------------------------------------
> 
> Hi; the check added in patch 2 seems to fire about 50% of the time for qemu-
> riscv64, causing 'make check-tcg' to fail.
> 
> $ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
> $ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
> $ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
> $ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
> /mnt/nvmedisk/linaro/qemu-for-merges/tests/tcg/multiarch/linux-
> test.c:500:
> SIGSEGV handler not called
> $ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
> $ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
> /mnt/nvmedisk/linaro/qemu-for-merges/tests/tcg/multiarch/linux-
> test.c:500:
> SIGSEGV handler not called
> $ ./qemu-riscv64 ./tests/tcg/riscv64-linux-user/linux-test
> /mnt/nvmedisk/linaro/qemu-for-merges/tests/tcg/multiarch/linux-
> test.c:500:
> SIGSEGV handler not called


Re: [PULL 0/3] SIGSEGV fixes
Posted by Richard Henderson 2 years, 9 months ago
On 7/23/21 8:48 AM, Taylor Simpson wrote:
> I've added the riscv maintainers and Laurent and Alex to the CC list.
> 
> Please advise on how to proceed.  Is this a known issue with riscv?  Should I try to debug the riscv target or remove the change to linux-test.c from the pull request?

Remove the linux-test.c from the pull request.

Someone will need to debug riscv, but I don't think you want that to block the bug fix for 
hexagon.


r~


PS: Please use some subject-line indicator for what component you're patching.  "SIGSEGV 
fixes" is impossibly generic.

Re: [PULL 0/3] SIGSEGV fixes
Posted by Philippe Mathieu-Daudé 2 years, 9 months ago
On 7/23/21 9:10 PM, Richard Henderson wrote:
> On 7/23/21 8:48 AM, Taylor Simpson wrote:
>> I've added the riscv maintainers and Laurent and Alex to the CC list.
>>
>> Please advise on how to proceed.  Is this a known issue with riscv? 
>> Should I try to debug the riscv target or remove the change to
>> linux-test.c from the pull request?
> 
> Remove the linux-test.c from the pull request.
> 
> Someone will need to debug riscv, but I don't think you want that to
> block the bug fix for hexagon.
> 
> 
> r~
> 
> 
> PS: Please use some subject-line indicator for what component you're
> patching.  "SIGSEGV fixes" is impossibly generic.

Although more generic is possible: "fixes"