Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Ananyev, Konstantin
> > > > Hi Akhil, > > > > > > > > Hi Anoob/Konstantin, > > > > > > > > > > Check that ops->get_userdata is a valid function pointer will be > > > > > compiled > > out. > > > > > So PMDs that don't implement this function will crash in > > > > > rte_security_get_userdata(). > > > > > In our parti

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Akhil Goyal
> > Hi Akhil, > > > > > Hi Anoob/Konstantin, > > > > > > > > Check that ops->get_userdata is a valid function pointer will be > > > > compiled > out. > > > > So PMDs that don't implement this function will crash in > > > > rte_security_get_userdata(). > > > > In our particular case - ixgbe. >

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Ananyev, Konstantin
Hi Akhil, > > Hi Anoob/Konstantin, > > > > > > Check that ops->get_userdata is a valid function pointer will be compiled > > > out. > > > So PMDs that don't implement this function will crash in > > > rte_security_get_userdata(). > > > In our particular case - ixgbe. > > > Same story with rte_s

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Lukasz Wojciechowski
W dniu 23.04.2020 o 14:55, Akhil Goyal pisze: > Hi Anoob/Konstantin, >>> Check that ops->get_userdata is a valid function pointer will be compiled >>> out. >>> So PMDs that don't implement this function will crash in >>> rte_security_get_userdata(). >>> In our particular case - ixgbe. >>> Same s

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Akhil Goyal
Hi Anoob/Konstantin, > > > > Check that ops->get_userdata is a valid function pointer will be compiled > > out. > > So PMDs that don't implement this function will crash in > > rte_security_get_userdata(). > > In our particular case - ixgbe. > > Same story with rte_security_set_pkt_metadata() - s

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Anoob Joseph
df4kQ2Pu0iRHV9Co2J1gsNBE&e= > > > > > > That's a different story: > > > rx_burst/tx_burst, enqueue/dequeue are mandatory dev-ops functions > > > that have to be implemented by each ethdev/cryptodev API. > > > > [Anoob] I couldn't find a

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Ananyev, Konstantin
rent story: > > rx_burst/tx_burst, enqueue/dequeue are mandatory dev-ops functions that have > > to be implemented by each ethdev/cryptodev API. > > [Anoob] I couldn't find any reference stating that way. If you can point me, > I can update that to include

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Anoob Joseph
ny reference stating that way. If you can point me, I can update that to include datapath ops required for inline protocol processing. > > > > > > > Thanks, > > Anoob > > > > > -Original Message- > > > From: dev On Behalf Of Konstan

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Ananyev, Konstantin
source with that flag enabled?" Obviously this is not an option. It is a bug and it is a stopper for 20.05 release. It has to be fixed asap. > > > > >> -Original Message----- > >> From: dev On Behalf Of Konstantin Ananyev > >> Sent: Thursday, April

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Ananyev, Konstantin
540008a9467cf&q=1&u=http%3A%2F%2Fcode.dpdk.org%2Fdpdk%2Fv20.02%2Fsource%2Flib%2Flibrte_cryptodev%2Frte_cryptodev.h% > 23L962 > > That's a different story: > > rx_burst/tx_burst, enqueue/dequeue are mandatory dev-ops functions that > > have to be implemented by

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Ananyev, Konstantin
brte_cryptodev%2Frte_cryptodev.h% > 23L962 > > That's a different story: > > rx_burst/tx_burst, enqueue/dequeue are mandatory dev-ops functions that > > have to be implemented by each ethdev/cryptodev API. > > > >> > >> Thanks, > >> Ano

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Lukasz Wojciechowski
om: dev On Behalf Of Konstantin Ananyev >>> Sent: Thursday, April 23, 2020 5:22 AM >>> To: dev@dpdk.org >>> Cc: akhil.go...@nxp.com; declan.dohe...@intel.com; Konstantin Ananyev >>> >>> Subject: [dpdk-dev] [PATCH] security: fix crash at acc

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Lukasz Wojciechowski
n Ananyev >> Sent: Thursday, April 23, 2020 5:22 AM >> To: dev@dpdk.org >> Cc: akhil.go...@nxp.com; declan.dohe...@intel.com; Konstantin Ananyev >> >> Subject: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented >> ops >> >> Valid checks for o

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Lukasz Wojciechowski
W dniu 23.04.2020 o 02:11, Ananyev, Konstantin pisze: > Actually looking at app/test/test_security.c > I also see a few '#ifdef RTE_DEBUG's. > Let say: > > +static int > +test_get_userdata_inv_context(void) > +{ > +#ifdef RTE_DEBUG > + uint64_t md = 0xDEADBEEF; > + > + void *ret = rte

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-23 Thread Ananyev, Konstantin
tantin Ananyev > > Sent: Thursday, April 23, 2020 5:22 AM > > To: dev@dpdk.org > > Cc: akhil.go...@nxp.com; declan.dohe...@intel.com; Konstantin Ananyev > > > > Subject: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented > > ops > > > > Va

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-22 Thread Anoob Joseph
an.dohe...@intel.com; Konstantin Ananyev > > Subject: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented > ops > > Valid checks for optional function pointers inside dev-ops were disabled by > undefined macro. > > Fixes: b6ee98547847 ("security: fix verificati

Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-22 Thread Ananyev, Konstantin
Actually looking at app/test/test_security.c I also see a few '#ifdef RTE_DEBUG's. Let say: +static int +test_get_userdata_inv_context(void) +{ +#ifdef RTE_DEBUG + uint64_t md = 0xDEADBEEF; + + void *ret = rte_security_get_userdata(NULL, md); + TEST_ASSERT_MOCK_FUNCTION_CALL_RET(

[dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops

2020-04-22 Thread Konstantin Ananyev
Valid checks for optional function pointers inside dev-ops were disabled by undefined macro. Fixes: b6ee98547847 ("security: fix verification of parameters") Signed-off-by: Konstantin Ananyev --- lib/librte_security/rte_security.c | 4 1 file changed, 4 deletions(-) diff --git a/lib/librt