<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/crypto/n2_core.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-01-07T11:07:37Z</updated>
<entry>
<title>crypto: n2 - add missing hash statesize</title>
<updated>2023-01-07T11:07:37Z</updated>
<author>
<name>Corentin Labbe</name>
</author>
<published>2022-10-06T04:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be61cadc7c18e2199892da11b09c34e050528be7'/>
<id>urn:sha1:be61cadc7c18e2199892da11b09c34e050528be7</id>
<content type='text'>
commit 76a4e874593543a2dff91d249c95bac728df2774 upstream.

Add missing statesize to hash templates.
This is mandatory otherwise no algorithms can be registered as the core
requires statesize to be set.

CC: stable@kernel.org # 4.3+
Reported-by: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Tested-by: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Fixes: 0a625fd2abaa ("crypto: n2 - Add Niagara2 crypto driver")
Signed-off-by: Corentin Labbe &lt;clabbe@baylibre.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>crypto: n2 - cure use after free</title>
<updated>2018-01-10T08:29:51Z</updated>
<author>
<name>Jan Engelhardt</name>
</author>
<published>2017-12-19T18:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6db86f31b47a630134689fe1e425b78e6626c22'/>
<id>urn:sha1:f6db86f31b47a630134689fe1e425b78e6626c22</id>
<content type='text'>
commit 203f45003a3d03eea8fa28d74cfc74c354416fdb upstream.

queue_cache_init is first called for the Control Word Queue
(n2_crypto_probe). At that time, queue_cache[0] is NULL and a new
kmem_cache will be allocated. If the subsequent n2_register_algs call
fails, the kmem_cache will be released in queue_cache_destroy, but
queue_cache_init[0] is not set back to NULL.

So when the Module Arithmetic Unit gets probed next (n2_mau_probe),
queue_cache_init will not allocate a kmem_cache again, but leave it
as its bogus value, causing a BUG() to trigger when queue_cache[0] is
eventually passed to kmem_cache_zalloc:

	n2_crypto: Found N2CP at /virtual-devices@100/n2cp@7
	n2_crypto: Registered NCS HVAPI version 2.0
	called queue_cache_init
	n2_crypto: md5 alg registration failed
	n2cp f028687c: /virtual-devices@100/n2cp@7: Unable to register algorithms.
	called queue_cache_destroy
	n2cp: probe of f028687c failed with error -22
	n2_crypto: Found NCP at /virtual-devices@100/ncp@6
	n2_crypto: Registered NCS HVAPI version 2.0
	called queue_cache_init
	kernel BUG at mm/slab.c:2993!
	Call Trace:
	 [0000000000604488] kmem_cache_alloc+0x1a8/0x1e0
                  (inlined) kmem_cache_zalloc
                  (inlined) new_queue
                  (inlined) spu_queue_setup
                  (inlined) handle_exec_unit
	 [0000000010c61eb4] spu_mdesc_scan+0x1f4/0x460 [n2_crypto]
	 [0000000010c62b80] n2_mau_probe+0x100/0x220 [n2_crypto]
	 [000000000084b174] platform_drv_probe+0x34/0xc0

Signed-off-by: Jan Engelhardt &lt;jengelh@inai.de&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto: n2 - Remove return statement from void function</title>
<updated>2016-04-05T12:35:44Z</updated>
<author>
<name>Amitoj Kaur Chawla</name>
</author>
<published>2016-03-18T13:38:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=150f6d457cfcb37646b026251d8a584978618726'/>
<id>urn:sha1:150f6d457cfcb37646b026251d8a584978618726</id>
<content type='text'>
Return statement at the end of a void function is useless.

The Coccinelle semantic patch used to make this change is as follows:
//&lt;smpl&gt;
@@
identifier f;
expression e;
@@
void f(...) {
&lt;...
- return
  e;
...&gt;
}
//&lt;/smpl&gt;

Signed-off-by: Amitoj Kaur Chawla &lt;amitoj1606@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: n2 - Use precalculated hash from headers</title>
<updated>2015-12-22T12:43:37Z</updated>
<author>
<name>LABBE Corentin</name>
</author>
<published>2015-12-17T12:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8054b8005b9f5ae172dac79a49370bfcc027a0f5'/>
<id>urn:sha1:8054b8005b9f5ae172dac79a49370bfcc027a0f5</id>
<content type='text'>
Precalculated hash for empty message are now present in hash headers.
This patch just use them.

Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: n2 - Use platform_register/unregister_drivers()</title>
<updated>2015-12-04T14:29:57Z</updated>
<author>
<name>Thierry Reding</name>
</author>
<published>2015-12-02T16:16:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a103a75ad978592cf71b6d42c05849aacc76c2da'/>
<id>urn:sha1:a103a75ad978592cf71b6d42c05849aacc76c2da</id>
<content type='text'>
These new helpers simplify implementing multi-driver modules and
properly handle failure to register one driver by unregistering all
previously registered drivers.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Acked-by: 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: n2 - set array of const as const</title>
<updated>2015-10-15T13:05:20Z</updated>
<author>
<name>LABBE Corentin</name>
</author>
<published>2015-10-14T19:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50826874f059af9a7f1ed748528f68ea92d5039c'/>
<id>urn:sha1:50826874f059af9a7f1ed748528f68ea92d5039c</id>
<content type='text'>
Some array of const char are not set as const.
This patch fix that.

Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mvebu/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc</title>
<updated>2015-06-19T14:07:07Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2015-06-19T14:07:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0b59fafe31bf91f589736be304d739b13952fdd'/>
<id>urn:sha1:c0b59fafe31bf91f589736be304d739b13952fdd</id>
<content type='text'>
Merge the mvebu/drivers branch of the arm-soc tree which contains
just a single patch bfa1ce5f38938cc9e6c7f2d1011f88eba2b9e2b2 ("bus:
mvebu-mbus: add mv_mbus_dram_info_nooverlap()") that happens to be
a prerequisite of the new marvell/cesa crypto driver.
</content>
</entry>
<entry>
<title>crypto: n2 - use md5 IV MD5_HX instead of their raw value</title>
<updated>2015-05-18T04:20:20Z</updated>
<author>
<name>LABBE Corentin</name>
</author>
<published>2015-05-17T10:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0bb9ee316b0c1a22fc3b9e6d1fef1e4521cbf5e'/>
<id>urn:sha1:d0bb9ee316b0c1a22fc3b9e6d1fef1e4521cbf5e</id>
<content type='text'>
Since MD5 IV are now available in crypto/md5.h, use them.

Signed-off-by: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>drivers: fix up obsolete cpu function usage.</title>
<updated>2015-03-05T03:07:02Z</updated>
<author>
<name>Rusty Russell</name>
</author>
<published>2015-03-05T00:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9b531fe14a539ec2ad802b73c9638f324e4a4ff'/>
<id>urn:sha1:f9b531fe14a539ec2ad802b73c9638f324e4a4ff</id>
<content type='text'>
Thanks to spatch, plus manual removal of "&amp;*".  Then a sweep for
for_each_cpu_mask =&gt; for_each_cpu.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Chris Metcalf &lt;cmetcalf@ezchip.com&gt;
Cc: netdev@vger.kernel.org
</content>
</entry>
<entry>
<title>crypto: drop owner assignment from platform_drivers</title>
<updated>2014-10-20T14:20:25Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2014-10-20T14:20:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5573bc03c63e4be7de501a91cca2acc5a44ec4dd'/>
<id>urn:sha1:5573bc03c63e4be7de501a91cca2acc5a44ec4dd</id>
<content type='text'>
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
</feed>
