Is there a rand() equivalent function in Linux that I can call in kernel space i.e. say from inside a kernel module ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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