Re: [PATCH v2 07/10] random: group entropy collection functions

From: Jason A. Donenfeld
Date: Mon Feb 21 2022 - 10:17:46 EST


On Mon, Feb 21, 2022 at 6:13 AM Eric Biggers <ebiggers@xxxxxxxxxx> wrote:
>
> 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?

Sure. Will do