Page MenuHomeFreeBSD

LinuxKPI: 802.11: hardware crypto offload improvements
Changes PlannedPublic

Authored by bz on Jan 29 2024, 3:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 19, 5:01 PM
Unknown Object (File)
Thu, May 16, 5:47 PM
Unknown Object (File)
Sun, May 12, 12:12 PM
Unknown Object (File)
Sun, May 12, 12:00 PM
Unknown Object (File)
Thu, May 9, 6:27 PM
Unknown Object (File)
Sun, Apr 28, 8:07 PM
Unknown Object (File)
Wed, Apr 24, 6:34 AM
Unknown Object (File)
Mon, Apr 22, 5:04 PM

Details

Reviewers
cc
adrian
Summary

Split _lkpi_iv_key_set_delete() up into set and delete versions as
they are called from net80211.

Add mappings of flags between LinuxKPI and net80211 so we can
take appropriate (non-)action in net80211.
There are more flags to map at a later point for other bits.
Will will also need sort out the one which doesn't map 1:1.

MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55694
Build 52583: arc lint + arc unit

Event Timeline

bz requested review of this revision.Jan 29 2024, 3:11 PM

I cannot actually request changes on my own review. Sad.

sys/compat/linuxkpi/common/src/linux_80211.c
701

It's amazing that -DKERNFAST builds did somehow build this before but cmd is no longer set in either function; I'll fix that.

cmd was gone, replace with defined values.

bz planned changes to this revision.Jan 29 2024, 11:22 PM

Ok, Probably too tired last night. I'll keep updating this... Watch this space.

cc requested changes to this revision.Feb 26 2024, 8:58 PM

Please add PR: 277095 in the summary, as this patch also fixes that.

sys/compat/linuxkpi/common/src/linux_80211.c
693

Instead of D80211_TRACE, suggest a dedicated trace flag for LinuxKPI, like this:

D80211_TRACE_CRYPTO
762–765

Why don't you free lsta->kc directly? like this:

	free(lsta->kc, M_LKPI80211);
	lsta->kc = NULL;
768–769

Adjust alignment like this:

	lcipher = lkpi_net80211_to_l80211_cipher_suite(k->wk_cipher->ic_cipher,
						       k->wk_keylen);
770–774

Currently duplicating with the switch (kc->cipher) code below. As return (0) is added here, suggest remove the switch (kc->cipher) code below and add the case WLAN_CIPHER_SUITE_CCMP: code here. like this:

	switch (lcipher) {
	case WLAN_CIPHER_SUITE_CCMP:
		kc->iv_len = k->wk_cipher->ic_header;
		kc->icv_len = k->wk_cipher->ic_trailer;
		break;
	case WLAN_CIPHER_SUITE_TKIP:
790–800

Remove this chunk as reasoned above.

sys/compat/linuxkpi/common/src/linux_80211.c
760–765

I found a problem of this lsta->kc free when a "AES-CCM keyix 1 flags 0x106 on mac ff:ff:ff:ff:ff:ff" is set. As a result, there seems to be a deadloop of setting "keyix 0" and "keyix 1".

I will send you my private prints in email.

sys/compat/linuxkpi/common/src/linux_80211.c
760–765

Yes, see the discussion in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277095 ; if you are still testing this version as-is three weeks later I am not surprised you are still finding problems.

sys/compat/linuxkpi/common/src/linux_80211.c
760–765

Thanks for confirming. I am wondering that, but don't know/unclear about the priorities after these many patches in review. I will followup with https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277095#c2, and make the progress on top of this patch.

By the way, are you going to update D43634 based on the comment and then need my review again? The update shall not delay you much time.