From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE751A0554; Tue, 28 Jun 2022 12:32:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBDBC40691; Tue, 28 Jun 2022 12:32:32 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 0955D400D7 for ; Tue, 28 Jun 2022 12:32:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656412351; x=1687948351; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=pZgIl2ffoX3z6wreQZJ2H1w5Q3Zl/ybG2BTAsR5hDRQ=; b=VjbzKDm3P+ili1XAVjAL+w66lbFEPQm7HYfLBeDKvdhhBr6rn96c+enD hvZmizK0TvO1A9NlN0ihqAuGlASZEnWZa3YVaqSD+OvW+l5ZT/6+Alair sek/x7Qig+r5eyJuPYwe2tFV9sApriX4xzpOp0ojplmFqeFkKiyl5FVc0 xAWbHeHt6Ik4VFOn4p8ydc0ka+tBrU7FVmzeYEmmHPJfSph77mCKNkqqs FDJENN4bBs9aeFHQ6FaR6WQQ4yCUXbAcLgyh3gE+lUBA53tFGk7dQu8Qo +kQEHDB7vAsSXL77kF1smqtCx/0N7wiVUkijzi+hVK8ctG9LnM/81AGBP g==; X-IronPort-AV: E=McAfee;i="6400,9594,10391"; a="368017511" X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="368017511" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 03:32:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="767129853" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga005.jf.intel.com with ESMTP; 28 Jun 2022 03:32:29 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 28 Jun 2022 03:32:29 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 28 Jun 2022 03:32:28 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 28 Jun 2022 03:32:28 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 28 Jun 2022 03:32:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DpJCWwwtEo5fkbFageY/XbSvWoN/yfz2h6h3qBPupiTCrYSUvG6oeE8QxGwc3/No3KU2739C2TL8h1licgOZOYESg/OLTX+BHpvZ7cDjbw0IMHe000sos9Vj1cxDvILJSpsDJVr3hEajtJbRsQbDZ7dvXc4afg03REu/9MPxvywAXRWw8Lu9FWTvDRLpaRw1/OBiC8NxjPlOQzcH9gkH6aRPlHcB2GLj5aBDL1uWR4AzYQi6vI6zU/yMqEXtETWI7XOxDZVXEq6/pfAZgrbTvF+O8z02Ou4GifpWVIU10yCyPejO56nQilrTecAVvU0XetqTmPqVF+i7efeotKbAcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pZgIl2ffoX3z6wreQZJ2H1w5Q3Zl/ybG2BTAsR5hDRQ=; b=cwwAPySsrLY4FYNsFyPRNdLhRwf1L8vHUJMxiIekaFmRaGkUtxQa96f/tjaBOtM72sy2SYoF3nqzgmyNuahUzxuvWlgCczJGr+kVT+2j51RWLXmzW+ZOsTaqOcagjWwG4llX91b6xrajWZSAmayUC7jqHkGNjy/IRz4nfgQf8NWNSbQmlzBzLWfJyHJ+QujA/S2Iuc03fTufwTP+c4i0STyqQn97RZjb9Q7WwK5rwLhAjTmPl7LWcENkxP5Una2kXNBSNfBpZj76KkSOlL41iZpzwgXk5ByhKxRMNrX34rkro5fSyUHvB76vCgGZkb+09Ryyyd8QWv80kH7EtdAgdw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BYAPR11MB3846.namprd11.prod.outlook.com (2603:10b6:a03:f5::13) by BN8PR11MB3619.namprd11.prod.outlook.com (2603:10b6:408:85::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Tue, 28 Jun 2022 10:32:26 +0000 Received: from BYAPR11MB3846.namprd11.prod.outlook.com ([fe80::1c17:1cd0:7618:c405]) by BYAPR11MB3846.namprd11.prod.outlook.com ([fe80::1c17:1cd0:7618:c405%4]) with mapi id 15.20.5373.018; Tue, 28 Jun 2022 10:32:26 +0000 From: "Troy, Rebecca" To: "Zhang, Roy Fan" , "Kusztal, ArkadiuszX" , "Trahe, Fiona" , Tomasz Jozwiak , "david.marchand@redhat.com" CC: "dev@dpdk.org" Subject: Re: [PATCH] crypto/qat: fix docsis segmentation fault Thread-Topic: [PATCH] crypto/qat: fix docsis segmentation fault Thread-Index: AdiK0iRMe9XnpFZnTTCWT6w6Uf60LA== Date: Tue, 28 Jun 2022 10:32:25 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.500.17 dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 82b451a2-0c26-4a62-c938-08da58f17e7f x-ms-traffictypediagnostic: BN8PR11MB3619:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7FCsLUk2qX48Jgfby4KzJRvXBoCnMowIsr9PPAbw6Xr3nreiD69YwSsFCdHKHxnqI/3VDAucY3eB06kHSAdMhL/r35VkYfXMMbMetoc+Zj+kM/iYeqDLiDAe7VpJtpwEc7l7IeIEzsmAYx+I68wZBPkRTbThPyNkcFJngWVPRgckbLgNkcHwhR2yX7ticJgztO1ANS14Bqwy8iprH7j72RlgO978vOPjgRFiowls5w0F9zCkRYz5/IrxiUr7ZVBaZRaVVXd/XMZeKmV3umfQ/bR6TYVfCKFz1I0yKUDQwqyWP4KCiC7zciFPhgEIhWtz7BQ6043BoVAUC6HkfEVZNw00+dGVh2ZFJefjBurvH1Sv8Iftrh6hxQE3PSm5r8vp/DIFrm8O+lKWOFlpLhd1hHJeXfacdMO5wmoLd7RWiykQZwivPAK18XlXicKrg0/NXfGQSNQgOUE0QyrRWHVCW7Wu3Z4KKDOgNg9B3oUMyADs581quGqBEGlqHlaxziCEuiZbd2yD/8OPBf3OEICao2FaQZfvEhm7AUYtb5cbL0WLxBdh1uyqo/QhFWmHHdcIRP2c35keFpLrj3bul+Ai4VtArklUdrfZ+zqeKM2ZbcNxWa74OuE33tKzAawjSVAZOovMZTiMgheEUjUNS4oHMT5Y2vtiWjC1X0/9gVtuvS77qAOyahxIeFx67GrRJ6+z+W0OJLrwLZrzJyJj71/8HMT3//xYkSVgQBjRyQuagRF+Fo8igIXp3YwQidBd9qUGcFQNxdc7CvNfPkWJIlHyxns/ritSN+VrzZTavyNpy5g= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3846.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(136003)(366004)(346002)(376002)(39860400002)(396003)(41300700001)(7696005)(53546011)(71200400001)(478600001)(86362001)(9686003)(26005)(38070700005)(55016003)(38100700002)(122000001)(186003)(6506007)(82960400001)(66556008)(64756008)(52536014)(316002)(76116006)(2906002)(4326008)(66476007)(33656002)(8676002)(5660300002)(83380400001)(8936002)(110136005)(66446008)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?egU4urzxPIe3xLLfp4iTZvp3ay0UyRPcVGmVU35q1gCxZOTSSx5g+1pkzCUm?= =?us-ascii?Q?LaxX63u4cX7It2hGE8CFTWTBOULr8M03tXMgRFVz3dO19jVTAwu2hOR8WRQE?= =?us-ascii?Q?Fg6D8K1cgvImC/SUM1u5SfDABpUqKQWY8OyFZQJERQmahC1SZMVSJSueGxfr?= =?us-ascii?Q?6brD7wONcB8AfrFlmr8NzHhduAwt2p5Xh37VIeW0/ggVgWoWrc9H7hfpgd18?= =?us-ascii?Q?4InNTXo/e6SMncu2HOUR5LxwLoa10vXGb12J/qa3hB/CsPS56XnFe8iSsLN/?= =?us-ascii?Q?UzfYXTd5LlwqElkEc1lFogCzBpGl66fYxoa3v8Q1BhOUwYDWBpLLo61YJJrW?= =?us-ascii?Q?cYFfNs8Gx1CwYkppw2V+9Qdl1wRtoBy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AQwuiqulPpBlE8VMoh2273AaSWD/n0xciepdWEnlHTmjEsXx2KJvG5U?= =?us-ascii?Q?SyQ2kJi7u28tA/L+FlUUgGf2+elhAntYxprw96pkR0PJS324zGfabMidAToa?= =?us-ascii?Q?Vl0reH2F2b1LRD+dA5RIEvQptUeEJRLZSPC8KHTuSY8PqHuzRH0vH/C7HbKR?= =?us-ascii?Q?Pz2AgsqBcyl1/2EO0EM7JDqbcw+s8DoTVGBD2Rnj/eQzct25/NvC9tjh3jdS?= =?us-ascii?Q?n7MbPQmH5zbfNvChOWSYuehn+qmh7dbZ4ViQ9+bjTcbu3RBwc2J8zu6BpWjj?= =?us-ascii?Q?Wkqx+tVmZ7W2etVQz0THnO8PafUS9jiGnpD6KLeL?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3846.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82b451a2-0c26-4a62-c938-08da58f17e7f X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2022 10:32:25.8856 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ZWJK6HCvfI/U8cNb4FJ8ZnjB3fGjUON/sHl/TyhmSNrEDFtS/YYhBHGKAEdQg+cBgrY7UgqQ9a6YZSS3xXgycw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3619 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > On Mon, Jun 27, 2022 at 6:45 PM Rebecca Troy > wrote: > > > > Currently if AES or DES algorithms fail for Docsis test suite, a > > segmentation fault occurs when cryptodev_qat_autotest is ran. > > > > This is due to a duplicate call of EVP_CIPHER_CTX_free for the session > > context. Ctx is freed firstly in the bpi_cipher_ctx_init function and > > then again at the end of qat_sym_session_configure_cipher function. > > > > This commit fixes this bug by removing the first instance of > > EVP_CIPHER_CTX_free, leaving just the dedicated function in the upper > > level to free the ctx. >=20 > This is awkward. > This helper should let *ctx alone until everything succeeded. >=20 > -- > David Marchand Hi David, This bug was found under unusual circumstances. Unit tests failed due to no= legacy algorithm support on the system, which caused a segmentation fault = rather than the expected 'Tests failed' result. When these unit tests fail, the current error handling directs that the *ct= x be freed twice - once prematurely (which is the instance this patch is re= moving) and then again after the tests have registered as failed, causing t= he segmentation fault. I agree that the *ctx shouldn't have been freed prem= aturely, so this patch fixes the incorrect error handling here by removing = that first instance of *ctx freeing. Hope this clears things up. Rebecca Troy.