3 ms·
Can you run the kernel on real hardware and debug from another PC (automated, either container or not)? Most of the kernel nightmares I've seen and wanted to de
by nyanpasu64 4y ago
Can you run the kernel on real hardware and debug from another PC (automated, either container or not)? Most of the kernel nightmares I've seen and wanted to debug involve drivers (amdgpu sleep-wake GPU hangs, ALSA USB audio setup, touchpad resolution, display backlight PWM frequency), and containers are insulated from physical hardware by design.
- mikepurvis 4y agoYou probably want kgdboe for this kind of thing? http://sysprogs.com/VisualKernel/kgdboe/ http://sysprogs.com/VisualKernel/kgdboe/ On a embedded targets you'd have a JTAG port for full out of band debugging, but that's obviously not an option for your typical desktop scenario.
- nyanpasu64 4y agoDo I build the kernel on the debugging or victim machine, and do I need to use the same distro on both? Does my kernel configuration have to match the victim machine's distro's default settings? How would I get kernel symbols for binary kernels, or transfer symbols from the victim to debugger machine?
- phendrenad2 4y agoI never understood why there wasn't a cheap raspberry pi like x86 board with JTAG...
- cpgxiii 4y agoThere's an interface for debugging many (not all) Intel machines via USB that's been around for years. Needs to be enabled in firmware first, given the obvious security implications.
- bitwize 4y agoIntel CPUs are higher-than-root exploitable remotely, by design. Closing the USB debugging root hole seems penny-wise and pound-foolish.
- 0xricksanchez 4y agoIn a future (very very very future) PR I'd be interesting exploring this idea of building and pushing stuff to a dev-board and debugging it remotely. However, right now, I don't have any specific use case for this scenario