> Am 06.10.2018 um 10:55 schrieb Consus <con...@ftml.net>: > >> On 23:32 Fri 05 Oct, Reyk Floeter wrote: >> Hi, >> >> it sometimes happens that a VM is stuck in a reboot loop. This isn't >> very pleasent for vmd, so this diff attempts to introduce a hard >> rate-limit: if the VM rebooted after less than VM_START_RATE_SEC (6) >> seconds, increment a counter. If this happens VM_START_RATE_LIMIT (3) >> times in a row, stop the VM. >> >> The idea is that it might be desirable in some cases to reboot quickly >> (you're either really fast on the boot prompt, or you use something >> like grub that can automatically reboot into a previous kernel). But >> if this happens too often (more than 3 times), something is wrong and >> cannot be intended, not even in the worst Linux/grub/unikernel/... >> situation. >> >> These limits are a guessed default. >> >> Test case: I dd'ed random bytes to a kernel after some initial bytes, >> keeping the original size of the kernel. The boot loader loads the >> header, the complete kernel, tries to boot it and *boom*, reset ;) >> >> Comments? Concerns? Better ideas? OKs? >> >> Reyk > > At least there should be an easy way to enable/disable this at will. > This can be troublesome when someone is trying to fix early > not-so-obvious Linux kernel / initrd bugs. Or when testing new kernel > code that sometimes results in a panic. >
Could you explain why? When you debug a kernel bug, why would you want to reboot loop it within a few seconds? And people who use it for fuzzing are able to change the defines and to recompile the code ;-) Reyk