<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/crypto, branch v4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-08-13T07:08:25Z</updated>
<entry>
<title>crypto: caam - fix memory corruption in ahash_final_ctx</title>
<updated>2015-08-13T07:08:25Z</updated>
<author>
<name>Horia Geant?</name>
<email>horia.geanta@freescale.com</email>
</author>
<published>2015-08-11T17:19:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b310c178e6d897f82abb9da3af1cd7c02b09f592'/>
<id>urn:sha1:b310c178e6d897f82abb9da3af1cd7c02b09f592</id>
<content type='text'>
When doing pointer operation for accessing the HW S/G table,
a value representing number of entries (and not number of bytes)
must be used.

Cc: &lt;stable@vger.kernel.org&gt; # 3.6+
Fixes: 045e36780f115 ("crypto: caam - ahash hmac support")
Signed-off-by: Horia Geant? &lt;horia.geanta@freescale.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: nx - respect sg limit bounds when building sg lists for SHA</title>
<updated>2015-08-11T14:02:57Z</updated>
<author>
<name>Jan Stancek</name>
<email>jstancek@redhat.com</email>
</author>
<published>2015-08-08T06:47:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3392f41f6d3cd0a034bd0aca47fabea2b47218e'/>
<id>urn:sha1:d3392f41f6d3cd0a034bd0aca47fabea2b47218e</id>
<content type='text'>
Commit 000851119e80 changed sha256/512 update functions to
pass more data to nx_build_sg_list(), which ends with
sg list overflows and usually with update functions failing
for data larger than max_sg_len * NX_PAGE_SIZE.

This happens because:
- both "total" and "to_process" are updated, which leads to
  "to_process" getting overflowed for some data lengths
  For example:
    In first iteration "total" is 50, and let's assume "to_process"
    is 30 due to sg limits. At the end of first iteration "total" is
    set to 20. At start of 2nd iteration "to_process" overflows on:
      to_process = total - to_process;
- "in_sg" is not reset to nx_ctx-&gt;in_sg after each iteration
- nx_build_sg_list() is hitting overflow because the amount of data
  passed to it would require more than sgmax elements
- as consequence of previous item, data stored in overflowed sg list
  may no longer be aligned to SHA*_BLOCK_SIZE

This patch changes sha256/512 update functions so that "to_process"
respects sg limits and never tries to pass more data to
nx_build_sg_list() to avoid overflows. "to_process" is calculated
as minimum of "total" and sg limits at start of every iteration.

Fixes: 000851119e80 ("crypto: nx - Fix SHA concurrence issue and sg
		      limit bounds")
Signed-off-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Cc: stable@vger.kernel.org
Cc: Leonidas Da Silva Barbosa &lt;leosilva@linux.vnet.ibm.com&gt;
Cc: Marcelo Henrique Cerri &lt;mhcerri@linux.vnet.ibm.com&gt;
Cc: Fionnuala Gunter &lt;fin@linux.vnet.ibm.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: ixp4xx - Remove bogus BUG_ON on scattered dst buffer</title>
<updated>2015-07-23T10:09:18Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2015-07-22T10:05:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f898c522f0e9ac9f3177d0762b76e2ab2d2cf9c0'/>
<id>urn:sha1:f898c522f0e9ac9f3177d0762b76e2ab2d2cf9c0</id>
<content type='text'>
This patch removes a bogus BUG_ON in the ablkcipher path that
triggers when the destination buffer is different from the source
buffer and is scattered.

Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: qat - Fix invalid synchronization between register/unregister sym algs</title>
<updated>2015-07-23T10:09:17Z</updated>
<author>
<name>Tadeusz Struk</name>
<email>tadeusz.struk@intel.com</email>
</author>
<published>2015-07-22T05:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f043b50da8e03bdcc5703fd37ea45bc6892432f'/>
<id>urn:sha1:6f043b50da8e03bdcc5703fd37ea45bc6892432f</id>
<content type='text'>
The synchronization method used atomic was bogus.
Use a proper synchronization with mutex.

Cc: stable@vger.kernel.org
Signed-off-by: Tadeusz Struk &lt;tadeusz.struk@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: nx - Fix reentrancy bugs</title>
<updated>2015-07-08T07:14:13Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2015-07-07T09:30:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=030f4e968741d65aea9cd5f7814d1164967801ef'/>
<id>urn:sha1:030f4e968741d65aea9cd5f7814d1164967801ef</id>
<content type='text'>
This patch fixes a host of reentrancy bugs in the nx driver.  The
following algorithms are affected:

* CCM
* GCM
* CTR
* XCBC
* SHA256
* SHA512

The crypto API allows a single transform to be used by multiple
threads simultaneously.  For example, IPsec will use a single tfm
to process packets for a given SA.  As packets may arrive on
multiple CPUs that tfm must be reentrant.

The nx driver does try to deal with this by using a spin lock.
Unfortunately only the basic AES/CBC/ECB algorithms do this in
the correct way.

The symptom of these bugs may range from the generation of incorrect
output to memory corruption.

Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: omap-des - Fix unmapping of dma channels</title>
<updated>2015-07-06T08:20:37Z</updated>
<author>
<name>Vutla, Lokesh</name>
<email>lokeshvutla@ti.com</email>
</author>
<published>2015-07-02T13:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=acb33cc541d7a5495b16a133702d4c401ea4e294'/>
<id>urn:sha1:acb33cc541d7a5495b16a133702d4c401ea4e294</id>
<content type='text'>
dma_unmap_sg() is being called twice after completing the
task. Looks like this is a copy paste error when creating
des driver.
With this the following warn appears during boot:

[    4.210457] ------------[ cut here ]------------
[    4.215114] WARNING: CPU: 0 PID: 0 at lib/dma-debug.c:1080 check_unmap+0x710/0x9a0()
[    4.222899] omap-des 480a5000.des: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000000ab2ce000] [size=8 bytes]
[    4.236785] Modules linked in:
[    4.239860] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.39-02999-g1bc045a-dirty #182
[    4.247918] [&lt;c001678c&gt;] (unwind_backtrace) from [&lt;c0012574&gt;] (show_stack+0x10/0x14)
[    4.255710] [&lt;c0012574&gt;] (show_stack) from [&lt;c05a37e8&gt;] (dump_stack+0x84/0xb8)
[    4.262977] [&lt;c05a37e8&gt;] (dump_stack) from [&lt;c0046464&gt;] (warn_slowpath_common+0x68/0x8c)
[    4.271107] [&lt;c0046464&gt;] (warn_slowpath_common) from [&lt;c004651c&gt;] (warn_slowpath_fmt+0x30/0x40)
[    4.279854] [&lt;c004651c&gt;] (warn_slowpath_fmt) from [&lt;c02d50a4&gt;] (check_unmap+0x710/0x9a0)
[    4.287991] [&lt;c02d50a4&gt;] (check_unmap) from [&lt;c02d5478&gt;] (debug_dma_unmap_sg+0x90/0x19c)
[    4.296128] [&lt;c02d5478&gt;] (debug_dma_unmap_sg) from [&lt;c04a77d8&gt;] (omap_des_done_task+0x1cc/0x3e4)
[    4.304963] [&lt;c04a77d8&gt;] (omap_des_done_task) from [&lt;c004a090&gt;] (tasklet_action+0x84/0x124)
[    4.313370] [&lt;c004a090&gt;] (tasklet_action) from [&lt;c004a4ac&gt;] (__do_softirq+0xf0/0x20c)
[    4.321235] [&lt;c004a4ac&gt;] (__do_softirq) from [&lt;c004a840&gt;] (irq_exit+0x98/0xec)
[    4.328500] [&lt;c004a840&gt;] (irq_exit) from [&lt;c000f9ac&gt;] (handle_IRQ+0x50/0xb0)
[    4.335589] [&lt;c000f9ac&gt;] (handle_IRQ) from [&lt;c0008688&gt;] (gic_handle_irq+0x28/0x5c)

Removing the duplicate call to dma_unmap_sg().

Cc: stable@vger.kernel.org
Reported-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: marvell/cesa - another fix up for of_get_named_gen_pool() rename</title>
<updated>2015-07-03T18:37:02Z</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2015-07-03T03:49:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a8011cb896ed9822ca9086cf9c4d4c5db16be64'/>
<id>urn:sha1:5a8011cb896ed9822ca9086cf9c4d4c5db16be64</id>
<content type='text'>
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'akpm' (patches from Andrew)</title>
<updated>2015-07-02T00:47:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-07-02T00:47:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d01eedf1d14432f4db5388a49dc5596a8c5bd02'/>
<id>urn:sha1:2d01eedf1d14432f4db5388a49dc5596a8c5bd02</id>
<content type='text'>
Merge third patchbomb from Andrew Morton:

 - the rest of MM

 - scripts/gdb updates

 - ipc/ updates

 - lib/ updates

 - MAINTAINERS updates

 - various other misc things

* emailed patches from Andrew Morton &lt;akpm@linux-foundation.org&gt;: (67 commits)
  genalloc: rename of_get_named_gen_pool() to of_gen_pool_get()
  genalloc: rename dev_get_gen_pool() to gen_pool_get()
  x86: opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit
  MAINTAINERS: add zpool
  MAINTAINERS: BCACHE: Kent Overstreet has changed email address
  MAINTAINERS: move Jens Osterkamp to CREDITS
  MAINTAINERS: remove unused nbd.h pattern
  MAINTAINERS: update brcm gpio filename pattern
  MAINTAINERS: update brcm dts pattern
  MAINTAINERS: update sound soc intel patterns
  MAINTAINERS: remove website for paride
  MAINTAINERS: update Emulex ocrdma email addresses
  bcache: use kvfree() in various places
  libcxgbi: use kvfree() in cxgbi_free_big_mem()
  target: use kvfree() in session alloc and free
  IB/ehca: use kvfree() in ipz_queue_{cd}tor()
  drm/nouveau/gem: use kvfree() in u_free()
  drm: use kvfree() in drm_free_large()
  cxgb4: use kvfree() in t4_free_mem()
  cxgb3: use kvfree() in cxgb_free_mem()
  ...
</content>
</entry>
<entry>
<title>genalloc: rename of_get_named_gen_pool() to of_gen_pool_get()</title>
<updated>2015-07-01T02:45:01Z</updated>
<author>
<name>Vladimir Zapolskiy</name>
<email>vladimir_zapolskiy@mentor.com</email>
</author>
<published>2015-06-30T22:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=abdd4a7025282fbe3737e1bcb5f51afc8d8ea1b8'/>
<id>urn:sha1:abdd4a7025282fbe3737e1bcb5f51afc8d8ea1b8</id>
<content type='text'>
To be consistent with other kernel interface namings, rename
of_get_named_gen_pool() to of_gen_pool_get().  In the original function
name "_named" suffix references to a device tree property, which contains
a phandle to a device and the corresponding device driver is assumed to
register a gen_pool object.

Due to a weak relation and to avoid any confusion (e.g.  in future
possible scenario if gen_pool objects are named) the suffix is removed.

[sfr@canb.auug.org.au: crypto/marvell/cesa - fix up for of_get_named_gen_pool() rename]
Signed-off-by: Vladimir Zapolskiy &lt;vladimir_zapolskiy@mentor.com&gt;
Cc: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Cc: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Cc: Shawn Guo &lt;shawn.guo@linaro.org&gt;
Cc: Sascha Hauer &lt;kernel@pengutronix.de&gt;
Cc: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Cc: Vinod Koul &lt;vinod.koul@intel.com&gt;
Cc: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Jaroslav Kysela &lt;perex@perex.cz&gt;
Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Boris BREZILLON &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>crypto: qat - Deletion of unnecessary checks before two function calls</title>
<updated>2015-06-29T08:06:29Z</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2015-06-26T18:30:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=12a4bd3122747eae2941f0be38119affb52c2e12'/>
<id>urn:sha1:12a4bd3122747eae2941f0be38119affb52c2e12</id>
<content type='text'>
The functions kfree() and release_firmware() test whether their argument
is NULL and then return immediately.
Thus the test around the calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
