Automatically bisecting the Linux kernel to find a bug (2020)
paulgraydon.co.uk
paulgraydon.co.uk
User-mode Linux is super helpful for diagnosing any pure software kernel bug like this. You don't have to muck with emulators, startup is very fast, and if you need GDB you can use it on the guest kernel like any other C program.
User-mode Linux is a significant enough kernel feature to have its own Wikipedia page: https://en.wikipedia.org/wiki/User-mode_Linux
These instancing / isolation capabilities and interfaces are very Linux-specific. So to run Docker on a non-Linux OS, you need to run Linux in a VM.
If you have a Linux host, I'm not sure why you'd run Docker inside KVM or a user-mode Linux kernel. Wouldn't you rather just run Docker directly inside the host kernel?
For better isolation. Privilege escalation would only affect the user mode kernel.
When I need to analyze bisect results myself in such a situation, I usually just do it like
(cd src; patch < needed_patches && make && do_the_test; git reset --hard)
git bisect good (or bad or skip it patches failed to apply)
and repeat those from my command line history as needed. I think it works out fine.
Git bisect can also dig inside merges, which I think would be a bit more annoying with just a list of commits.
I've done it more times than I would like to but would take advantage of the "git blame" when I had a fair idea of the effected area to narrow down results.
This is great for automating that process. Super nice article
https://news.ycombinator.com/item?id=36325986
Both are phenomenally fantastic feats.