Re: rand() while in kernel mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2002-02-22 at 03:53, Seth Arnold wrote:
> On Thu, Feb 21, 2002 at 08:35:20PM +0200, Tomas Ukkonen wrote:
> > What is a good way to get (quality) random numbers while in a interrupt
> > handler and/or in kernel mode or should I generate them myself?
> 
> Look at get_random_bytes() in devices/char/random.c
> 
> Note that I don't know if this function will block, as /dev/random will,
> or if it will generate entropy-extended bytes, as /dev/urandom will,
> when the entropy pool runs dry.
> 
> You will want to find out for sure before using it. :)

Ok, thanks. I will look at the details myself. :)

-- 
Tomas Ukkonen
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux