Page MenuHomeFreeBSD

net80211: allow a single wlan crypto module to register for >1 cipher
ClosedPublic

Authored by adrian on Apr 22 2024, 3:40 AM.
Referenced Files
Unknown Object (File)
Mon, Nov 25, 12:04 PM
Unknown Object (File)
Mon, Nov 25, 10:24 AM
Unknown Object (File)
Sun, Nov 24, 8:54 AM
Unknown Object (File)
Sat, Nov 23, 10:53 PM
Unknown Object (File)
Sat, Nov 23, 9:34 PM
Unknown Object (File)
Sat, Nov 23, 3:19 PM
Unknown Object (File)
Sat, Nov 23, 12:39 PM
Unknown Object (File)
Sat, Nov 23, 6:06 AM

Details

Summary

This allows a single wlan crypto module to register for more than
one cipher. Without it, duplicate linkerset structs are initialised
for the actual module loading machinery itself.

I've tested this in my private tree with wlan_ccmp providing both
128 and 256 bit cipher support.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I don't get it why this change made a difference in your test. Is it because of the bug I pointed in TEXT_SET ?

sys/net80211/ieee80211_freebsd.h
420

I think version is not needed here in this macro.

429

Can we remove the double hash operators ## here inside the "crypto##_set" of macro TEXT_SET? It's confusing to me until I checked other examples in this file.

for example:

TEXT_SET(scanner_set, name##_modevent);
TEXT_SET(acl_set, alg##_modevent);
...
adrian added inline comments.
sys/net80211/ieee80211_freebsd.h
429

I think there's a reason for it to be done like this, same as ratectl?

Let's figure that out after this stuff lands, as a separate clean-up path.

If you have a plan to figure out TEXT_SET(crypto##_set, name##_modevent) and TEXT_SET(ratectl##_set, alg##_modevent), I have no problem with this patch.

This revision is now accepted and ready to land.Apr 29 2024, 3:53 PM
sys/net80211/ieee80211_freebsd.h
420

Now I got it why you rename this macro and use it in D44921.

bz added a subscriber: bz.

Would be great if the commit message would mention IEEE80211_CRYPTO_MODULE() somehow so one can find this in the future more easily.

Also the Phab template has a separate section to describe the testing.