In this post, we’ll look at implementing a simple character device driver as a kernel module in NetBSD. Once it is loaded, userspace processes will be able to
writean arbitrary byte string to the device, and on every successive
readexpect a cryptographically-secure pseudorandom permutation of the original byte string.
IF you’ve always wanted to learn how to write a NetBSD driver, here’s a great starting point.