From: Jakub Jermar <1825311@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
Date: Tue, 23 Apr 2019 14:48:44 -0000 [thread overview]
Message-ID: <155603092465.6530.17158756071412067771.malone@chaenomeles.canonical.com> (raw)
In-Reply-To: 155557460746.17507.17649109204793492383.malonedeb@soybean.canonical.com
I am attaching a reproducer image and script.
Unpatched execution ends like this:
...
TAP TEST START
1..2
not ok 1 NonExecutable::ElfDataIsNotExecutable
# Assertion failed /home/jermar/Kernkonzept/software/l4/pkg/l4re-core/test/moe/test_nx.cc:103
# Expected: -(L4_EIPC_LO + l4_ipc_error(tag, l4_utcb())) >= 0
# Actual: -2003 (Receive timeout)
# There was no IPC error.
# Assertion failed /home/jermar/Kernkonzept/software/l4/pkg/l4re-core/test/moe/test_nx.cc:125
# Expected equality of these values:
# pfa
# Which is: 360
# (l4_addr_t)execute_data
# Which is: 17633344
# The page fault occured at the expected location.
not ok 2 NonExecutable::StackIsNotExecutable
# Assertion failed /home/jermar/Kernkonzept/software/l4/pkg/l4re-core/test/moe/test_nx.cc:103
# Expected: -(L4_EIPC_LO + l4_ipc_error(tag, l4_utcb())) >= 0
# Actual: -2003 (Receive timeout)
# There was no IPC error.
# Assertion failed /home/jermar/Kernkonzept/software/l4/pkg/l4re-core/test/moe/test_nx.cc:144
# Expected equality of these values:
# pfa
# Which is: 4358144
# stack_func
# Which is: 4276000
# The page fault occured at the expected location.
TAP TEST FINISHED
With the proposed patch applied, the execution should end with something
like this:
...
TAP TEST START
1..2
ok 1 NonExecutable::ElfDataIsNotExecutable
ok 2 NonExecutable::StackIsNotExecutable
TAP TEST FINISHED
** Attachment added: "Image and script for reproducing this bug."
https://bugs.launchpad.net/qemu/+bug/1825311/+attachment/5258264/+files/reproducer.tar.xz
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1825311
Title:
mips_cpu_handle_mmu_fault renders all accessed pages executable
Status in QEMU:
New
Bug description:
On MIPS, data accesses to pages mapped in the TLB result in
mips_cpu_handle_mmu_fault() marking the page unconditionally
executable, even if the TLB entry has the XI bit set. Later on, when
there is an attempt to execute this page, no exception is generated,
even though TLBXI is expected.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1825311/+subscriptions
next prev parent reply other threads:[~2019-04-23 15:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 8:03 [Qemu-devel] [Bug 1825311] [NEW] mips_cpu_handle_mmu_fault renders all accessed pages executable Jakub Jermar
2019-04-18 8:03 ` Jakub Jermar
2019-04-18 12:20 ` [Qemu-devel] [Bug 1825311] " Philippe Mathieu-Daudé
2019-04-18 12:20 ` Philippe Mathieu-Daudé
2019-04-23 14:48 ` Jakub Jermar [this message]
2019-04-23 14:48 ` Jakub Jermar
2019-04-23 22:46 ` Philippe Mathieu-Daudé
2019-04-23 22:46 ` Philippe Mathieu-Daudé
2019-04-24 14:27 ` Philippe Mathieu-Daudé
2019-04-24 14:27 ` Philippe Mathieu-Daudé
2019-05-17 9:00 ` Jakub Jermar
2019-05-17 10:33 ` Alex Bennée
2019-07-08 15:25 ` Peter Maydell
2019-08-16 4:57 ` Thomas Huth
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=155603092465.6530.17158756071412067771.malone@chaenomeles.canonical.com \
--to=1825311@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 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).