<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Fast kernel debugging for VMware, part 1: Overview</title>
	<atom:link href="http://www.nynaeve.net/?feed=rss2&#038;p=167" rel="self" type="application/rss+xml" />
	<link>http://www.nynaeve.net/?p=167</link>
	<description>Adventures in Windows debugging and reverse engineering.</description>
	<lastBuildDate>Mon, 23 Jul 2012 05:58:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Skywing</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18826</link>
		<dc:creator>Skywing</dc:creator>
		<pubDate>Wed, 10 Oct 2007 17:16:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18826</guid>
		<description>Yeah, that&#039;ll do it.  The code for finding the kernel base is kind of fragile and uses the module name for comparisons, which falls flat on its face if you boot with /KERNEL=.</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;ll do it.  The code for finding the kernel base is kind of fragile and uses the module name for comparisons, which falls flat on its face if you boot with /KERNEL=.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18825</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 10 Oct 2007 17:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18825</guid>
		<description>I have it setup with a checked version of windows 2003 (partially checked build), and I renamed the kernel components to halmacpi.chk, ntkrnlmp.chk and ntkrpamp.chk.

Is there a way I could recompile the driver on the vm side to look for specific variables instead of ntoskrnl.exe?? Maybe make a version that looks for a registry entry?

Thanks!</description>
		<content:encoded><![CDATA[<p>I have it setup with a checked version of windows 2003 (partially checked build), and I renamed the kernel components to halmacpi.chk, ntkrnlmp.chk and ntkrpamp.chk.</p>
<p>Is there a way I could recompile the driver on the vm side to look for specific variables instead of ntoskrnl.exe?? Maybe make a version that looks for a registry entry?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18822</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 10 Oct 2007 16:04:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18822</guid>
		<description>Ahah! Yes, I&#039;m using a partially checked build right now!</description>
		<content:encoded><![CDATA[<p>Ahah! Yes, I&#8217;m using a partially checked build right now!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Skywing</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18821</link>
		<dc:creator>Skywing</dc:creator>
		<pubDate>Wed, 10 Oct 2007 15:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18821</guid>
		<description>If you just hit &quot;reset&quot; in the VMware console, the vmware-vmx process should be reused and the DLL won&#039;t need to be reinjected.  (Attempting to inject the DLL multiple times into the vmware-vmx process is harmless and will have no effect.)

vmxpatch.dll is designed to be able to handle driver reconnects across its lifetime (e.g. across a reboot); this worked in my tests.

These are most of the error statuses that can be returned from kdvmware&#039;s DriverEntry along with the net start error message:

STATUS_PORT_DISCONNECTED (&quot;The handle is invalid.&quot;) - couldn&#039;t connect to vmxpatch.dll
STATUS_NO_MEMORY (&quot;Not enough storage space is available to process this command.&quot;) - couldn&#039;t allocate a block of contiguous physical memory
STATUS_NOT_FOUND (&quot;Element not found.&quot;) - couldn&#039;t find (either ntoskrnl.exe OR ntkrnlpa.exe) OR kdcom.dll in the loaded module list.
STATUS_INSUFFICIENT_RESOURCES (&quot;Insufficient system resources exist to complete the requested service.&quot;) - memory allocation failure
STATUS_ACCESS_VIOLATION (&quot;Invalid access to memory location.&quot;) - MmMapLockedPagesSpecifyCache failed for for creating a locked view with alternate protection for kdcom.dll patching
STATUS_PROCEDURE_NOT_FOUND (&quot;The specified procedure could not be found.&quot;) - couldn&#039;t locate a required kdcom.dll export

If you&#039;re getting &quot;element not found&quot;, then that is most likely a failure to find either kdcom.dll or ntoskrnl.exe in the loaded module list.  Are you starting the system with /KERNEL= or something of that sort?

There are also a number of debug prints in vmxpatch.dll which will be enabled if a debugger is attached to vmware-vmx.exe.  However, if you&#039;re getting STATUS_NOT_FOUND, I suspect that kdvmware.sys will have been aborting before it tries to talk to vmxpatch.dll.</description>
		<content:encoded><![CDATA[<p>If you just hit &#8220;reset&#8221; in the VMware console, the vmware-vmx process should be reused and the DLL won&#8217;t need to be reinjected.  (Attempting to inject the DLL multiple times into the vmware-vmx process is harmless and will have no effect.)</p>
<p>vmxpatch.dll is designed to be able to handle driver reconnects across its lifetime (e.g. across a reboot); this worked in my tests.</p>
<p>These are most of the error statuses that can be returned from kdvmware&#8217;s DriverEntry along with the net start error message:</p>
<p>STATUS_PORT_DISCONNECTED (&#8220;The handle is invalid.&#8221;) &#8211; couldn&#8217;t connect to vmxpatch.dll<br />
STATUS_NO_MEMORY (&#8220;Not enough storage space is available to process this command.&#8221;) &#8211; couldn&#8217;t allocate a block of contiguous physical memory<br />
STATUS_NOT_FOUND (&#8220;Element not found.&#8221;) &#8211; couldn&#8217;t find (either ntoskrnl.exe OR ntkrnlpa.exe) OR kdcom.dll in the loaded module list.<br />
STATUS_INSUFFICIENT_RESOURCES (&#8220;Insufficient system resources exist to complete the requested service.&#8221;) &#8211; memory allocation failure<br />
STATUS_ACCESS_VIOLATION (&#8220;Invalid access to memory location.&#8221;) &#8211; MmMapLockedPagesSpecifyCache failed for for creating a locked view with alternate protection for kdcom.dll patching<br />
STATUS_PROCEDURE_NOT_FOUND (&#8220;The specified procedure could not be found.&#8221;) &#8211; couldn&#8217;t locate a required kdcom.dll export</p>
<p>If you&#8217;re getting &#8220;element not found&#8221;, then that is most likely a failure to find either kdcom.dll or ntoskrnl.exe in the loaded module list.  Are you starting the system with /KERNEL= or something of that sort?</p>
<p>There are also a number of debug prints in vmxpatch.dll which will be enabled if a debugger is attached to vmware-vmx.exe.  However, if you&#8217;re getting STATUS_NOT_FOUND, I suspect that kdvmware.sys will have been aborting before it tries to talk to vmxpatch.dll.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18818</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Wed, 10 Oct 2007 14:54:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18818</guid>
		<description>I&#039;ve been using this for a couple of days, and it works great in most cases. I have one case where I&#039;m getting problems:

If I reboot my vm, I cannot re-establish connection with it afterwards. I cannot start the kdvmware driver, I get an error: Element not found.

I suspect I have to re-inject the dll in some way on the host side, but I guess I need to remove it first, and I havent&#039; gotten around that.

In other words I&#039;ve tried re-injecting the dll after the reboot, and restarting the kdvmware service without any success. Any pointers?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been using this for a couple of days, and it works great in most cases. I have one case where I&#8217;m getting problems:</p>
<p>If I reboot my vm, I cannot re-establish connection with it afterwards. I cannot start the kdvmware driver, I get an error: Element not found.</p>
<p>I suspect I have to re-inject the dll in some way on the host side, but I guess I need to remove it first, and I havent&#8217; gotten around that.</p>
<p>In other words I&#8217;ve tried re-injecting the dll after the reboot, and restarting the kdvmware service without any success. Any pointers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soren Dreijer</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18722</link>
		<dc:creator>Soren Dreijer</dc:creator>
		<pubDate>Fri, 05 Oct 2007 22:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18722</guid>
		<description>I&#039;ve always been really annoyed by the CPU spinning that&#039;s going on in the VM when you&#039;re broken into the debugger. It&#039;s particularly annoying if you&#039;re trying to compile something at the same time...

Can&#039;t wait to try this out.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve always been really annoyed by the CPU spinning that&#8217;s going on in the VM when you&#8217;re broken into the debugger. It&#8217;s particularly annoying if you&#8217;re trying to compile something at the same time&#8230;</p>
<p>Can&#8217;t wait to try this out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nynaeve &#187; Blog Archive &#187; Fast kernel debugging for VMware, part 2: KD Transport Module Interface</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18721</link>
		<dc:creator>Nynaeve &#187; Blog Archive &#187; Fast kernel debugging for VMware, part 2: KD Transport Module Interface</dc:creator>
		<pubDate>Fri, 05 Oct 2007 22:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18721</guid>
		<description>[...] Nynaeve Adventures in Windows debugging and reverse engineering.      &#171; Fast kernel debugging for VMware, part 1: Overview [...]</description>
		<content:encoded><![CDATA[<p>[...] Nynaeve Adventures in Windows debugging and reverse engineering.      &laquo; Fast kernel debugging for VMware, part 1: Overview [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Skywing</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18720</link>
		<dc:creator>Skywing</dc:creator>
		<pubDate>Fri, 05 Oct 2007 22:00:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18720</guid>
		<description>I certainly agree that it&#039;d be great if the virtualization vendors did this natively.  With source level integration, a lot of the annoying parts of VMKD relating to things like loading the hook DLL into the user mode VM process (and having to manually find the right PID associated with the VM you want), poking around in the VM process for undocumented functions, and soforth could easily be eliminated.  (If anyone from VMware / Virtual Server happens to read this and is so inclined, feel free to drop me a mail if you&#039;re interested in doing that, btw!)

I&#039;m also working on trying to get the DbgEng people to open up a nice pluggable interface to allow native VM debugging transports to more easily integrate with the debugger as well (as it is, VMKD internally has to basically reimplement the entire KDCOM framing protocol, for reasons that I&#039;ll go into in other posts).  For a couple of reasons, direct integration with DbgEng would also be much better than how VMKD currently operates (among other things, the speed at which dump files are written could be vastly improved even over the performance improvements that VMKD currently brings over serial port debugging).

No response from the debugger folks yet, though, on that front.</description>
		<content:encoded><![CDATA[<p>I certainly agree that it&#8217;d be great if the virtualization vendors did this natively.  With source level integration, a lot of the annoying parts of VMKD relating to things like loading the hook DLL into the user mode VM process (and having to manually find the right PID associated with the VM you want), poking around in the VM process for undocumented functions, and soforth could easily be eliminated.  (If anyone from VMware / Virtual Server happens to read this and is so inclined, feel free to drop me a mail if you&#8217;re interested in doing that, btw!)</p>
<p>I&#8217;m also working on trying to get the DbgEng people to open up a nice pluggable interface to allow native VM debugging transports to more easily integrate with the debugger as well (as it is, VMKD internally has to basically reimplement the entire KDCOM framing protocol, for reasons that I&#8217;ll go into in other posts).  For a couple of reasons, direct integration with DbgEng would also be much better than how VMKD currently operates (among other things, the speed at which dump files are written could be vastly improved even over the performance improvements that VMKD currently brings over serial port debugging).</p>
<p>No response from the debugger folks yet, though, on that front.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.nynaeve.net/?p=167&#038;cpage=1#comment-18717</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 05 Oct 2007 19:17:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.nynaeve.net/?p=167#comment-18717</guid>
		<description>This is an extremly cool idea!!!

And it works great too!!! I can&#039;t beleive that this hasn&#039;t been implemented by vmware themselves ;)

You should try to contact microsoft to see if you can get it work this way with their vms as well! 

I haven&#039;t been this happy with my debugger since 1394! Finally a responsive debugger!!!

Thanks dude!!</description>
		<content:encoded><![CDATA[<p>This is an extremly cool idea!!!</p>
<p>And it works great too!!! I can&#8217;t beleive that this hasn&#8217;t been implemented by vmware themselves ;)</p>
<p>You should try to contact microsoft to see if you can get it work this way with their vms as well! </p>
<p>I haven&#8217;t been this happy with my debugger since 1394! Finally a responsive debugger!!!</p>
<p>Thanks dude!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.457 seconds -->
