lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150305182814.4a34d15df2638da5f20d1d29@freescale.com>
Date:	Thu, 5 Mar 2015 18:28:14 -0600
From:	Kim Phillips <kim.phillips@...escale.com>
To:	yjin <yanjiang.jin@...driver.com>
CC:	<horia.geanta@...escale.com>, <herbert@...dor.apana.org.au>,
	<davem@...emloft.net>, <ruchika.gupta@...escale.com>,
	<cristian.stoica@...escale.com>, <NiteshNarayanLal@...escale.com>,
	<linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<jinyanjiang@...il.com>
Subject: Re: [PATCH 2/3] crypto: caam_rng: fix rng_unmap_ctx's DMA_UNMAP
 size problem

On Thu, 5 Mar 2015 10:52:37 +0800
yjin <yanjiang.jin@...driver.com> wrote:

> On 2015年03月05日 02:36, Kim Phillips wrote:
> > On Wed, 4 Mar 2015 13:33:22 +0800
> > yjin <yanjiang.jin@...driver.com> wrote:
> >
> >> On 2015年03月04日 03:31, Kim Phillips wrote:
> >>> On Tue, 3 Mar 2015 14:50:52 +0800
> >>> <yanjiang.jin@...driver.com> wrote:
> >>>
> >>>> -		dma_unmap_single(jrdev, ctx->sh_desc_dma, DESC_RNG_LEN,
> >>>> -				 DMA_TO_DEVICE);
> >>>> +		dma_unmap_single(jrdev, ctx->sh_desc_dma,
> >>>> +				desc_bytes(ctx->sh_desc), DMA_TO_DEVICE);
> >>> alignment: the 'd' in desc_bytes should fall directly under the 'j'
> >>> in jrdev.
> >>>
> >>> Also, DESC_RNG_LEN should be corrected to (4 * CAAM_CMD_SZ).
> >>
> >> I can't find the obvious limitation for the RNG descriptor length in
> >> Freescale documents, could you point out it?
> > ?  rng_create_sh_desc() creates a fixed descriptor of exactly 4
> > command-lengths.
> 
> Do you mean that the code itself limits the descriptor length? Not a 
> hardware limitation.

the code writes descriptors such that they don't reach h/w
limitations.

> If so, I prefer to dma_unmap with desc_bytes(ctx->sh_desc) as my 
> previous patch, and correct DESC_RNG_LEN to (4 * CAAM_CMD_SZ).

please.

Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ