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

Aperta Adatta ai principianti
#41,107 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
linux

Direzione di ricerca

Inizia da arch/x86/configs/config-wsl e confrontalo con il diff indicato o con la configurazione attuale di linux-msft-wsl-6.18.y. Verifica che le tre impostazioni richieste siano state modificate come specificato: CMAC integrato, compressione del firmware ZSTD e supporto Bluetooth USB MediaTek. Il lavoro è completato quando la configurazione WSL x86 contiene queste modifiche, senza estendere la richiesta al caricamento del firmware o alla configurazione arm64.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 m → y 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

Lingua principale
C++
Stelle
34.4k
Fork
1.9k
Merge medio
1g 23h
PR unite (30g)
166

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/WSL

Tutte le issue di microsoft/WSL

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.