Files
linux-rockchip/drivers/crypto
Lin Jinhan 629aef9788 crypto: rockchip: set CRYPTO_ALG_INTERNAL for cra_flags
Rockchip's crypto driver is set to the CRYPTO_ALG_INTERNAL flag,
 which prevents it from being called by other modules of the system
 and is only used for librkcrypto use.

Fixed the panic bug caused by calling hmac(sha256) in Android CTS test:

[  234.124644][    C0] ------------[ cut here ]------------
[  234.124694][    C0] kernel BUG at arch/arm64/kernel/fpsimd.c:1832!
[  234.124708][    C0] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
[  234.165910][    C0] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           OE      6.1.78-android14-11-g55b024554aae-ab11965736 #1
[  234.166912][    C0] Hardware name: Rockchip RK3576 EVB1 V10 Board (DT)
[  234.167486][    C0] pstate: 404000c5 (nZcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  234.168160][    C0] pc : kernel_neon_begin+0xe8/0x14c
[  234.168623][    C0] lr : cbc_decrypt+0x94/0x104
[  234.169037][    C0] sp : ffffffc008003ce0
[  234.169393][    C0] x29: ffffffc008003ce0 x28: ffffffc009faed80 x27: 00000000000000e0
[  234.170093][    C0] x26: ffffffc00a13e000 x25: 0000000000000001 x24: ffffff800dd85dc0
[  234.170792][    C0] x23: ffffff80f17e5540 x22: ffffff80f17e5600 x21: 0000000000000002
[  234.171492][    C0] x20: ffffff80c3720d70 x19: ffffffc009faed80 x18: ffffffc008005060
[  234.172192][    C0] x17: 000000000000003c x16: 000000000000003c x15: 000000000000003c
[  234.172891][    C0] x14: 0000000000000000 x13: fffffffe030dc9c0 x12: 000000000000003c
[  234.173590][    C0] x11: 000000000000003c x10: 0000000000000008 x9 : 0000000000000080
[  234.174289][    C0] x8 : 00000000000000c0 x7 : 0000000000000000 x6 : 189055e08898eccd
[  234.174988][    C0] x5 : 000000000000003c x4 : 0000000000000fc4 x3 : 0000000000000020
[  234.175687][    C0] x2 : 0000000000000030 x1 : 0000000000000020 x0 : 0000000000000000
[  234.176387][    C0] Call trace:
[  234.176667][    C0]  kernel_neon_begin+0xe8/0x14c
[  234.177092][    C0]  cbc_decrypt+0x94/0x104
[  234.177472][    C0]  crypto_skcipher_decrypt+0x3c/0x54
[  234.177932][    C0]  crypto_authenc_decrypt_tail+0xd8/0xf4
[  234.178423][    C0]  authenc_verify_ahash_done+0x5c/0x6c
[  234.178902][    C0]  rk_ahash_crypto_complete+0x10c/0x204 [rk_crypto]
[  234.179522][    C0]  rk_complete_op+0x78/0x100 [rk_crypto]
[  234.180049][    C0]  rk_crypto_done_task_cb+0xc8/0x100 [rk_crypto]
[  234.180641][    C0]  tasklet_action_common+0x260/0x4bc
[  234.181100][    C0]  tasklet_action+0x24/0x34
[  234.181492][    C0]  __do_softirq+0x11c/0x418
[  234.181883][    C0]  ____do_softirq+0x10/0x20
[  234.182274][    C0]  call_on_irq_stack+0x3c/0x74
[  234.182687][    C0]  do_softirq_own_stack+0x1c/0x2c
[  234.183121][    C0]  __irq_exit_rcu+0x54/0xb4
[  234.183513][    C0]  irq_exit_rcu+0x10/0x1c
[  234.183893][    C0]  el1_interrupt+0xa4/0xd8
[  234.184276][    C0]  el1h_64_irq_handler+0x18/0x24
[  234.184710][    C0]  el1h_64_irq+0x68/0x6c
[  234.185079][    C0]  cpuidle_enter_state+0x1d0/0x5b4
[  234.185526][    C0]  cpuidle_enter+0x38/0x54
[  234.185905][    C0]  do_idle+0x1d4/0x294
[  234.186268][    C0]  cpu_startup_entry+0x34/0x3c
[  234.186682][    C0]  rest_init+0xe0/0xe4
[  234.187042][    C0]  arch_call_rest_init+0x10/0x14
[  234.187477][    C0]  start_kernel+0x384/0x478
[  234.187866][    C0]  __primary_switched+0xc8/0xd4
[  234.188295][    C0] Code: f85f8e5e d65f03c0 943f17c6 34fffcd5 (d4210000)
[  234.188891][    C0] ---[ end trace 0000000000000000 ]---
[  234.204980][    C0] Kernel panic - not syncing: Oops - BUG: Fatal exception in interrupt

Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I9bace812173c232f16fd8cb72466d37fae98a5b6
2024-09-11 16:08:44 +08:00
..