Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796398 - net-wireless/bluez: needs CONFIG_CRYPTO_USER_API_{HASH,SKCIPHER}
Summary: net-wireless/bluez: needs CONFIG_CRYPTO_USER_API_{HASH,SKCIPHER}
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-17 04:54 UTC by Kai Krakow
Modified: 2021-06-22 14:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Krakow 2021-06-17 04:54:06 UTC
The bluetooth daemon seems to need the following kernel options to successfully initialize crypto:

CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y

I didn't check if compiling as a module is sufficient. It works when loading the module manually, IOW, I didn't check if they would auto-load.

Without these options, the following message is logged:

Jun 16 21:10:15 jupiter systemd[1]: Starting Bluetooth service...
Jun 16 21:10:16 jupiter bluetoothd[724]: Bluetooth daemon 5.58
Jun 16 21:10:18 jupiter bluetoothd[724]: Starting SDP server
Jun 16 21:10:18 jupiter systemd[1]: Started Bluetooth service.
Jun 16 21:10:18 jupiter bluetoothd[724]: Bluetooth management interface 1.18 initialized
Jun 16 21:10:18 jupiter bluetoothd[724]: No IRK stored
Jun 16 21:10:18 jupiter bluetoothd[724]: src/adapter.c:generate_and_write_irk() Failed to open crypto

As a result, some BLE devices aren't able to pair successfully, e.g. the new Xbox Series X|S controller won't pair and enter a reconnect loop. Enabling both kernel options makes it pair successfully and send HID input data.

Thus, the ebuild should check if the options are set and inform the user otherwise. Also, it may be worth checking if dist-kernel actually enables those options. I don't use dist-kernel, so I didn't check.
Comment 1 Larry the Git Cow gentoo-dev 2021-06-22 12:40:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cff974c62d35d2db9c8b093faa8cbdaecae8002

commit 1cff974c62d35d2db9c8b093faa8cbdaecae8002
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2021-06-22 12:40:38 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2021-06-22 12:40:38 +0000

    net-wireless/bluez: Fix kernel config checks
    
    Closes: https://bugs.gentoo.org/796398
    Thanks-to: Kai Krakow
    Package-Manager: Portage-3.0.19, Repoman-3.0.3
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 net-wireless/bluez/bluez-5.58-r1.ebuild | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
Comment 2 Kai Krakow 2021-06-22 14:45:20 UTC
This commit now duplicates one kernel config check: The new one is unconditionally added to the config check variable, so the mesh-conditional below could be removed.