lkml.org 
[lkml]   [2018]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 17/18] crypto: talitos - chain in buffered data for ahash on SEC1
Date
On 10/6/2017 4:05 PM, Christophe Leroy wrote:
[...]
> @@ -1778,6 +1814,36 @@ static int common_nonsnoop_hash(struct talitos_edesc *edesc,
> if (is_sec1 && from_talitos_ptr_len(&desc->ptr[3], true) == 0)
> talitos_handle_buggy_hash(ctx, edesc, &desc->ptr[3]);
>
> + if (is_sec1 && req_ctx->nbuf && length) {
> + struct talitos_desc *desc2 = desc + 1;
> + dma_addr_t next_desc;
[...]
> + next_desc = dma_map_single(dev, &desc2->hdr1, TALITOS_DESC_SIZE,
> + DMA_BIDIRECTIONAL);
> + desc->next_desc = cpu_to_be32(next_desc);
Where is desc->next_desc initialized for the !is_sec1 case?
Memory allocation is done using kmalloc(), and since desc->next_desc is checked
in some cases also for SEC 2.x+, it should be initialized to 0.

Thanks,
Horia


\
 
 \ /
  Last update: 2018-03-02 18:28    [W:0.180 / U:0.568 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site