Mark Kettenis <[email protected]> wrote: > And as I implied, KASSERTs are no-ops in RAMDISK kernels so they don't > stop things going horribly of the rails in that context, whereas a > panic would still happen.
That's an important point, with big consequences. Compile a RAMDISK, and the KASSERT gets removed. Also, SMALL_KERNEL gets set, which changes a large number of low-level configurations. Let's say the bad condition has occured. Now the code runs off the rails, and silently causes other side effects. And now, everyone focuses on the damaging side-effects created as aftermath as the code RETURNS SUCCESFULLY upwards through the kernel from that function into an incoherent machine-state, because the specific condition wasn't detected early and created an immediate verbose stop. Now tell me, how do we debug this? Well, it is not easy. The labour of fixing the ramdisks "SMALL_KERNEL" subset falls upon a smaller group of developers who vaguely understand the constraints but have had the debug logic removed. I suspect that group of developers does not include the people with We Love KASSERT stickers on their laptops...
