Is there a rand() equivalent function in Linux that I can call in kernel space i.e. say from inside a kernel module ?
The get_random_bytes()
routine returns the requested number of random bytes and stores them in a buffer. This routine is for kernel modules that cannot be in a wait state.
http://www.linuxquestions.org/questions/programming-9/random-numbers-kernel-642087/
http://www.spinics.net/lists/newbies/msg00062.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With