Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Browse files Browse the repository at this point in the history
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - Crash in caam hash due to uninitialised buffer lengths.

   - Alignment issue in caam RNG that may lead to non-random output"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: caam - fix RNG buffer cache alignment
  crypto: caam - improve initalization for context state saves
  • Loading branch information
Linus Torvalds committed Jun 18, 2015
2 parents 66fc130 + 412c98c commit 49fe9bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions drivers/crypto/caam/caamhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,8 @@ static int ahash_init(struct ahash_request *req)

state->current_buf = 0;
state->buf_dma = 0;
state->buflen_0 = 0;
state->buflen_1 = 0;

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/crypto/caam/caamrng.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

/* Buffer, its dma address and lock */
struct buf_data {
u8 buf[RN_BUF_SIZE];
u8 buf[RN_BUF_SIZE] ____cacheline_aligned;
dma_addr_t addr;
struct completion filled;
u32 hw_desc[DESC_JOB_O_LEN];
Expand Down

0 comments on commit 49fe9bc

Please sign in to comment.