Re: [PATCH] random: fix crash on multiple early calls to add_bootloader_randomness()

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

 



Am Wed, Nov 03, 2021 at 08:27:39AM +0100 schrieb Ard Biesheuvel:
> > > > -       if (unlikely(crng_init == 0)) {
> > > > +       /* We cannot do much with the input pool until it is set up in
> > > > +        * rand_initalize(); therefore just mix into the crng state.
> > > > +        * As this does not affect the input pool, we cannot credit
> > > > +        * entropy for this.
> > > > +        */
> > > > +       if (unlikely(crng_init == 0) || unlikely(crng_global_init_time == 0)) {
> > >
> > > Can we just drop the unlikely()s here?
> >
> > As that would be a different change to the one necessary to resolve the bug,
> > I'd like to defer that decision to the maintainer of random.c.
> >
> 
> In that case, can we at least using a single unlikely() for the whole condition?

Fixed for v3.

Thanks,
	Dominik



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux