[dpdk-dev] [PATCH v2] lib/cryptodev: fix driver name comparison

Anoob Joseph anoobj at marvell.com
Tue Mar 19 05:38:03 CET 2019


Hi Akhil, Declan, Pablo,

Can you review this patch and share your thoughts?

Thanks,
Anoob

> -----Original Message-----
> From: Trahe, Fiona <fiona.trahe at intel.com>
> Sent: Monday, March 11, 2019 4:11 PM
> To: Anoob Joseph <anoobj at marvell.com>; Akhil Goyal
> <akhil.goyal at nxp.com>; Doherty, Declan <declan.doherty at intel.com>; De
> Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>
> Cc: Ankur Dwivedi <adwivedi at marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj at marvell.com>; Narayana Prasad Raju Athreya
> <pathreya at marvell.com>; Suheil Chandran <schandran at marvell.com>;
> dev at dpdk.org
> Subject: RE: [PATCH v2] lib/cryptodev: fix driver name comparison
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Anoob Joseph
> > Sent: Monday, March 11, 2019 5:56 AM
> > To: Akhil Goyal <akhil.goyal at nxp.com>; Doherty, Declan
> > <declan.doherty at intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch at intel.com>
> > Cc: Anoob Joseph <anoobj at marvell.com>; Ankur Dwivedi
> > <adwivedi at marvell.com>; Jerin Jacob Kollanukkaran
> > <jerinj at marvell.com>; Narayana Prasad Raju Athreya
> > <pathreya at marvell.com>; Suheil Chandran <schandran at marvell.com>;
> > dev at dpdk.org
> > Subject: [dpdk-dev] [PATCH v2] lib/cryptodev: fix driver name
> > comparison
> >
> > The string compare to the length of driver name might give false
> > positives when there are drivers with similar names (one being the
> > subset of another).
> >
> > Following is such a naming which could result in false positive.
> > 1. crypto_driver
> > 2. crypto_driver1
> >
> > When strncmp with len = strlen("crypto_driver") is done, it could give
> > a false positive when compared against "crypto_driver1". For such
> > cases, 'strlen + 1' is done, so that the NULL termination also would
> > be considered for the comparison.
> >
> > Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for
> > crypto devices")
> >
> > Signed-off-by: Ankur Dwivedi <adwivedi at marvell.com>
> > Signed-off-by: Anoob Joseph <anoobj at marvell.com>
> Acked-by: Fiona Trahe <fiona.trahe at intel.com>


More information about the dev mailing list