Bug 206815 - bluez-5.53: unit/test-mesh-crypto fails
Summary: bluez-5.53: unit/test-mesh-crypto fails
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-11 13:16 UTC by Pacho Ramos
Modified: 2020-03-11 21:04 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.5.8
Subsystem:
Regression: No
Bisected commit-id:


Attachments
test-suite.log (37.18 KB, text/plain)
2020-03-11 13:16 UTC, Pacho Ramos
Details

Description Pacho Ramos 2020-03-11 13:16:01 UTC
Created attachment 287869 [details]
test-suite.log

I get this failure
PASS: unit/test-crc
PASS: unit/test-textfile
PASS: unit/test-crypto
./test-driver: line 107:  1527 Aborted                 (core dumped) "$@" > $log_file 2>&1
FAIL: unit/test-mesh-crypto
PASS: unit/test-mgmt
PASS: unit/test-uhid
PASS: unit/test-queue
PASS: unit/test-avctp
PASS: unit/test-gobex
/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -fPIC   -O2 -pipe -march=native -fno-stack-protector -pie -Wl,-z,now -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o unit/test-sdp unit/test-sdp.o src/sdpd-database.o src/log.o src/sdpd-service.o src/sdpd-request.o lib/libbluetooth-internal.la src/libshared-glib.la -lglib-2.0 -lgthread-2.0 -pthread -lglib-2.0 
libtool: link: x86_64-pc-linux-gnu-gcc -fPIC -O2 -pipe -march=native -fno-stack-protector -pie -Wl,-z -Wl,now -Wl,-O1 -Wl,--hash-style=gnu -o unit/test-sdp unit/test-sdp.o src/sdpd-database.o src/log.o src/sdpd-service.o src/sdpd-request.o -pthread  -Wl,--as-needed lib/.libs/libbluetooth-internal.a src/.libs/libshared-glib.a -lgthread-2.0 -lglib-2.0 -pthread
PASS: unit/test-ecc
PASS: unit/test-sdp
PASS: unit/test-ringbuf
PASS: unit/test-avdtp
PASS: unit/test-gobex-transfer
PASS: unit/test-avrcp
/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -fPIC   -O2 -pipe -march=native -fno-stack-protector -pie -Wl,-z,now -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -o unit/test-gatt unit/test-gatt.o src/libshared-glib.la lib/libbluetooth-internal.la -lglib-2.0 -lgthread-2.0 -pthread -lglib-2.0 
libtool: link: x86_64-pc-linux-gnu-gcc -fPIC -O2 -pipe -march=native -fno-stack-protector -pie -Wl,-z -Wl,now -Wl,-O1 -Wl,--hash-style=gnu -o unit/test-gatt unit/test-gatt.o -pthread  -Wl,--as-needed src/.libs/libshared-glib.a lib/.libs/libbluetooth-internal.a -lgthread-2.0 -lglib-2.0 -pthread
PASS: unit/test-gatt
============================================================================
Testsuite summary for bluez 5.53
============================================================================
# TOTAL: 26
# PASS:  25
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
============================================================================
make[3]: *** [Makefile:9726: test-suite.log] Error 1
make[2]: *** [Makefile:9834: check-TESTS] Error 2
make[1]: *** [Makefile:10228: check-am] Error 2
make: *** [Makefile:10230: check] Error 2
Comment 1 Brian Gix 2020-03-11 16:24:22 UTC
The output of this failure seems to indicate that the Kernel you are using hasn't been compiled with the proper support for user space invokation of AES-CCM.

I think your kernel needs to be recompiled with the following .config options:

CONFIG_CRYPTO_USER=m
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_AEAD=y

CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_CCM=y     --> My kernel actually has this set to "m"


These are *minimum* requirements, and this may cause a cascade of a few other Crypto support options needing to be turned on.
Comment 2 Pacho Ramos 2020-03-11 18:25:32 UTC
Indeed that was the problem :D

Thanks a lot 

It would be really useful to list needed options somewhere 

Best regards
Comment 3 Brian Gix 2020-03-11 20:50:37 UTC
With some notable exceptions (Raspbian) most workstation and laptop distros already support all of the needed CRYPTO_USER_* dependancies...  But I will add the known list to the bluez README file.
Comment 4 Pacho Ramos 2020-03-11 21:04:17 UTC
Thanks a lot :) 

In this case it's for Gentoo, that likely hits this failure as people can compile their kernels easily, the same for LFS, Exherbo and some others. I am sure they all will appreciate this

Note You need to log in before you can comment on or make changes to this bug.