All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [NOT FOR MERGE] ath9k: work around key cache corruption
Date: Sat, 22 Oct 2016 22:34:16 +0200	[thread overview]
Message-ID: <1477168456.4123.10.camel@sipsolutions.net> (raw)
In-Reply-To: <20161022134222.GQ12558@prodigo.lan> (sfid-20161022_154307_816691_A0A58C81)


> "The patch itself has (at least) one big problem. It is using some
> mac80211
> internals in ath_key_config_iter to make sure that the uploaded keys
> were
> actually programmed in the hardware. Without this check the keys
> could end up
> in the lower slots and thus break all connections."

The?KEY_FLAG_UPLOADED_TO_HARDWARE use? Might not be so nice, but it's
probably not really a problem. If you wanted to avoid it, you could
just use the hw_key_idx in some way, e.g. the highest-order bit
indicates that you've set this value, or you just make sure that 0 is
an invalid value and set it to real index + 1 or something, then you
can check that?

johannes

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes@sipsolutions.net>
To: Antonio Quartulli <a@unstable.cc>, ath9k-devel@lists.ath9k.org
Cc: linux-wireless@vger.kernel.org, sw@simonwunderlich.de,
	Antonio Quartulli <antonio@open-mesh.com>
Subject: Re: [NOT FOR MERGE] ath9k: work around key cache corruption
Date: Sat, 22 Oct 2016 22:34:16 +0200	[thread overview]
Message-ID: <1477168456.4123.10.camel@sipsolutions.net> (raw)
In-Reply-To: <20161022134222.GQ12558@prodigo.lan> (sfid-20161022_154307_816691_A0A58C81)


> "The patch itself has (at least) one big problem. It is using some
> mac80211
> internals in ath_key_config_iter to make sure that the uploaded keys
> were
> actually programmed in the hardware. Without this check the keys
> could end up
> in the lower slots and thus break all connections."

The KEY_FLAG_UPLOADED_TO_HARDWARE use? Might not be so nice, but it's
probably not really a problem. If you wanted to avoid it, you could
just use the hw_key_idx in some way, e.g. the highest-order bit
indicates that you've set this value, or you just make sure that 0 is
an invalid value and set it to real index + 1 or something, then you
can check that?

johannes

  reply	other threads:[~2016-10-22 20:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18  8:35 [NOT FOR MERGE] ath9k: work around key cache corruption Antonio Quartulli
2016-10-18  8:55 ` [ath9k-devel] " Antonio Quartulli
2016-10-22 13:42 ` Antonio Quartulli
2016-10-22 13:43   ` [ath9k-devel] " Antonio Quartulli
2016-10-22 20:34   ` Johannes Berg [this message]
2016-10-22 20:34     ` Johannes Berg
2017-01-09  8:57   ` [ath9k-devel] " Stam, Michel
2017-01-09  8:57     ` Stam, Michel [FINT]
2016-10-26 14:05 ` Kalle Valo
2016-10-26 14:05   ` Kalle Valo
2016-10-26 14:10   ` Antonio Quartulli
2016-10-26 14:11     ` [ath9k-devel] " Antonio Quartulli
2016-10-27  6:02     ` Kalle Valo
2016-10-27  6:02       ` Kalle Valo
2016-10-27  7:54       ` Sebastian Gottschall
2016-10-27  8:12         ` [ath9k-devel] " Sebastian Gottschall
2016-10-27 15:06         ` Johannes Berg
2016-10-27 15:06           ` Johannes Berg
2016-11-14 12:50           ` [ath9k-devel] " Stam, Michel
2016-11-14 12:50             ` Stam, Michel [FINT]
2016-11-14 23:25             ` Adrian Chadd
2016-11-14 23:25               ` Adrian Chadd
2016-11-16  8:54               ` Stam, Michel
2016-11-16  8:54                 ` Stam, Michel [FINT]
2016-10-26 14:43   ` Ferry Huberts
2016-10-26 14:43     ` Ferry Huberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477168456.4123.10.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ath9k-devel@lists.ath9k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.