>I’ve been told on recent OS’s it’s not possible for third parties to
actually write new debugger protocol kernel DLL’s (the target side), as the
OS checks for a digital signature that only Microsoft can generate.
I remember hearing/reading that a well, but it’s either apparently not the
case (my guess), or some people have worked around it. In particular, the
x86_64 build of kdvm.dll (of virtualdkd) isn’t signed by msft.
mm
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jan Bottorff
Sent: Sunday, October 17, 2010 1:44 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] custom debug host driver
A couple ideas to look into…
Llook into implementing an emulator for a 1394 hardware subset. Kernel
debugging does not use anything close to all the features in the 1394 chips.
I believe it basically enables debug mode, which then allows RDMA to work,
and there is a way to communicate where the RDMA target buffer is located in
memory. Your 1394 emulator just had to ignore many of the register writes
used to initialize debug mode, and then have a way to read/write debug
packets to the debug buffer. Your 1394 emulator returns a PCI VID/PID saying
it’s a 1394 controller to make the 1394 debug support in the guest happy.
Ideally you connect the other end of the emulated 1394 to a network socket
so you can just point windbg at the correct IP address and have the debug
packets show up in the guest. I haven’t personally implemented this, but did
do some research on it for a possible implementation on a management
controller like device.
If you download the Microsoft Singularity source tree, and search for I
believe its kd1394, you will get a good idea of what the 1394 debugger
actually looks like. The target side code is pretty simple, and is probably
not exactly the code used on production Windows OS’s, it is pretty close as
Singularity can be debugged with windbg. There also is info on the web about
the serial debugging protocol, mostly by people doing security research.
You might just add special kernel debugging support to the serial emulator
(like memory read request optimization), which might get most of the
performance gains a 1394 emulator would give.
Running some IRP traces of the debugger end of a 1394 debugging session
would likely also prove educational, unless you happen to have a 1394
hardware protocol debugger handy. Tracing a serial port debug session would
also be useful, as I believe the differences at the debugger end are small.
1394 debugging performance is high because certain debug packet types, like
memory read, and converted by the debugger driver/protocol DLL into RDMA
reads, so instead of sending a request to read to the target debug stub
code, which they copies the data into the debug packet buffer when is then
read by the protocol, it just sends a RDMA read request to the 1394
hardware.
I’ve been told on recent OS’s it’s not possible for third parties to
actually write new debugger protocol kernel DLL’s (the target side), as the
OS checks for a digital signature that only Microsoft can generate.
You should look at the VirtualKD stuff too.
Jan
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-428116-
xxxxx@lists.osr.com] On Behalf Of James Harper
Sent: Saturday, October 16, 2010 6:14 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] custom debug host driver
Is there any way to write your own host driver for kernel debugging? I
want
to provide another communication channel instead of serial, usb, or
firewire.
This would be under Xen so a direct communication channel should be
possible with a minimum of overhead.
Ideally such a solution would be using Microsoft blessed apis/hooks,
but given that it’s a debugger and by definition never used in a
production environment I’m not above doing things under the covers…
Thanks
James
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer