qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] ahci: unmap fixes
@ 2016-01-29 21:41 John Snow
  2016-01-29 21:41 ` [Qemu-devel] [PATCH 1/4] ahci: Do not unmap NULL addresses John Snow
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: John Snow @ 2016-01-29 21:41 UTC (permalink / raw)
  To: qemu-block
  Cc: peter.maydell, pjp, qemu-devel, zuozhi.fzz, pbonzini, John Snow

As reported by Zuozhi fzz <zuozhi.fzz@alibaba-inc.com>, there's a problem
you can expose in AHCI by rewriting the command list buffer and/or FIS
receive buffer addresses, then re-starting the AHCI device before bringing
it to a stop. Depending on the success of the remap operations, you may
be able to transition the device to a state where it thinks it is "running"
but no longer has a guest memory mapping.

When you try to transition it to the stopped state, QEMU crashes.

Tighten up the start/stop conditions, and pepper in a paranoia check inside
of the unmap function.

________________________________________________________________________________

For convenience, this branch is available at:
https://github.com/jnsnow/qemu.git branch ahci-unmap-fixes
https://github.com/jnsnow/qemu/tree/ahci-unmap-fixes

This version is tagged ahci-unmap-fixes-v1:
https://github.com/jnsnow/qemu/releases/tag/ahci-unmap-fixes-v1

John Snow (4):
  ahci: Do not unmap NULL addresses
  ahci: handle LIST_ON and FIS_ON in map helpers
  ahci: explicitly reject bad engine states on post_load
  ahci: prohibit "restarting" the FIS or CLB engines

 hw/ide/ahci.c | 96 ++++++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 59 insertions(+), 37 deletions(-)

-- 
2.4.3

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

end of thread, other threads:[~2016-02-09 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-29 21:41 [Qemu-devel] [PATCH 0/4] ahci: unmap fixes John Snow
2016-01-29 21:41 ` [Qemu-devel] [PATCH 1/4] ahci: Do not unmap NULL addresses John Snow
2016-01-29 21:41 ` [Qemu-devel] [PATCH 2/4] ahci: handle LIST_ON and FIS_ON in map helpers John Snow
2016-01-29 21:41 ` [Qemu-devel] [PATCH 3/4] ahci: explicitly reject bad engine states on post_load John Snow
2016-01-29 21:41 ` [Qemu-devel] [PATCH 4/4] ahci: prohibit "restarting" the FIS or CLB engines John Snow
2016-02-08 16:53 ` [Qemu-devel] [PATCH 0/4] ahci: unmap fixes John Snow
2016-02-09 17:38   ` P J P

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