lkml.org 
[lkml]   [2022]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 07/10] random: group entropy collection functions
    On Sat, Feb 12, 2022 at 01:23:15PM +0100, Jason A. Donenfeld wrote:
    > +/**********************************************************************
    > + *
    > + * Entropy collection routines.
    > + *
    > + * The following exported functions are used for pushing entropy into
    > + * the above entropy accumulation routines:
    > + *
    > + * void add_device_randomness(const void *buf, size_t size);
    > + * void add_input_randomness(unsigned int type, unsigned int code,
    > + * unsigned int value);
    > + * void add_interrupt_randomness(int irq);
    > + * void add_disk_randomness(struct gendisk *disk);
    > + * void add_hwgenerator_randomness(const void *buffer, size_t count,
    > + * size_t entropy);
    > + * void add_bootloader_randomness(const void *buf, size_t size);
    > + *
    > + * add_device_randomness() adds data to the input pool that
    > + * is likely to differ between two devices (or possibly even per boot).
    > + * This would be things like MAC addresses or serial numbers, or the
    > + * read-out of the RTC. This does *not* credit any actual entropy to
    > + * the pool, but it initializes the pool to different values for devices
    > + * that might otherwise be identical and have very little entropy
    > + * available to them (particularly common in the embedded world).

    Perhaps this comment should match the order in which these functions are defined
    in the file?

    - Eric

    \
     
     \ /
      Last update: 2022-02-21 06:18    [W:2.228 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site