All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Horia Geantă" <horia.geanta@freescale.com>
To: Kim Phillips <kim.phillips@freescale.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	<linux-crypto@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Ruchika Gupta <ruchika.gupta@freescale.com>,
	Vakul Garg <vakul@freescale.com>
Subject: Re: [PATCH 01/10] crypto: testmgr - avoid DMA mapping from text, rodata, stack
Date: Wed, 23 Jul 2014 11:49:37 +0300	[thread overview]
Message-ID: <53CF7721.60608@freescale.com> (raw)
In-Reply-To: <20140722173710.d9956cf5b8a9757eab955b9e@freescale.com>

On 7/23/2014 1:37 AM, Kim Phillips wrote:
> On Fri, 11 Jul 2014 15:34:46 +0300
> Horia Geanta <horia.geanta@freescale.com> wrote:
> 
>> +++ b/crypto/testmgr.c
>> @@ -198,13 +198,20 @@ static int __test_hash(struct crypto_ahash *tfm, struct hash_testvec *template,
>>  	const char *algo = crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm));
>>  	unsigned int i, j, k, temp;
>>  	struct scatterlist sg[8];
>> -	char result[64];
>> +	char *result = NULL;
>> +	char *key = NULL;
> 
> these needn't be initialized, here and elsewhere.

I was under the impression that this is needed for kfree on some exit
paths, but indeed it's not the case.

> 
>>  	struct ahash_request *req;
>>  	struct tcrypt_result tresult;
>>  	void *hash_buff;
>>  	char *xbuf[XBUFSIZE];
>>  	int ret = -ENOMEM;
>>  
>> +	result = kmalloc(64, GFP_KERNEL);
> 
> s/64/MAX_DIGEST_SIZE
> 
>> +++ b/crypto/testmgr.h
>> @@ -32,7 +32,7 @@
>>  #define MAX_DIGEST_SIZE		64
>>  #define MAX_TAP			8
>>  
>> -#define MAX_KEYLEN		56
>> +#define MAX_KEYLEN		160
>>  #define MAX_IVLEN		32
> 
> this change could use a blurb in the commit message.

I'll send a v2 only for current patch, if Herbert is ok with this.

> 
> Other than that, this series gets my:
> 
> Acked-by: Kim Phillips <kim.phillips@freescale.com>
> 
> Thanks!

Thanks for reviewing, testing.

Horia

  reply	other threads:[~2014-07-23  8:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 12:34 [PATCH 00/10] CAAM - DMA API fixes Horia Geanta
2014-07-11 12:34 ` [PATCH 01/10] crypto: testmgr - avoid DMA mapping from text, rodata, stack Horia Geanta
2014-07-22 22:37   ` Kim Phillips
2014-07-23  8:49     ` Horia Geantă [this message]
2014-07-23  8:59   ` [PATCH v2 " Horia Geanta
2014-07-23 13:35     ` Herbert Xu
2014-07-11 12:34 ` [PATCH 02/10] crypto: caam - set coherent_dma_mask Horia Geanta
2014-07-11 12:34 ` [PATCH 03/10] crypto: caam - fix typo in dma_mapping_error Horia Geanta
2014-07-11 12:34 ` [PATCH 04/10] crypto: caam - fix "failed to check map error" DMA warnings Horia Geanta
2014-07-11 12:34 ` [PATCH 05/10] crypto: caam - fix DMA unmapping error in hash_digest_key Horia Geanta
2014-07-11 12:34 ` [PATCH 06/10] crypto: caam - fix DMA direction mismatch in ahash_done_ctx_dst Horia Geanta
2014-07-11 12:34 ` [PATCH 07/10] crypto: caam - fix DMA direction mismatch in ahash_done_ctx_src Horia Geanta
2014-07-11 12:34 ` [PATCH 08/10] crypto: caam - fix uninitialized S/G table size in ahash_digest Horia Geanta
2014-07-11 12:34 ` [PATCH 09/10] crypto: caam - fix uninitialized edesc->dst_dma field Horia Geanta
2014-07-11 12:34 ` [PATCH 10/10] crypto: caam - fix uninitialized state->buf_dma field Horia Geanta
2014-07-18 23:04 ` [PATCH 00/10] CAAM - DMA API fixes Kim Phillips
2014-07-19  0:07   ` Horia Geantă

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53CF7721.60608@freescale.com \
    --to=horia.geanta@freescale.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kim.phillips@freescale.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=ruchika.gupta@freescale.com \
    --cc=vakul@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.