Hi,
We are trying to use dm-crypt with OP-TEE based encryption as described in imx Linux User's Guide chapter 10.5.5. We are using BSP 6.6.36 as a base. This seems to be working fine, however we also need RT functionality in Linux so we have applied the RT patch manually.
When running a dm-crypt I/O test with RT patch + CONFIG_PREEMPT_RT=y in the kernel, we get strange behavior with random processes crashing, ssh sessions being terminated etc. This makes us suspect some memory corruption occuring in the kernel.
Command used for testing I/O and which triggers the error:
fio --filename=/mnt/encrypted/fio.bin --size=128MB --rw=rw --bs=8k --ioengine=sync --iodepth=1 --runtime=120 --numjobs=1 --time_based --group_reporting --name=throughput-test-job --eta-newline=1
Usually fio segfaults in addition to other errors occuring or not. It can take a while to trigger the errors.
We have also tried the recently released:
All kernels give the same result. We have not been able to reproduce the error when using CONFIG_PREEMPT=y instead of CONFIG_PREEMPT_RT=y.
We have also tried non OP-TEE based encryption with dm-crypt (capi:cbc-aes-ce-plain algorithm) as a comparision and not gotten any errors with RT preemption. However, we need the hidden key support.
Thankful for any help.
hi @electro1
Will reply back to you in other ticket created by you - imx93 cbc-aes-tee immediate crash - NXP Community
Regards
Harvey
Hi,
We're working on the issue, please wait.
Regards
Harvey