Ethernet over USB kernel debugging

There was a similar topic here https://community.osr.com/discussion/258914/kdnet-on-a-usb-nic but the circumstances have changed enough in the 5 years since that thread that I think a new post isn’t unwarranted.

I am trying to debug a specific laptop target that has no ethernet port (and its wireless adapter is not on the MSDN supported NIC list). The target is running a recent Windows 10, and Win10 doesn’t support any kernel debugging but ethernet after version 1607. It has a thunderbolt port and usb ports. I have normally been debugging via a supported ethernet adapter in an eGPU enclosure connected by thunderbolt, but unfortunately what I’m trying to debug now is related to hotplugging that thunderbolt port, so this does not work in this scenario.

So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I’ve tried searching for NICs by their device id / product ID in the list but haven’t really had any luck with this.

Thanks,
-Ben

Ben_English wrote:

I am trying to debug a specific laptop target that has no ethernet port (and its wireless adapter is not on the MSDN supported NIC list). The target is running a recent Windows 10, and Win10 doesn’t support any kernel debugging but ethernet after version 1607.

What??  Is that true?  I had heard 1394 was dropped, but were USB and
RS232 also dropped?

So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I’ve tried searching for NICs by their device id / product ID in the list but haven’t really had any luck with this.

I seriously doubt it.  As I’ve said before, the kernel debugger (the
part that’s in the kernel) does not use operating system drivers.  It
has its own separate corral of drivers, so that it isn’t affected by
driver issues.  It doesn’t have a general purpose USB stack – USB
debugging uses a “back door” mechanism that goes straight to the HCI. 
Thus, it seems very unlikely they can drive enough of USB to enumerate,
configure, and drive a USB NIC.

Win10 doesn’t support any kernel debugging but ethernet after version 1607

Not true. Why do you say that?

Peter

@Tim_Roberts said:

…and Win10 doesn’t support any kernel debugging but ethernet after version 1607.

What?? Is that true? I had heard 1394 was dropped, but were USB and
RS232 also dropped?

@“Peter_Viscarola_(OSR)” said:

Win10 doesn’t support any kernel debugging but ethernet after version 1607

Not true. Why do you say that?

Peter

Ah, because I apparently misread the documentation! Thanks for pointing this out. I pretty much exclusively used 1394 until this change, and then switched to ethernet. I guess I need to acquire an appropriate USB cable to debug this.

Well, I may have spoken too soon. It appears that neither of the USB ports on this laptop are debug capable according to usbview. It of course has no serial ports. Am I out of options?

@Tim_Roberts said:

So, does anyone know if the updated supported NIC list yet contains any USB-ethernet NICs that I could buy for this purpose? I’ve tried searching for NICs by their device id / product ID in the list but haven’t really had any luck with this.
I seriously doubt it. As I’ve said before, the kernel debugger (the part that’s in the kernel) does not use operating system drivers. It has its own separate corral of drivers, so that it isn’t affected by driver issues. It doesn’t have a general purpose USB stack – USB debugging uses a “back door” mechanism that goes straight to the HCI. Thus, it seems very unlikely they can drive enough of USB to enumerate, configure, and drive a USB NIC.

Hmm, that’s good to know. I am able to use an ethernet port on a connected thunderbolt device for kernel debugging, I wonder how that works? It seems likely that it must use OS drivers - I doubt there is a kernel debug specific thunderbolt driver. Unfortunately I don’t have a second thunderbolt port with which to debug the first one, so I think I’m still out of luck. Are there any other options? The only other ports on this thing are audio, SD card, and HDMI…

Ben_English wrote:

Hmm, that’s good to know. I am able to use an ethernet port on a connected thunderbolt device for kernel debugging, I wonder how that works? It seems likely that it must use OS drivers - I doubt there is a kernel debug specific thunderbolt driver.

Because Thunderbolt 3 is essentially just PCIExpress over a wire.  No
drivers are required.  The hardware magically makes it look like PCIExpress.

Unfortunately I don’t have a second thunderbolt port with which to debug the first one, so I think I’m still out of luck. Are there any other options? The only other ports on this thing are audio, SD card, and HDMI…

Not really. There is probably a header on the motherboard that exposes a
debug-capable port, like an RS232 header, but unless you’re in the
factory, there’s probably no way to get at it.