Page MenuHomeFreeBSD

net80211: create accessors for accessing the ieee80211_key key/mic data
Needs RevisionPublic

Authored by adrian on Wed, Sep 24, 3:35 PM.
Referenced Files
F132514067: D52711.diff
Fri, Oct 17, 1:44 PM
Unknown Object (File)
Wed, Oct 15, 4:51 AM
Unknown Object (File)
Tue, Oct 14, 6:19 PM
Unknown Object (File)
Tue, Oct 14, 3:31 PM
Unknown Object (File)
Sat, Oct 11, 9:06 PM
Unknown Object (File)
Sat, Oct 11, 6:33 AM
Unknown Object (File)
Sat, Oct 11, 6:33 AM
Unknown Object (File)
Fri, Oct 10, 11:16 PM

Details

Reviewers
thj
bz
Group Reviewers
wireless
Summary

Add some accessors to the key data, key length and MIC data.
Document exactly what these mean.

There's at least a couple of drivers that access the key data field
directly and assume that the TX/RX MIC is available directly after the
data pointer, which bakes in the "key size is 128 bits" in subtle ways.

The goal here is to migrate the drivers and net80211 code to use
these methods rather than accessing wk_key directly and making assumptions
about wk_key and the copied key length (which the ioctl path definitely
does.)

Once that's done, it should be a lot easier to change the key API for
larger keys.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67281
Build 64164: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Tue, Sep 30, 10:22 AM
bz requested changes to this revision.Sat, Oct 4, 3:32 PM
bz added a subscriber: bz.
bz added inline comments.
sys/net80211/ieee80211_crypto.h
312

Just commenting on the first entry. So should this happen only during a iv_key_update_begin/end session, and if so should we make sure we can assert this?

This revision now requires changes to proceed.Sat, Oct 4, 3:32 PM
sys/net80211/ieee80211_crypto.h
312

no, this happens during transmit/receive handling. only key alloc / key set happens inside the key update begin/end session.

That said, those should likely get some kind of runtime checks and printing warnings / assertions if they are called outside of it.

sys/net80211/ieee80211_crypto.h
312

Oh, sorry, with full offloading key access is only needed during key operations. My fault.

But then your comment isn't all right either as it would require holding the com lock for the keys to not disappear and most transmit routines probably do not want that?