DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops
@ 2020-04-22 23:51 Konstantin Ananyev
  2020-04-23  0:11 ` Ananyev, Konstantin
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Konstantin Ananyev @ 2020-04-22 23:51 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, declan.doherty, 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 <konstantin.ananyev@intel.com>
---
 lib/librte_security/rte_security.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index d475b0977..b65430ce2 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -107,11 +107,9 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance,
 			      struct rte_security_session *sess,
 			      struct rte_mbuf *m, void *params)
 {
-#ifdef RTE_DEBUG
 	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, set_pkt_metadata, -EINVAL,
 			-ENOTSUP);
 	RTE_PTR_OR_ERR_RET(sess, -EINVAL);
-#endif
 	return instance->ops->set_pkt_metadata(instance->device,
 					       sess, m, params);
 }
@@ -121,9 +119,7 @@ rte_security_get_userdata(struct rte_security_ctx *instance, uint64_t md)
 {
 	void *userdata = NULL;
 
-#ifdef RTE_DEBUG
 	RTE_PTR_CHAIN3_OR_ERR_RET(instance, ops, get_userdata, NULL, NULL);
-#endif
 	if (instance->ops->get_userdata(instance->device, md, &userdata))
 		return NULL;
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2020-05-11 10:15 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 23:51 [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops Konstantin Ananyev
2020-04-23  0:11 ` Ananyev, Konstantin
2020-04-23  7:58   ` Lukasz Wojciechowski
2020-04-23  4:07 ` Anoob Joseph
2020-04-23  7:54   ` Ananyev, Konstantin
2020-04-23  8:06     ` Lukasz Wojciechowski
2020-04-23  8:11       ` Ananyev, Konstantin
2020-04-23  8:22       ` Ananyev, Konstantin
2020-04-23  9:09     ` Anoob Joseph
2020-04-23 10:54       ` Ananyev, Konstantin
2020-04-23 11:23         ` Anoob Joseph
2020-04-23 12:55           ` Akhil Goyal
2020-04-23 13:30             ` Lukasz Wojciechowski
2020-04-23 13:47             ` Ananyev, Konstantin
2020-04-23 14:08               ` Akhil Goyal
2020-04-23 14:48                 ` Ananyev, Konstantin
2020-04-23  8:00   ` Lukasz Wojciechowski
2020-04-23  8:28     ` Ananyev, Konstantin
2020-04-23 15:10 ` [dpdk-dev] [PATCH v2] " Konstantin Ananyev
2020-04-23 15:51   ` Akhil Goyal
2020-04-23 16:08     ` Anoob Joseph
2020-04-23 16:14       ` Akhil Goyal
2020-04-23 16:29         ` Lukasz Wojciechowski
     [not found]   ` <CGME20200423162615eucas1p2224e9313aa640f755cf226649d093bb9@eucas1p2.samsung.com>
2020-04-23 16:25     ` [dpdk-dev] [PATCH] test/security: enable tests for " Lukasz Wojciechowski
2020-05-09 21:47       ` Akhil Goyal
2020-05-11 10:15         ` Lukasz Wojciechowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).