2007-12-09 01:52:17

by Ted Ts'o

[permalink] [raw]
Subject: Re: [PATCH 6/6] random: improve variable naming, clear extract buffer

On Sat, Dec 08, 2007 at 05:21:00PM -0600, Matt Mackall wrote:
> random: improve variable naming, clear extract buffer
>
> - split the SHA variables apart into hash and workspace
> - rename data to extract
> - wipe extract and workspace after hashing
>
> diff -r 924f9a441236 drivers/char/random.c
> --- a/drivers/char/random.c Sat Dec 08 16:22:29 2007 -0600
> +++ b/drivers/char/random.c Sat Dec 08 16:32:31 2007 -0600
> @@ -461,7 +461,7 @@ static void __add_entropy_words(struct e
> unsigned long flags;
> /* rotate the add pointer more rapidly to span more of the
> * pool on a given add */
> - const int step = 5;
> + const int step = 13;
>
> /* Taps are constant, so we can load them without holding r->lock. */
> tap1 = r->poolinfo->tap1;

This change has nothing to do with the patch comment. If you want to
change the step size from 5 to 13, why not just change patch 5/6 to
just use a step size of 13 from the beginning?

Otherwise, yeah, this patch does make sense.

Acked-by: "Theodore Ts'o" <[email protected]>

- Ted


2007-12-09 05:09:28

by Matt Mackall

[permalink] [raw]
Subject: Re: [PATCH 6/6] random: improve variable naming, clear extract buffer

On Sat, Dec 08, 2007 at 08:51:54PM -0500, Theodore Tso wrote:
> On Sat, Dec 08, 2007 at 05:21:00PM -0600, Matt Mackall wrote:
> > random: improve variable naming, clear extract buffer
> >
> > - split the SHA variables apart into hash and workspace
> > - rename data to extract
> > - wipe extract and workspace after hashing
> >
> > diff -r 924f9a441236 drivers/char/random.c
> > --- a/drivers/char/random.c Sat Dec 08 16:22:29 2007 -0600
> > +++ b/drivers/char/random.c Sat Dec 08 16:32:31 2007 -0600
> > @@ -461,7 +461,7 @@ static void __add_entropy_words(struct e
> > unsigned long flags;
> > /* rotate the add pointer more rapidly to span more of the
> > * pool on a given add */
> > - const int step = 5;
> > + const int step = 13;
> >
> > /* Taps are constant, so we can load them without holding r->lock. */
> > tap1 = r->poolinfo->tap1;
>
> This change has nothing to do with the patch comment. If you want to
> change the step size from 5 to 13, why not just change patch 5/6 to
> just use a step size of 13 from the beginning?

Patch refresh gone wrong.

> Otherwise, yeah, this patch does make sense.

Twice, in fact. This patch as sent won't compile due to an extra &.

--
Mathematics is the supreme nostalgia of our time.