2017-09-17 15:41:58

by Laczen JMS

[permalink] [raw]
Subject: meshctl fails on rpi 3

After downloading and compiling bluez 5.47 on raspberry pi 3 (raspbian
2017-09-07), it is not possible to run meshctl on the raspberry pi.
Meshctl fails at loading the prov_db.

After some further testing I have found that the loading fails in the
crypto functions at binding the AF_ALG in line 178 of crypto.c. Has
this something to do with cryptographic modules being unavailable on
the rpi 3?

If so, what crypto module is required and what is the best way to add
these modules ?

Kind regards,

Jehudi


2017-09-18 19:48:06

by Laczen JMS

[permalink] [raw]
Subject: Re: meshctl fails on rpi 3

Hi,

I can confirm that recompiling the kernel with the crypto settings
from "test-runner.txt" solves the problem. After recompiling and
installing the kernel with the crypto settings:

CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y

meshctl can load the json files and connect to the bluetooth mesh.

Kind regards,

Jehudi

2017-09-18 12:50 GMT+02:00 Tudor Ambarus <[email protected]>:
> Hi, Jehudi,
>
> On 09/17/2017 06:41 PM, Laczen JMS wrote:
>>
>> After downloading and compiling bluez 5.47 on raspberry pi 3 (raspbian
>> 2017-09-07), it is not possible to run meshctl on the raspberry pi.
>> Meshctl fails at loading the prov_db.
>>
>> After some further testing I have found that the loading fails in the
>> crypto functions at binding the AF_ALG in line 178 of crypto.c. Has
>> this something to do with cryptographic modules being unavailable on
>> the rpi 3?
>>
>> If so, what crypto module is required and what is the best way to add
>> these modules ?
>
>
> I remember that I ran in similar issues when testing SMP. All worked ok
> when I had the af-alg user-space interface builtin in the kernel.
>
> Hope that helps,
> ta

2017-09-18 10:50:04

by Tudor Ambarus

[permalink] [raw]
Subject: Re: meshctl fails on rpi 3

Hi, Jehudi,

On 09/17/2017 06:41 PM, Laczen JMS wrote:
> After downloading and compiling bluez 5.47 on raspberry pi 3 (raspbian
> 2017-09-07), it is not possible to run meshctl on the raspberry pi.
> Meshctl fails at loading the prov_db.
>
> After some further testing I have found that the loading fails in the
> crypto functions at binding the AF_ALG in line 178 of crypto.c. Has
> this something to do with cryptographic modules being unavailable on
> the rpi 3?
>
> If so, what crypto module is required and what is the best way to add
> these modules ?

I remember that I ran in similar issues when testing SMP. All worked ok
when I had the af-alg user-space interface builtin in the kernel.

Hope that helps,
ta

2017-09-18 08:54:27

by Zabel, Oliver

[permalink] [raw]
Subject: Re: meshctl fails on rpi 3

Hi,

what is then the procedure to get crypto/meshctl running on rpi3/pi zero w?

Thanks!

Von meinem iPhone gesendet

> Am 18.09.2017 um 10:38 schrieb Marcel Holtmann <[email protected]>:
>=20
> Hi Luiz,
>=20
>>> Meshctl' crypto does depend on a lot of Kernel based crypto... pretty mu=
ch everything except for the AES-CCM.
>>=20
>> We might want to update
>> https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/test-runner.t=
xt
>> if that is not covering the mesh crypto.
>=20
> I would also prefer that we start using AES-CCM from the kernel. Someone s=
hould take up that task and also use src/shared/crypto.c for it. We should e=
nsure that we use a single place for all the crypto helpers.
>=20
> Regards
>=20
> Marcel
>=20
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"=
in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2017-09-18 08:38:50

by Marcel Holtmann

[permalink] [raw]
Subject: Re: meshctl fails on rpi 3

Hi Luiz,

>> Meshctl' crypto does depend on a lot of Kernel based crypto... pretty much everything except for the AES-CCM.
>
> We might want to update
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/test-runner.txt
> if that is not covering the mesh crypto.

I would also prefer that we start using AES-CCM from the kernel. Someone should take up that task and also use src/shared/crypto.c for it. We should ensure that we use a single place for all the crypto helpers.

Regards

Marcel


2017-09-17 17:48:30

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: meshctl fails on rpi 3

Hi,

On Sun, Sep 17, 2017 at 7:50 PM, Gix, Brian <[email protected]> wrote:
> Hi Jehudi,
>
> Meshctl' crypto does depend on a lot of Kernel based crypto... pretty much everything except for the AES-CCM.

We might want to update
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/test-runner.txt
if that is not covering the mesh crypto.

> Sent from my iPhone
>
>> On Sep 17, 2017, at 8:42 AM, Laczen JMS <[email protected]> wrote:
>>
>> After downloading and compiling bluez 5.47 on raspberry pi 3 (raspbian
>> 2017-09-07), it is not possible to run meshctl on the raspberry pi.
>> Meshctl fails at loading the prov_db.
>>
>> After some further testing I have found that the loading fails in the
>> crypto functions at binding the AF_ALG in line 178 of crypto.c. Has
>> this something to do with cryptographic modules being unavailable on
>> the rpi 3?
>>
>> If so, what crypto module is required and what is the best way to add
>> these modules ?
>>
>> Kind regards,
>>
>> Jehudi
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
Luiz Augusto von Dentz

2017-09-17 16:50:44

by Gix, Brian

[permalink] [raw]
Subject: Re: meshctl fails on rpi 3

Hi Jehudi,

Meshctl' crypto does depend on a lot of Kernel based crypto... pretty much everything except for the AES-CCM.

Sent from my iPhone

> On Sep 17, 2017, at 8:42 AM, Laczen JMS <[email protected]> wrote:
>
> After downloading and compiling bluez 5.47 on raspberry pi 3 (raspbian
> 2017-09-07), it is not possible to run meshctl on the raspberry pi.
> Meshctl fails at loading the prov_db.
>
> After some further testing I have found that the loading fails in the
> crypto functions at binding the AF_ALG in line 178 of crypto.c. Has
> this something to do with cryptographic modules being unavailable on
> the rpi 3?
>
> If so, what crypto module is required and what is the best way to add
> these modules ?
>
> Kind regards,
>
> Jehudi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html