Page MenuHomeFreeBSD

armv8_crypto: fix recursive fpu_kern_enter call
ClosedPublic

Authored by zachary.leaf_arm.com on Aug 31 2023, 1:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 13 2024, 1:52 AM
Unknown Object (File)
Sep 13 2024, 1:52 AM
Unknown Object (File)
Sep 13 2024, 1:52 AM
Unknown Object (File)
Sep 13 2024, 1:47 AM
Unknown Object (File)
Sep 11 2024, 7:44 AM
Unknown Object (File)
Sep 10 2024, 6:19 AM
Unknown Object (File)
Sep 9 2024, 11:18 PM
Unknown Object (File)
Sep 7 2024, 7:18 PM
Subscribers

Details

Summary

Now armv8_crypto is using FPU_KERN_NOCTX, this results in a kernel panic
in armv8_crypto.c:armv8_crypto_cipher_setup:

panic: recursive fpu_kern_enter while in PCB_FP_NOSAVE state

This is because in armv8_crypto.c:armv8_crypto_cipher_process,
directly after calling fpu_kern_enter() a call is made to
armv8_crypto_cipher_setup(), resulting in nested calls to
fpu_kern_enter() without the required fpu_kern_leave() inbetween.

Move fpu_kern_enter() in armv8_crypto_cipher_process() after the
call to armv8_crypto_cipher_setup() to resolve this.

Fixes: 6485286f536f ("armv8_crypto: Switch to using FPU_KERN_NOCTX")
Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable