Re: drivers/char/random.c: more ruminations

From: Theodore Ts'o
Date: Wed Jun 11 2014 - 09:09:35 EST


On Wed, Jun 11, 2014 at 12:34:16AM -0400, George Spelvin wrote:
>
> I haven't got a specific call chain where 128 bytes pushes it
> over a limit. But kernel stack usage is a perennial problem.
> Wasn't there some discussion about that just recenty?
> 6538b8ea8: "x86_64: expand kernel stack to 16K"

Yes, but that was a call path involving file systems
writepage/writepages, block devices, and the writeback code paths.
None of which need random numbers...

> Normally, I just test using modules. Especially when working on a
> driver for a hardware device, virtualization makes life difficult.
> But /dev/random is (for good reasons) not modularizable.

Using virtualization is much faster because you don't have to reboot
your system. And if you want to test what happens to the random
driver at boot time, again, booting a guest kernel under KVM is much
faster, especially if you screw up and the system locks up....

Sure, if you are testing an actual hardware device, it's harder to use
virtualization. But if you are doing any kind of core kernel work
(and /dev/random counts as core kernel), virtualization is really
convenient.

Cheers,

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/