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 1:56 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
> 
> 
> >Hello SK
> >
> >I am submitting and replying patches using gaurav.jain@xxxxxxx
> >
> >In Later kernel versions we have provided fixes related to job ring flush and
> there are other changes as well.
> >It would be better to add these changes on top of 5.10 tree as we also run
> multiple tests and not observed this issue.
> >
> >Regards
> >Gaurav Jain
> 
> Hi, Gaurav
> 
> Can you identify which commits?
> Our version has added some related commits based on 5.10
> -------------------------------------------------
> 04ff8e37a2df crypto: caam/jr - add .shutdown hook
> f7ea4a6a6511 LF-3093-1 crypto: caam/jr - fix caam-keygen exit / clean-up
> c41daf27fa44 LF-3079 crypto: caam/jr - fix shared IRQ line handling
> 1f12127de72a MLK-24912-2 crypto: caam - fix RNG vs. hwrng kthread race
> 04e3a61f9bb5 MLK-24912-1 crypto: caam/jr - update jr_list during
> suspend/resume f48d9e23262e MLK-24420-3 crypto: caam - add ioctl calls for
> black keys and blobs generation
> 5c98742fbf60 MLK-24420-2 crypto: caam - add support for black keys and blobs
> -------------------------------------------------


https://github.com/torvalds/linux/commit/06e39357c36b0d3cc2779d08ed04cb389eaa22ba - drivers: crypto: caam/jr - Allow quiesce when quiesced
apply this one as well.

> 
> But We have no way to port this commit because its architecture has changed
> too much.
> commit 304a2efe9d55875c6805f3c2957bc39ceebbc5c0
> crypto: caam/jr - Convert to platform remove callback returning void

Ok. I think this can be skipped.

> 
> 
> On your test enviroment, modify function caam_jr_remove Test scenarios1:
> if &jrpriv->tfm_count is not zero,whether will crash?
> 
> +atomic_inc(&jrpriv->tfm_count);
> if (atomic_read(&jrpriv->tfm_count)) {

This way jobring flush operation will not be triggered and reusing jobring result in error.

> 
> 
> Thanks!
> BR/SK





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