History log of /net/mac802154/llsec.c
Revision Date Author Comments
4710d806fcb825156e0a7b3a81104915c5e90f5d 02-Jul-2014 Varka Bhadram <varkabhadram@gmail.com> 6lowpan: mac802154: fix coding style issues

This patch fixed the coding style issues reported by checkpatch.pl

following issues fixed:
CHECK: Alignment should match open parenthesis
WARNING: line over 80 characters
CHECK: Blank lines aren't necessary before a close brace '}'
WARNING: networking block comments don't use an empty /* line, use /* Comment...
WARNING: Missing a blank line after declarations
WARNING: networking block comments start with * on subsequent lines
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Varka Bhadram <varkab@cdac.in>
Tested-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
fff1f59b1773fcbb563c503ad9c7ace54062144b 06-Jun-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> mac802154: llsec: add forgotten list_del_rcu in key removal

During key removal, the key object is freed, but not taken out of the
llsec key list properly. Fix that.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
53819a6ced288a9abd3c0d36895bd0d006edf093 20-May-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> mac802154: llsec: correctly lookup implicit-indexed keys

Key id comparison for type 1 keys (implicit source, with index) should
return true if mode and id are equal, not false.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
62e9c117eec56a3c9611613a3aa90c9671244d33 20-May-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> mac802154: llsec: fold useless return value check

llsec_do_encrypt will never return a positive value, so the restriction
to 0-or-negative on return is useless.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
6f3eabcd041aa062cfabd2fc62194a33b507f51c 20-May-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> mac802154: llsec: fix incorrect lock pairing

In encrypt, sec->lock is taken with read_lock_bh, so in the error path,
we must read_unlock_bh.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f0f77dc6be76ed1854b08688390e156e4b351ab5 16-May-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> ieee802154, mac802154: implement devkey record option

The 802.15.4-2011 standard states that for each key, a list of devices
that use this key shall be kept. Previous patches have only considered
two options:

* a device "uses" (or may use) all keys, rendering the list useless
* a device is restricted to a certain set of keys

Another option would be that a device *may* use all keys, but need not
do so, and we are interested in the actual set of keys the device uses.
Recording keys used by any given device may have a noticable performance
impact and might not be needed as often. The common case, in which a
device will not switch keys too often, should still perform well.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
4c14a2fb5d143e4ed94143be2b8c1961b47df9af 16-May-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> mac802154: add llsec decryption method

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
03556e4d0dbbbf4af9df76f4a3839c86f6afb015 16-May-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> mac802154: add llsec encryption method

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
5d637d5aabd85132bd85779677d8acb708e0ed90 16-May-2014 Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de> mac802154: add llsec structures and mutators

This patch adds containers and mutators for the major ieee802154_llsec
structures to mac802154. Most of the (rather simple) ieee802154_llsec
structs are wrapped only to provide an rcu_head for orderly disposal,
but some structs - llsec keys notably - require more complex
bookkeeping.

Since each llsec key may be referenced by a number of llsec key table
entries (with differing key ids, but the same actual key), we want to
save memory and not allocate crypto transforms for each entry in the
table. Thus, the mac802154 llsec key is reference-counted instead.
Further, each key will have four associated crypto transforms - three
CCM transforms for the authsizes 4/8/16 and one CTR transform for
unauthenticated encryption. If we had a CCM* transform that allowed
authsize 0, and authsize as part of requests instead of transforms, this
would not be necessary.

Signed-off-by: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: David S. Miller <davem@davemloft.net>