All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <1903833@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1903833] Re: User mode qemu-aarch: SIGGSEGV signal handler works wrong
Date: Thu, 12 Nov 2020 21:37:50 -0000	[thread overview]
Message-ID: <160521707016.4731.18065852811276703137.malone@soybean.canonical.com> (raw)
In-Reply-To: 160508996361.28374.9424687449463676251.malonedeb@gac.canonical.com

The patch is most definitely wrong.  The page protection
is required to implement self-modifying code, of which a
signal trampoline is a subset.

Moreover, your test case works for me using both
x86_64-linux and aarch64-linux as hosts.

There may be a bug, but I suspect it to be within WSL.
I have no way to test that one way or another.

** Changed in: qemu
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1903833

Title:
  User mode qemu-aarch: SIGGSEGV signal handler works wrong

Status in QEMU:
  Incomplete

Bug description:
  I have a user mode qemu-aarch issue. Program with SIGSEGV signal handler works wrong under qemu-aarch: 
  once the progam handles the SEGV signal, qemu marks the program's page protected, and signal handler gets SEGV on each subsequent memory access instruction within a program.

  The issue is reproduced on WSL Ubuntu 20.04 under Windows 10, qemu-aarch64 version 5.1.50
  The issue is also reproducible on the latest upstream qemu-aarch build.

  The following workaround disables mprotect call and fixes the issue:
  https://github.com/BorisUlasevich/qemu/commit/3063d9a64f8395185d65c6b6710d28ee92cd8be5

  The issue can be reproduced on OpenJDK which reports SIGSEGV
  immediately after start. The small reproducer program is attached.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1903833/+subscriptions


  reply	other threads:[~2020-11-12 22:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 10:19 [Bug 1903833] [NEW] User mode qemu-aarch: SIGGSEGV signal handler works wrong Boris
2020-11-12 21:37 ` Richard Henderson [this message]
2021-01-12  4:17 ` [Bug 1903833] " Launchpad Bug Tracker

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=160521707016.4731.18065852811276703137.malone@soybean.canonical.com \
    --to=1903833@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.