Skip to content

feat(kernel-configs): enable kernel support for iwd#267

Open
koenkooi wants to merge 1 commit intoqualcomm-linux:mainfrom
koenkooi:wifi-support
Open

feat(kernel-configs): enable kernel support for iwd#267
koenkooi wants to merge 1 commit intoqualcomm-linux:mainfrom
koenkooi:wifi-support

Conversation

@koenkooi
Copy link
Copy Markdown
Contributor

When trying to use iwd as backend for NetworkManager it fails with:

Feb 26 09:26:40 rb4 systemd[1]: Failed to start iwd.service - Wireless service.
Feb 26 09:26:40 rb4 systemd[1]: iwd.service: Scheduled restart job, restart counter is at 1.
Feb 26 09:26:40 rb4 systemd[1]: Starting iwd.service - Wireless service...
Feb 26 09:26:40 rb4 iwd[736]: No HMAC(SHA1) support found
Feb 26 09:26:40 rb4 iwd[736]: No HMAC(MD5) support found
Feb 26 09:26:40 rb4 iwd[736]: No CMAC(AES) support found
Feb 26 09:26:40 rb4 iwd[736]: No HMAC(SHA256) support not found
Feb 26 09:26:40 rb4 iwd[736]: No HMAC(SHA512) support found, certain TLS connections might fail
Feb 26 09:26:40 rb4 iwd[736]: DES support not found
Feb 26 09:26:40 rb4 iwd[736]: AES support not found
Feb 26 09:26:40 rb4 iwd[736]: No CBC(DES3_EDE) support found, certain TLS connections might fail
Feb 26 09:26:40 rb4 iwd[736]: No CBC(AES) support found, WPS will not be available
Feb 26 09:26:40 rb4 iwd[736]: No Diffie-Hellman support found, WPS will not be available
Feb 26 09:26:40 rb4 iwd[736]: The following options are missing in the kernel:
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_USER_API_HASH
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_USER_API_SKCIPHER
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_KEY_DH_OPERATIONS
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_ECB
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_MD5
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_CBC
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_SHA256
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_AES
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_DES
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_CMAC
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_HMAC
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_SHA512
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_SHA1

Enable those options as well as all accelerated crypto drivers to make this work.

When trying to use `iwd` as backend for NetworkManager it fails with:

```
Feb 26 09:26:40 rb4 systemd[1]: Failed to start iwd.service - Wireless service.
Feb 26 09:26:40 rb4 systemd[1]: iwd.service: Scheduled restart job, restart counter is at 1.
Feb 26 09:26:40 rb4 systemd[1]: Starting iwd.service - Wireless service...
Feb 26 09:26:40 rb4 iwd[736]: No HMAC(SHA1) support found
Feb 26 09:26:40 rb4 iwd[736]: No HMAC(MD5) support found
Feb 26 09:26:40 rb4 iwd[736]: No CMAC(AES) support found
Feb 26 09:26:40 rb4 iwd[736]: No HMAC(SHA256) support not found
Feb 26 09:26:40 rb4 iwd[736]: No HMAC(SHA512) support found, certain TLS connections might fail
Feb 26 09:26:40 rb4 iwd[736]: DES support not found
Feb 26 09:26:40 rb4 iwd[736]: AES support not found
Feb 26 09:26:40 rb4 iwd[736]: No CBC(DES3_EDE) support found, certain TLS connections might fail
Feb 26 09:26:40 rb4 iwd[736]: No CBC(AES) support found, WPS will not be available
Feb 26 09:26:40 rb4 iwd[736]: No Diffie-Hellman support found, WPS will not be available
Feb 26 09:26:40 rb4 iwd[736]: The following options are missing in the kernel:
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_USER_API_HASH
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_USER_API_SKCIPHER
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_KEY_DH_OPERATIONS
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_ECB
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_MD5
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_CBC
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_SHA256
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_AES
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_DES
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_CMAC
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_HMAC
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_SHA512
Feb 26 09:26:40 rb4 iwd[736]:        CONFIG_CRYPTO_SHA1
```

Enable those options as well as all accelerated crypto drivers to make
this work.

Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com>
@github-actions
Copy link
Copy Markdown

Test Results

 2 files  ±0   6 suites  ±0   2m 54s ⏱️ ±0s
20 tests ±0  20 ✅ ±0  0 💤 ±0  0 ❌ ±0 
64 runs  ±0  64 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit cdc66b9. ± Comparison against base commit fa412cf.

@github-actions
Copy link
Copy Markdown

Test jobs for commit cdc66b9

Copy link
Copy Markdown
Contributor

@lool lool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you make the use case a bit more specific (what we get) and convey how you crafted it (how we maintain it)?

Not sure that the second crypto group brings, I'm sure it can be made useful, but perhaps it belongs in its own config fragment for $something.

CONFIG_CRYPTO_RSA=y
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and probably others are tristate; any rationale for making them =y? I'd prefer keeping everything we can as module by default.

@@ -0,0 +1,52 @@
# Wifi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the name of the file ("wireless") might be a bit too generic; WiFi works for me with defconfig and the default Network Manager backend. Should this be iwd.config?

Could you start with a couple of lines describing the use case / userspace being enabled? In your case I believe it's (Debian's) IWD and (Debian's) Network Manager's IWD backend

Could you also write some notes on how you crafted the config in the header itself? I am worried we won't know how to update these config files in a few months.

CONFIG_PKCS7_MESSAGE_PARSER=y
CONFIG_X509_CERTIFICATE_PARSER=y

# Accelerated crypto drivers for Arm
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I see the difference between the crypto configs in this group vs the above ones; is this a broad set of crypto modules that might or might not be used in wireless? It seems the top set is about wireless already?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a similar change in meta-qcom and the request was to enable all the Arm crypto drivers and not just the handful iwd likes. I have no strong opinion on keeping them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to remain grounded on real use cases; this set of configs is essentially went to be a small superset on top of defconfig to support developer needs, but I don't think we'd want to turn on every config under the sun like you'd see in a distro kernel.

For me the use case is Koen, other Qualcomm engineers and opensource developers want to run iwd. Could you make an educated guess of the configs that make sense? It's ok to include a bit more with the idea "Wireless protocols might use this alg in the short/mid-term".

Alternatively, if you know of interesting use cases that would require the crypto subsystem, say dm-crypt or ICE, we could take this opportunity to create a separate and richer crypto.config or dm-crypt.config.

@lool
Copy link
Copy Markdown
Contributor

lool commented Feb 26, 2026

BTW I am also curious as to why you're reaching out to the alternate iwd backend!

@koenkooi
Copy link
Copy Markdown
Contributor Author

BTW I am also curious as to why you're reaching out to the alternate iwd backend!

Because it's much, much easier to configure and debug than wpa-supplicant!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants