public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: duck-j34lQMj1tz/QT0dZR+AlfA@public.gmane.org
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Setting hardware breakpoints in guest OS
Date: Sat, 12 Jan 2008 22:17:09 +0200	[thread overview]
Message-ID: <47892045.8050806@qumranet.com> (raw)
In-Reply-To: <OFAEA5CBF2.FBDDDD91-ONCA2573CD.0006E4E5-CA2573CD.0007BA67-j34lQMj1tz/QT0dZR+AlfA@public.gmane.org>

duck-j34lQMj1tz/QT0dZR+AlfA@public.gmane.org wrote:
> Can hardware breakpoints be set (and trapped, and handled) inside a guest
> OS (specifially Windows XP2)?
>
> I noticed the other day that software (malicious code, in fact) packed with
> the EXE compressor PELock won't run under QEMU+KVM. I guessed that this was
> because h/w breakpoints aren't being trapped. (The PELock incarnation used
> in this case relies on SEH and H/W breaks -- verifying that they take place
> correctly -- in its decryption code in order to try to make it harder to
> extract the original content from packed files.)
>
> A quick try with OllyDbg suggested that I wasn't able to provoke hardware
> traps in my own code, either. Olly allows me to specify a H/W breakpoint
> but I never seem to get control back at the desired address. INT 1 and INT
> 3 debugging work just fine (i.e. tracing and software breakpoints).
>
> Is this "one of those things" to do with virtualisation? QEMU+kqemu handles
> PELock files just fine.

While we tried to make debugging inside the guest work, this was never 
really tested, so it's likely broken.  I'll try to look at what it will 
take to make it work; I don't think there's much needed.

What hardware are you using?  If you have both AMD and Intel hardware, 
you might have better luck switching, since this is very subarch dependent.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

  parent reply	other threads:[~2008-01-12 20:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11  1:24 Setting hardware breakpoints in guest OS duck-j34lQMj1tz/QT0dZR+AlfA
     [not found] ` <OFAEA5CBF2.FBDDDD91-ONCA2573CD.0006E4E5-CA2573CD.0007BA67-j34lQMj1tz/QT0dZR+AlfA@public.gmane.org>
2008-01-12 20:17   ` Avi Kivity [this message]
     [not found]     ` <47892045.8050806-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2008-01-14  0:35       ` duck-j34lQMj1tz/QT0dZR+AlfA
     [not found]         ` <OF0963A639.12233341-ONCA2573D0.0001C09D-CA2573D0.00033C13-j34lQMj1tz/QT0dZR+AlfA@public.gmane.org>
2008-01-14 17:47           ` Avi Kivity

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=47892045.8050806@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=duck-j34lQMj1tz/QT0dZR+AlfA@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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