Re: rand() in while in kernel mode

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

 



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. :)

-- 
Join the fight against terrorism by giving up your liberties today!

Attachment: pgp00031.pgp
Description: PGP signature


[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