<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mac80211/key.c, branch linux-2.6.27.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.27.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-06-28T08:19:40Z</updated>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2008-06-28T08:19:40Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2008-06-28T08:19:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9'/>
<id>urn:sha1:1b63ba8a86c85524a8d7e5953b314ce71ebcb9c9</id>
<content type='text'>
Conflicts:

	drivers/net/wireless/iwlwifi/iwl4965-base.c
</content>
</entry>
<entry>
<title>mac80211: fix an oops in several failure paths in key allocation</title>
<updated>2008-06-27T18:49:52Z</updated>
<author>
<name>Emmanuel Grumbach</name>
</author>
<published>2008-06-26T09:13:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00eb7fe77eb455f807c396f9917f0f623d4c84bb'/>
<id>urn:sha1:00eb7fe77eb455f807c396f9917f0f623d4c84bb</id>
<content type='text'>
This patch fixes an oops in several failure paths in key allocation. This
Oops occurs when freeing a key that has not been linked yet, so the
key-&gt;sdata is not set.

Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: proper STA info locking</title>
<updated>2008-05-14T20:29:34Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2008-05-02T23:02:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07346f81e87d6e4cca7ae9adfa711d0c61c87b56'/>
<id>urn:sha1:07346f81e87d6e4cca7ae9adfa711d0c61c87b56</id>
<content type='text'>
As discussed earlier, we can unify locking in struct sta_info
and use just a single spinlock protecting all members of the
structure that need protection. Many don't, but one of the
especially bad ones is the 'flags' member that can currently
be clobbered when RX and TX is being processed on different
CPUs at the same time.

Because having four spinlocks for different, mostly exclusive
parts of a single structure is overkill, this patch also kills
the ampdu and mesh plink spinlocks and uses just a single one
for everything. Because none of the spinlocks are nested, this
is safe.

It remains to be seen whether or not we should make the sta
flags use atomic bit operations instead, for now though this
is a safe thing and using atomic operations instead will be
very simple using the new static inline functions this patch
introduces for accessing sta-&gt;flags.

Since spin_lock_bh() is used with this lock, there shouldn't
be any contention even if aggregation is enabled at around the
same time as both requires frame transmission/reception which
is in a bh context.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: Tomas Winkler &lt;tomasw@gmail.com&gt;
Cc: Ron Rindjunsky &lt;ron.rindjunsky@intel.com&gt;
Cc: Luis Carlos Cobo &lt;luisca@cozybit.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: Add IEEE80211_KEY_FLAG_PAIRWISE</title>
<updated>2008-05-07T19:02:11Z</updated>
<author>
<name>Ivo van Doorn</name>
</author>
<published>2008-04-17T19:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6adbd2158fee972adcc6232de5e2ef375f1f782'/>
<id>urn:sha1:c6adbd2158fee972adcc6232de5e2ef375f1f782</id>
<content type='text'>
This adds a new flag to the ieee80211_key_conf structure.
This flag will inform the driver the key is pairwise rather then
a shared key.

This is important for drivers who support both types of keys,
and need to be informed which type of key this is. Alternative
would be drivers checking the address argument of set_key(),
but it will be safer when mac80211 is more explicit.

Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix key todo list order</title>
<updated>2008-04-16T19:59:57Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2008-04-13T08:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=245cbe7a65f3e17999de276ea1c84538f3a7451e'/>
<id>urn:sha1:245cbe7a65f3e17999de276ea1c84538f3a7451e</id>
<content type='text'>
When we add multiple todo entries, we rely on them being executed
mostly in the right order, especially when a key is being replaced.
But when a default key is replaced, the todo list order will differ
from the order when the key being replaced is not a default key, so
problems will happen. Hence, just move each todo item to the end of
the list when it is added so we can in the other code ensure that
hw accel for a key will be disabled before it is enabled for the
replacement.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix spinlock recursion</title>
<updated>2008-04-16T19:59:57Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2008-04-11T19:40:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b16bd15c379410f2aa47837aa4a0de5712856ad5'/>
<id>urn:sha1:b16bd15c379410f2aa47837aa4a0de5712856ad5</id>
<content type='text'>
When STAs are expired, we need to hold the sta_lock. Using
the same lock for keys too would then mean we'd need another
key free function, and that'll just lead to confusion, so just
use a new spinlock for all key lists.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix key hwaccel race</title>
<updated>2008-04-16T18:53:22Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2008-04-09T14:45:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a245766901a9dfdc3f53457a7954b369b50f281'/>
<id>urn:sha1:3a245766901a9dfdc3f53457a7954b369b50f281</id>
<content type='text'>
The previous key locking patch left a small race: it would be possible
to add a key and take the interface down before the key todo is run so
that hwaccel for that key is enabled on an interface that is down. Avoid
this by running the todo list when an interface is brought up or down.

This patch also fixes a small bug: before this change, a few functions
used the key list without the lock that protects it.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix key vs. sta locking problems</title>
<updated>2008-04-08T20:44:45Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2008-04-08T15:56:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b96766f0e643f52ae19e134664df6730c737e87'/>
<id>urn:sha1:3b96766f0e643f52ae19e134664df6730c737e87</id>
<content type='text'>
Up to now, key manipulation is supposed to run under RTNL to
avoid concurrent manipulations and also allow the set_key()
hardware callback to sleep. This is not feasible because STA
structs are rcu-protected and thus a lot of operations there
cannot take the RTNL. Also, key references are rcu-protected
so we cannot do things atomically.

This patch changes key locking completely:
 * key operations are now atomic
 * hardware crypto offload is enabled and disabled from
   a workqueue, due to that key freeing is also delayed
 * debugfs code is also run from a workqueue
 * keys reference STAs (and vice versa!) so during STA
   unlink the STAs key reference is removed but not the
   keys STA reference, to avoid races key todo work is
   run before STA destruction.
 * fewer STA operations now need the RTNL which was
   required due to key operations

This fixes the locking problems lockdep pointed out and also
makes things more light-weight because the rtnl isn't required
as much.

Note that the key todo lock/key mutex are global locks, this
is not required, of course, they could be per-hardware instead.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: sta_info_flush() fixes</title>
<updated>2008-04-01T21:14:10Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2008-03-31T17:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc6676b7f2c2072ec05254aaca32e99f87a8a417'/>
<id>urn:sha1:dc6676b7f2c2072ec05254aaca32e99f87a8a417</id>
<content type='text'>
When the IBSS code tries to flush the STA list, it does so in
an atomic context. Flushing isn't safe there, however, and
requires the RTNL, so we need to defer it to a workqueue.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: always insert key into list</title>
<updated>2008-03-06T20:30:47Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2008-03-01T18:32:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96c46546e28282a743b97f26e94c7565350898b7'/>
<id>urn:sha1:96c46546e28282a743b97f26e94c7565350898b7</id>
<content type='text'>
Today I hit one of my new WARN_ONs in the mac80211 code because
a key wasn't being freed correctly. After wondering for a while
I finally tracked it to the fact that STA keys aren't added to
the per-sdata key list correctly, they are supposed to always be
on that list, not just for default keys. This patch fixes that.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
</feed>
