All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1825311] [NEW] mips_cpu_handle_mmu_fault renders all accessed pages executable
@ 2019-04-18  8:03 Jakub Jermar
  2019-04-18 12:20 ` [Qemu-devel] [Bug 1825311] " Philippe Mathieu-Daudé
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Jakub Jermar @ 2019-04-18  8:03 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

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.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
  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 12:20 ` Philippe Mathieu-Daudé
  2019-04-23 14:48 ` Jakub Jermar
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-04-18 12:20 UTC (permalink / raw)
  To: qemu-devel

** Tags added: mips

-- 
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
  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 12:20 ` [Qemu-devel] [Bug 1825311] " Philippe Mathieu-Daudé
@ 2019-04-23 14:48 ` Jakub Jermar
  2019-04-23 22:46 ` Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jakub Jermar @ 2019-04-23 14:48 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
  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 12:20 ` [Qemu-devel] [Bug 1825311] " Philippe Mathieu-Daudé
  2019-04-23 14:48 ` Jakub Jermar
@ 2019-04-23 22:46 ` Philippe Mathieu-Daudé
  2019-04-24 14:27 ` Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-04-23 22:46 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: New => Fix Committed

-- 
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:
  Fix Committed

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
  2019-04-18  8:03 [Qemu-devel] [Bug 1825311] [NEW] mips_cpu_handle_mmu_fault renders all accessed pages executable Jakub Jermar
                   ` (2 preceding siblings ...)
  2019-04-23 22:46 ` Philippe Mathieu-Daudé
@ 2019-04-24 14:27 ` Philippe Mathieu-Daudé
  2019-05-17  9:00 ` Jakub Jermar
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-04-24 14:27 UTC (permalink / raw)
  To: qemu-devel

Patch posted on the list:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg03711.html

** Changed in: qemu
       Status: Fix Committed => In Progress

-- 
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:
  In Progress

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
  2019-04-18  8:03 [Qemu-devel] [Bug 1825311] [NEW] mips_cpu_handle_mmu_fault renders all accessed pages executable Jakub Jermar
                   ` (3 preceding siblings ...)
  2019-04-24 14:27 ` Philippe Mathieu-Daudé
@ 2019-05-17  9:00 ` Jakub Jermar
  2019-05-17 10:33 ` Alex Bennée
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jakub Jermar @ 2019-05-17  9:00 UTC (permalink / raw)
  To: qemu-devel

Also attaching the 64-bit version of the reproducer.

** Attachment added: "64-bit version of the reproducer"
   https://bugs.launchpad.net/qemu/+bug/1825311/+attachment/5264428/+files/reproducer64.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:
  In Progress

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
  2019-04-18  8:03 [Qemu-devel] [Bug 1825311] [NEW] mips_cpu_handle_mmu_fault renders all accessed pages executable Jakub Jermar
                   ` (4 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2019-05-17 10:33 UTC (permalink / raw)
  To: qemu-devel

** Tags added: testcase

-- 
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:
  In Progress

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
  2019-04-18  8:03 [Qemu-devel] [Bug 1825311] [NEW] mips_cpu_handle_mmu_fault renders all accessed pages executable Jakub Jermar
                   ` (5 preceding siblings ...)
  2019-05-17 10:33 ` Alex Bennée
@ 2019-07-08 15:25 ` Peter Maydell
  2019-08-16  4:57 ` Thomas Huth
  7 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2019-07-08 15:25 UTC (permalink / raw)
  To: qemu-devel

This bug should be fixed by commit 7353113fa482e697a77 now in QEMU
master; it will be in the 4.1 release.


** Changed in: qemu
       Status: In Progress => Fix Committed

-- 
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:
  Fix Committed

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Qemu-devel] [Bug 1825311] Re: mips_cpu_handle_mmu_fault renders all accessed pages executable
  2019-04-18  8:03 [Qemu-devel] [Bug 1825311] [NEW] mips_cpu_handle_mmu_fault renders all accessed pages executable Jakub Jermar
                   ` (6 preceding siblings ...)
  2019-07-08 15:25 ` Peter Maydell
@ 2019-08-16  4:57 ` Thomas Huth
  7 siblings, 0 replies; 9+ messages in thread
From: Thomas Huth @ 2019-08-16  4:57 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: Fix Committed => Fix Released

-- 
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:
  Fix Released

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-16  5:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 12:20 ` [Qemu-devel] [Bug 1825311] " Philippe Mathieu-Daudé
2019-04-23 14:48 ` Jakub Jermar
2019-04-23 22:46 ` 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

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.