lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9qQoHnT+ewe3Nz-ZTmCuLAtNk6=-Lzdb_puhz1ZgBHMfA@mail.gmail.com>
Date:   Fri, 14 Jan 2022 16:46:37 +0100
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     David Laight <David.Laight@...lab.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tytso@....edu" <tytso@....edu>
Subject: Re: [PATCH] random: cleanup fractional entropy shift constants

On Fri, Jan 14, 2022 at 4:39 PM David Laight <David.Laight@...lab.com> wrote:
>
> From: Jason A. Donenfeld
> > Sent: 14 January 2022 15:33
> >
> > The entropy estimator is calculated in terms of 1/8 bits, which means
> > there are various constants where things are shifted by 3. Move these
> > into our pool info enum with the other relevant constants, and normalize
> > the name a bit, prepending a POOL_ like the rest. While we're at it,
> > move an English assertion about sizes into a proper BUILD_BUG_ON so
> > that the compiler can ensure this invariant.
> >
> ...
> > -#define ENTROPY_SHIFT 3
> > -#define ENTROPY_BITS() (input_pool.entropy_count >> ENTROPY_SHIFT)
> ..
> > +     POOL_ENTROPY_SHIFT = 3,
> > +#define POOL_ENTROPY_BITS() (input_pool.entropy_count >> POOL_ENTROPY_SHIFT)
>
> The rename ought to be a different patch.

I can certainly do that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ