fscryptctlおよびカーネルファイルシステム暗号化を使用した遅延ブート

fscryptctlおよびカーネルファイルシステム暗号化を使用した遅延ブート

TI AM335xで実行されるビルドルートビルドの一部としてfscryptctlを使用してディスク暗号化を有効にしました。 fscryptctl がファイルシステムにキーを挿入すると、起動時にファイルシステムで動作します。起動が遅れ、次のメッセージが表示されます。

[   11.830969] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cts(cbc(aes)), throttling...
[   16.882010] request_module: modprobe crypto-cts(cbc(aes)) cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   16.894836] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cts(cbc(aes))-all, throttling...
[   21.921400] request_module: modprobe crypto-cts(cbc(aes))-all cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   21.951692] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cbc(aes), throttling...
[   27.041390] request_module: modprobe crypto-cbc(aes) cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   27.053529] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cbc(aes)-all, throttling...
[   32.081413] request_module: modprobe crypto-cbc(aes)-all cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   32.112925] fscrypt: AES-256-CTS-CBC using implementation "cts(cbc(aes-generic))"
[   32.157809] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-xts(aes), throttling...
[   37.201404] request_module: modprobe crypto-xts(aes) cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   37.213554] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-xts(aes)-all, throttling...
[   42.241409] request_module: modprobe crypto-xts(aes)-all cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   42.271482] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-aes, throttling...
[   47.361399] request_module: modprobe crypto-aes cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   47.373078] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-aes-all, throttling...
[   52.401501] request_module: modprobe crypto-aes-all cannot be processed, kmod busy with 100 threads for more than 5 seconds now
[   52.413610] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module cryptomgr, throttling...
[   57.441884] request_module: modprobe cryptomgr cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   57.453523] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-ecb(aes), throttling...
[   62.481629] request_module: modprobe crypto-ecb(aes) cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   62.493723] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-ecb(aes)-all, throttling...
[   67.521683] request_module: modprobe crypto-ecb(aes)-all cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   67.536046] fscrypt: AES-256-XTS using implementation "xts(ecb(aes-generic))"

カーネルにコンパイルされるようにAESモジュールを変更することで、この時間を短縮できました。これで、スタートアップログにこの内容が表示されます。

[   10.542972] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cts(cbc(aes)), throttling...
[   15.604200] request_module: modprobe crypto-cts(cbc(aes)) cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   15.617017] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cts(cbc(aes))-all, throttling...
[   20.643736] request_module: modprobe crypto-cts(cbc(aes))-all cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   20.674918] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cryptd(__cbc-aes-neonbs), throttling...
[   25.763747] request_module: modprobe crypto-cryptd(__cbc-aes-neonbs) cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   25.777340] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cryptd(__cbc-aes-neonbs)-all, throttling...
[   30.803742] request_module: modprobe crypto-cryptd(__cbc-aes-neonbs)-all cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   30.834599] fscrypt: AES-256-CTS-CBC using implementation "cts(cbc-aes-neonbs)"
[   30.890095] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cryptd(__xts-aes-neonbs), throttling...
[   35.923747] request_module: modprobe crypto-cryptd(__xts-aes-neonbs) cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   35.937348] request_module: kmod_concurrent_max (0) close to 0 (max_modprobes: 50), for module crypto-cryptd(__xts-aes-neonbs)-all, throttling...
[   40.963785] request_module: modprobe crypto-cryptd(__xts-aes-neonbs)-all cannot be processed, kmod busy with 50 threads for more than 5 seconds now
[   40.994725] fscrypt: AES-256-XTS using implementation "xts-aes-neonbs"`

だから問題を27秒に減らしましたが、それでも30秒かかるため、問題を完全に解決したわけではありません。 max_modprobesが100になるようにカーネルパッチを試しましたが、何も機能しないようです。

そしてモジュールのcrypto-cryptd代わりにcrypto-ctsカーネルでもコンパイルされるようにLinux設定を変更してみました。ブート時には顕著な影響はありませんが、2番目のブートログフラグメントにはまだメッセージが表示されます。CONFIG_CRYPTO_CRYPTD=yCONFIG_CRYPTO_CTS=y

ARM固有の実装を決定する前に、他のいくつかのモジュールをロードしようとしているようです。システムに自分自身を決定させるのではなく、ロードする必要があるモジュールのヒントをシステムに提供して30秒の待ち時間を回避する方法はありますか?それともこの問題を解決する他の方法はありますか?

事前にありがとう、アレックス。

ベストアンサー1

おすすめ記事