RE: [EXT] RE: [PATCH v5.10.y] crypto: caam/jr - Fix possible caam_jr crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Kun Song <Kun.Song@xxxxxxxxxxxxx>
> Sent: Wednesday, January 10, 2024 5:27 PM
> To: Gaurav Jain <gaurav.jain@xxxxxxx>
> Cc: Kun.Song@xxxxxxxxxxxxx; Varun Sethi <V.Sethi@xxxxxxx>; Aymen Sghaier
> <aymen.sghaier@xxxxxxx>; davem@xxxxxxxxxxxxx; filip.pudak@xxxxxxxxxxxxx;
> heng.guo@xxxxxxxxxxxxx; herbert@xxxxxxxxxxxxxxxxxxx; Horia Geanta
> <horia.geanta@xxxxxxx>; linux-crypto@xxxxxxxxxxxxxxx; Meenakshi Aggarwal
> <meenakshi.aggarwal@xxxxxxx>; richard.danter@xxxxxxxxxxxxx
> Subject: [EXT] RE: [PATCH v5.10.y] crypto: caam/jr - Fix possible caam_jr crash
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> >https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu
> >b.com%2Ftorvalds%2Flinux%2Fcommit%2F06e39357c36b0d3cc2779d08ed04c
> b389eaa22ba&data=05%7C02%7Cgaurav.jain%40nxp.com%7Ce1aa575fb6344e
> d3c60f08dc11d342fd%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C
> 638404846267170151%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&s
> data=x37XZurb8Lu%2BGnJtkPUeCkBnZfOROXxo6rl4XNBzM18%3D&reserved=0 -
> drivers: crypto: caam/jr - Allow quiesce when quiesced apply this one as well.
> 
> Hi, Gaurav
> 
> Our version has backport this
> commiti(06e39357c36b0d3cc2779d08ed04cb389eaa22ba), but the problem still
> exists.
> 
> When crash occurs, the log will output
> 
> <3>caam_jr 8030000.jr: Device is busy
> <3>caam_jr 8020000.jr: Device is busy
> <3>caam_jr 8010000.jr: Device is busy
> <3>caam_jr 8010000.jr: job ring error: irqstate: 00000103

I have discussed this issue internally and this is a known issue. when caam_jr_remove is exited with EBUSY,  caam JR is not released.
Disabling interrupt is only avoiding the crash for the jobs sitting in input ring.
As mentioned in the commit https://github.com/torvalds/linux/commit/304a2efe9d55875c6805f3c2957bc39ceebbc5c0
jrpriv & other register are freed automatically. So any calls to JR driver via crypto api will result in crash.

Regarding this problem, discussion have happened in the past but not concluded.
I will reinitiate the discussion to have a proper fix and will add you as well.

Regards
Gaurav Jain
> 
> 
> Thanks!
> BR/SK





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux