On Tue, Dec 02, 2014 at 03:43:13AM -0500, George Spelvin wrote:
> rand_read_pos is never more than 16, while there's only 1 flag
> bit allocated, so we can shrink the context a little.
> 
> Signed-off-by: George Spelvin <li...@horizon.com>
> ---
>  crypto/ansi_cprng.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> They're also reordered to avoid alignment holes.
> 
> diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
> index 93ed00f6..f40f54cd 100644
> --- a/crypto/ansi_cprng.c
> +++ b/crypto/ansi_cprng.c
> @@ -51,9 +51,9 @@ struct prng_context {
>       unsigned char rand_data[DEFAULT_BLK_SZ];
>       unsigned char DT[DEFAULT_BLK_SZ];
>       unsigned char V[DEFAULT_BLK_SZ];
> -     u32 rand_read_pos;      /* Offset into rand_data[] */
> +     unsigned char rand_read_pos;    /* Offset into rand_data[] */
u8 please.  Also, not sure if this helps much, as I think the padding will just
get you back to word alignment on each of these.

> +     unsigned char flags;
>       struct crypto_cipher *tfm;
> -     u32 flags;
>  };
>  
>  static int dbg;
> -- 
> 2.1.3
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to