From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 2886C7CA9 for ; Thu, 1 Jun 2017 00:52:23 +0200 (CEST) Received: by mail-pf0-f180.google.com with SMTP id e193so19863419pfh.0 for ; Wed, 31 May 2017 15:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dOGNID/H/+pGVjrmJowB950p8h56ua3EUboMOEOFSk0=; b=UMdVOA08E7/7jy4qmuUJh1e8HcUdzRAcSeKWnmHf5Yo1CndAVZlFzcKncjzKOzw3i1 Qv37d2psBo0KjdZPtVqAB9O27o837EFxBExtGzxcJ67BZ5hwMHr8CM6ZoTNn7siQyGNx +J8StkLKxL40LnU9xjWdAhQEQf4EkRSVEi+SdHaUQayJ2tkDA7sMeIheSusrT6OB4z4b +ohykjUUsZ9zvMQtdhY/GdFX5TMniSf7wSh/F6GZtNKrX4jMCW0oA657K4It5hcrPDW2 47h/CjZH5N3+1mLU4Nf86zv8pvJqB6YVhz6MeYOnq+7U8ygS/upLpOsh7E3c/lCg12/V euOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dOGNID/H/+pGVjrmJowB950p8h56ua3EUboMOEOFSk0=; b=YUxC/B5ZRJw6ctbFydOx+MUCOEzxGl6XugspXKBz+MNB3CiMDy5+hvitixYOiq9vHa uLJVxXshDG6r+2eOFmbgJ4WNnZGLXGzIgELv8invNky7/aLRVhT8+e37/JXHWOk7Zuek /XBvg9SIYm8vyOhm94Wg9aPG2m2NHtgxjGTH/dp75eR0GifLHaGPBjKKMHmFwBJZld9w xWnl7+wONj6xZSVHsXFAI5OEoCvR3NMPAsB4pt2rf23PdhUikOI0rCcFYQMRaQ8I8H6H srlRJVXVxeItIqObqpEVfFisvbeQ/ColUpS/xlIqXo5PRLeSn7TuOyXPAl7xCdHvX//s /O+A== X-Gm-Message-State: AODbwcC5oisfFv/azWJ7EGTBbU9J2o8PjL4HZNCg4CJ+3V79r0c89eld YwuLDRKDOQ0prrYa X-Received: by 10.98.218.72 with SMTP id w8mr32784837pfl.155.1496271143123; Wed, 31 May 2017 15:52:23 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id y5sm26259745pgb.4.2017.05.31.15.52.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 May 2017 15:52:23 -0700 (PDT) Date: Wed, 31 May 2017 15:52:14 -0700 From: Stephen Hemminger To: Pablo de Lara Cc: declan.doherty@intel.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20170531155214.3758e616@xeon-e3> In-Reply-To: <20170531134443.39911-1-pablo.de.lara.guarch@intel.com> References: <20170531134443.39911-1-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] crypto/aesni_mb: fix assert check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 May 2017 22:52:24 -0000 On Wed, 31 May 2017 14:44:43 +0100 Pablo de Lara wrote: > Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue") > CC: stable@dpdk.org > > Signed-off-by: Pablo de Lara > --- > drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c > index 45b25c9..dde60c0 100644 > --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c > +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c > @@ -494,7 +494,7 @@ static inline void > verify_digest(JOB_AES_HMAC *job, struct rte_crypto_op *op) { > struct rte_mbuf *m_dst = (struct rte_mbuf *)job->user_data2; > > - RTE_ASSERT(m_dst == NULL); > + RTE_ASSERT(m_dst != NULL); > > /* Verify digest if required */ > if (memcmp(job->auth_tag_output, op->sym->auth.digest.data, > @@ -522,7 +522,7 @@ post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job) > > struct aesni_mb_session *sess; > > - RTE_ASSERT(op == NULL); > + RTE_ASSERT(op != NULL); > > if (unlikely(op->status == RTE_CRYPTO_OP_STATUS_ENQUEUED)) { > switch (job->status) { These kind of asserts are actually meaningless. In real world, it really doesn't matter if application panics because of assert (sigabort) or because of segfault on null pointer dereference. In either case it causes a crash. If you have built in a real signal handler and backtracing, or enabled core dumps then data is available. If not then the application just dies.