On Sa, 2014-07-19 at 01:42 -0400, Theodore Ts'o wrote:
> On Sat, Jul 19, 2014 at 01:35:48AM +0200, Hannes Frederic Sowa wrote:
> > > + nfrac = ibytes << (ENTROPY_SHIFT + 3);
> > > + if (entropy_count < 0) {
> >
> > Minor nit: maybe also add an unlikely() here?
>
> Yep, done.
>
> > > + if
On Sa, 2014-07-19 at 01:42 -0400, Theodore Ts'o wrote:
On Sat, Jul 19, 2014 at 01:35:48AM +0200, Hannes Frederic Sowa wrote:
+ nfrac = ibytes (ENTROPY_SHIFT + 3);
+ if (entropy_count 0) {
Minor nit: maybe also add an unlikely() here?
Yep, done.
+ if ((unsigned) entropy_count
On Sat, Jul 19, 2014 at 01:35:48AM +0200, Hannes Frederic Sowa wrote:
> > + nfrac = ibytes << (ENTROPY_SHIFT + 3);
> > + if (entropy_count < 0) {
>
> Minor nit: maybe also add an unlikely() here?
Yep, done.
> > + if ((unsigned) entropy_count > nfrac)
>
> (unsigned) -> (size_t)
>
> size_t
Hi,
On Fr, 2014-07-18 at 18:07 -0400, Theodore Ts'o wrote:
> From: Hannes Frederic Sowa
>
> The expression entropy_count -= ibytes << (ENTROPY_SHIFT + 3) could
> actually increase entropy_count if during assignment of the unsigned
> expression on the RHS (mind the -=) we reduce the value modulo
On Fri, Jul 18, 2014 at 05:25:04PM -0400, Theodore Ts'o wrote:
> > As indicated by credit_entropy_bits entropy_count cannot get negative,
> > so I don't see any reason to include a check for entropy_count < 0
> > here. Do you agree?
>
> No, the check is important; after we subtract ibytes <<
Hi,
On Fri, Jul 18, 2014, at 23:25, Theodore Ts'o wrote:
> On Wed, Jul 16, 2014 at 09:18:15PM +0200, Hannes Frederic Sowa wrote:
> > The expression entropy_count -= ibytes << (ENTROPY_SHIFT + 3) could
> > actually increase entropy_count if during assignment of the unsigned
> > expression on the
On Wed, Jul 16, 2014 at 09:18:15PM +0200, Hannes Frederic Sowa wrote:
> The expression entropy_count -= ibytes << (ENTROPY_SHIFT + 3) could
> actually increase entropy_count if during assignment of the unsigned
> expression on the RHS (mind the -=) we reduce the value modulo
> 2^width(int) and
On Wed, Jul 16, 2014 at 09:18:15PM +0200, Hannes Frederic Sowa wrote:
The expression entropy_count -= ibytes (ENTROPY_SHIFT + 3) could
actually increase entropy_count if during assignment of the unsigned
expression on the RHS (mind the -=) we reduce the value modulo
2^width(int) and assign it
Hi,
On Fri, Jul 18, 2014, at 23:25, Theodore Ts'o wrote:
On Wed, Jul 16, 2014 at 09:18:15PM +0200, Hannes Frederic Sowa wrote:
The expression entropy_count -= ibytes (ENTROPY_SHIFT + 3) could
actually increase entropy_count if during assignment of the unsigned
expression on the RHS (mind
On Fri, Jul 18, 2014 at 05:25:04PM -0400, Theodore Ts'o wrote:
As indicated by credit_entropy_bits entropy_count cannot get negative,
so I don't see any reason to include a check for entropy_count 0
here. Do you agree?
No, the check is important; after we subtract ibytes (ENTROPY_SHIFT
Hi,
On Fr, 2014-07-18 at 18:07 -0400, Theodore Ts'o wrote:
From: Hannes Frederic Sowa han...@stressinduktion.org
The expression entropy_count -= ibytes (ENTROPY_SHIFT + 3) could
actually increase entropy_count if during assignment of the unsigned
expression on the RHS (mind the -=) we
On Sat, Jul 19, 2014 at 01:35:48AM +0200, Hannes Frederic Sowa wrote:
+ nfrac = ibytes (ENTROPY_SHIFT + 3);
+ if (entropy_count 0) {
Minor nit: maybe also add an unlikely() here?
Yep, done.
+ if ((unsigned) entropy_count nfrac)
(unsigned) - (size_t)
size_t could also be
12 matches
Mail list logo