config-wsl: enable CMAC, ZSTD firmware, and MediaTek USB Bluetooth

Open Beginner friendly
#41,107 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
linux

Research direction

Start with arch/x86/configs/config-wsl and compare it with the referenced diff or current linux-msft-wsl-6.18.y configuration. Confirm the three requested settings are changed as specified: built-in CMAC, ZSTD firmware compression, and MediaTek USB Bluetooth support. Done means the x86 WSL configuration contains those changes without expanding the request to firmware loading or the arm64 config.

Written by the indexing model from the issue text.

Description

feature kernel wsl2

Is your feature request related to a problem? Please describe.

Yes. Using several USB Bluetooth dongles in WSL2 (attached via usbipd) is blocked by the default WSL2 kernel config in three ways:

  • MediaTek USB BT controllers have no driver. CONFIG_BT_HCIBTUSB_MTK is not set, so btusb has no MediaTek support and the controller never initializes.
  • Compressed firmware can't be read. Current linux-firmware ships blobs as .zst, but CONFIG_FW_LOADER_COMPRESS_ZSTD is not set, so the direct loader can't decompress them. CONFIG_FW_LOADER_COMPRESS_XZ is enabled, but linux-firmware has moved to zstd.
  • CMAC crypto fails to load on demand. CONFIG_CRYPTO_CMAC=m. BT LE Secure Connections allocates cmac(aes), which triggers a kernel-side request_module(). On WSL2 that runs through usermodehelper in the init namespace, which cannot reach the distro's /sbin/modprobe or /lib/modules, so the module never loads and the controller logs Unable to create CMAC crypto context.

Describe the solution you'd like

Three config-only changes to arch/x86/configs/config-wsl (diff: https://github.com/microsoft/WSL2-Linux-Kernel/compare/linux-msft-wsl-6.18.y...intercreate:upstream-config-cmac-zstd-mtkbt):

Option Change Why
CONFIG_CRYPTO_CMAC my build it in so LE Secure Connections crypto works without the init-namespace request_module(). CONFIG_CRYPTO_AES=y already set.
CONFIG_FW_LOADER_COMPRESS_ZSTD unset → y read .zst firmware. CONFIG_ZSTD_DECOMPRESS=y is already set, so this pulls in nothing new — it just enables the zstd path next to the existing xz one.
CONFIG_BT_HCIBTUSB_MTK unset → y (selects CONFIG_BT_MTK=m) MediaTek USB BT controllers. CONFIG_BT_HCIBTUSB=m already set.

Describe alternatives you've considered

  • CONFIG_EXTRA_FIRMWARE: must be listed per-file and stored uncompressed so it doesn't scale to arbitrary dongles.
  • Carrying a downstream fork with these enabled: works as a stopgap and is what we're doing today, but the fix belongs in the shipped config so every WSL2 user benefits.

Additional context

Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 15h
Merged PRs (30d)
106

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/WSL

All issues in microsoft/WSL

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.