<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/net/mac80211/aes_ccm.c, branch docs-5.3</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-5.3</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-5.3'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2017-10-11T07:37:35+00:00</updated>
<entry>
<title>mac80211: aead api to reduce redundancy</title>
<updated>2017-10-11T07:37:35+00:00</updated>
<author>
<name>Xiang Gao</name>
<email>qasdfgtyuiop@gmail.com</email>
</author>
<published>2017-10-11T02:31:49+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4133da73067af0417c623eb4ad5e85081ccbf4b4'/>
<id>urn:sha1:4133da73067af0417c623eb4ad5e85081ccbf4b4</id>
<content type='text'>
Currently, the aes_ccm.c and aes_gcm.c are almost line by line copy of
each other. This patch reduce code redundancy by moving the code in these
two files to crypto/aead_api.c to make it a higher level aead api. The
file aes_ccm.c and aes_gcm.c are removed and all the functions there are
now implemented in their headers using the newly added aead api.

Signed-off-by: Xiang Gao &lt;qasdfgtyuiop@gmail.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: move struct aead_req off the stack</title>
<updated>2016-10-17T14:14:04+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2016-10-17T14:05:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f4a067f9ffca603b45f7e82ddd2ba50e5904cea3'/>
<id>urn:sha1:f4a067f9ffca603b45f7e82ddd2ba50e5904cea3</id>
<content type='text'>
Some crypto implementations (such as the generic CCM wrapper in crypto/)
use scatterlists to map fields of private data in their struct aead_req.
This means these data structures cannot live in the vmalloc area, which
means that they cannot live on the stack (with CONFIG_VMAP_STACK.)

This currently occurs only with the generic software implementation, but
the private data and usage is implementation specific, so move the whole
data structures off the stack into heap by allocating every time we need
to use them.

In addition, take care not to put any of our own stack allocations into
scatterlists. This involves reserving some extra room when allocating the
aead_request structures, and referring to those allocations in the scatter-
lists (while copying the data from the stack before the crypto operation)

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: Switch to new AEAD interface</title>
<updated>2015-05-28T03:23:20+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2015-05-27T08:03:50+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=957e0fe6292372460bdace9c2a67a857379ad1db'/>
<id>urn:sha1:957e0fe6292372460bdace9c2a67a857379ad1db</id>
<content type='text'>
This patch makes use of the new AEAD interface which uses a single
SG list instead of separate lists for the AD and plain text.

Tested-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>mac80211: Include crypto/aead.h</title>
<updated>2015-04-23T06:18:11+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2015-04-22T07:06:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d8fe0ddd0256711e9cf2c539e77c341daa0eb2cf'/>
<id>urn:sha1:d8fe0ddd0256711e9cf2c539e77c341daa0eb2cf</id>
<content type='text'>
All users of AEAD should include crypto/aead.h instead of
include/linux/crypto.h.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mac80111: aes_ccm: cleanup ieee80211_aes_key_setup_encrypt()</title>
<updated>2015-03-30T08:40:03+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-03-23T14:08:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=45fd63293a214c48d6d3856bb39cf207a805dfda'/>
<id>urn:sha1:45fd63293a214c48d6d3856bb39cf207a805dfda</id>
<content type='text'>
This code is written using an anti-pattern called "success handling"
which makes it hard to read, especially if you are used to normal kernel
style.  It should instead be written as a list of directives in a row
with branches for error handling.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80111: Add CCMP-256 cipher</title>
<updated>2015-01-27T10:07:35+00:00</updated>
<author>
<name>Jouni Malinen</name>
<email>jouni@qca.qualcomm.com</email>
</author>
<published>2015-01-24T17:52:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2b2ba0db1c820d04d5143452d70012cd44d7b578'/>
<id>urn:sha1:2b2ba0db1c820d04d5143452d70012cd44d7b578</id>
<content type='text'>
This allows mac80211 to configure CCMP-256 to the driver and also use
software-implementation within mac80211 when the driver does not support
this with hardware accelaration.

Signed-off-by: Jouni Malinen &lt;jouni@qca.qualcomm.com&gt;
[squash ccmp256 -&gt; mic_len argument change]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: Fix regression that triggers a kernel BUG with CCMP</title>
<updated>2014-11-06T11:42:22+00:00</updated>
<author>
<name>Ronald Wahl</name>
<email>ronald.wahl@raritan.com</email>
</author>
<published>2014-11-06T10:52:13+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4f031fa9f188b2b0641ac20087d9e16bcfb4e49d'/>
<id>urn:sha1:4f031fa9f188b2b0641ac20087d9e16bcfb4e49d</id>
<content type='text'>
Commit 7ec7c4a9a686c608315739ab6a2b0527a240883c (mac80211: port CCMP to
cryptoapi's CCM driver) introduced a regression when decrypting empty
packets (data_len == 0). This will lead to backtraces like:

(scatterwalk_start) from [&lt;c01312f4&gt;] (scatterwalk_map_and_copy+0x2c/0xa8)
(scatterwalk_map_and_copy) from [&lt;c013a5a0&gt;] (crypto_ccm_decrypt+0x7c/0x25c)
(crypto_ccm_decrypt) from [&lt;c032886c&gt;] (ieee80211_aes_ccm_decrypt+0x160/0x170)
(ieee80211_aes_ccm_decrypt) from [&lt;c031c628&gt;] (ieee80211_crypto_ccmp_decrypt+0x1ac/0x238)
(ieee80211_crypto_ccmp_decrypt) from [&lt;c032ef28&gt;] (ieee80211_rx_handlers+0x870/0x1d24)
(ieee80211_rx_handlers) from [&lt;c0330c7c&gt;] (ieee80211_prepare_and_rx_handle+0x8a0/0x91c)
(ieee80211_prepare_and_rx_handle) from [&lt;c0331260&gt;] (ieee80211_rx+0x568/0x730)
(ieee80211_rx) from [&lt;c01d3054&gt;] (__carl9170_rx+0x94c/0xa20)
(__carl9170_rx) from [&lt;c01d3324&gt;] (carl9170_rx_stream+0x1fc/0x320)
(carl9170_rx_stream) from [&lt;c01cbccc&gt;] (carl9170_usb_tasklet+0x80/0xc8)
(carl9170_usb_tasklet) from [&lt;c00199dc&gt;] (tasklet_hi_action+0x88/0xcc)
(tasklet_hi_action) from [&lt;c00193c8&gt;] (__do_softirq+0xcc/0x200)
(__do_softirq) from [&lt;c0019734&gt;] (irq_exit+0x80/0xe0)
(irq_exit) from [&lt;c0009c10&gt;] (handle_IRQ+0x64/0x80)
(handle_IRQ) from [&lt;c000c3a0&gt;] (__irq_svc+0x40/0x4c)
(__irq_svc) from [&lt;c0009d44&gt;] (arch_cpu_idle+0x2c/0x34)

Such packets can appear for example when using the carl9170 wireless driver
because hardware sometimes generates garbage when the internal FIFO overruns.

This patch adds an additional length check.

Cc: stable@vger.kernel.org
Fixes: 7ec7c4a9a686 ("mac80211: port CCMP to cryptoapi's CCM driver")
Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: remove VLAIS usage from mac80211</title>
<updated>2014-04-09T08:55:27+00:00</updated>
<author>
<name>Jan-Simon Möller</name>
<email>dl9pf@gmx.de</email>
</author>
<published>2014-03-21T06:39:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6e1ee5d2e9e411892b5d84e3ea93e3fc88ac786c'/>
<id>urn:sha1:6e1ee5d2e9e411892b5d84e3ea93e3fc88ac786c</id>
<content type='text'>
Replaced the use of a Variable Length Array In Struct (VLAIS) with a
C99 compliant equivalent. This is the original VLAIS struct.

struct {
	struct aead_request     req;
	u8                      priv[crypto_aead_reqsize(tfm)];
} aead_req;

This patch instead allocates the appropriate amount of memory using a
char array.

The new code can be compiled with both gcc and clang.

Signed-off-by: Jan-Simon Möller &lt;dl9pf@gmx.de&gt;
Signed-off-by: Behan Webster &lt;behanw@converseincode.com&gt;
[small style cleanups]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: port CCMP to cryptoapi's CCM driver</title>
<updated>2013-10-11T13:38:20+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ard.biesheuvel@linaro.org</email>
</author>
<published>2013-10-10T07:55:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7ec7c4a9a686c608315739ab6a2b0527a240883c'/>
<id>urn:sha1:7ec7c4a9a686c608315739ab6a2b0527a240883c</id>
<content type='text'>
Use the generic CCM aead chaining mode driver rather than a local
implementation that sits right on top of the core AES cipher.

This allows the use of accelerated implementations of either
CCM as a whole or the CTR mode which it encapsulates.

Signed-off-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>wireless: move crypto constants to ieee80211.h</title>
<updated>2013-05-16T20:39:41+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2013-05-08T11:09:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4325f6caad98c075b39f0eaaac6693a0dd43f646'/>
<id>urn:sha1:4325f6caad98c075b39f0eaaac6693a0dd43f646</id>
<content type='text'>
mac80211 and the Intel drivers all define crypto
constants, move them to ieee80211.h instead.

Reviewed-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
</feed>
