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 3D706A0C47 for ; Tue, 10 Aug 2021 17:44:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 376C14014F; Tue, 10 Aug 2021 17:44:15 +0200 (CEST) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by mails.dpdk.org (Postfix) with ESMTP id D0FBD4114F for ; Tue, 10 Aug 2021 17:44:13 +0200 (CEST) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id BA33D3F338 for ; Tue, 10 Aug 2021 15:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628610253; bh=5AP2dzWQmetkNwE6G5QVVMfPs+OnCAS4GY0Pon18HyY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QE9xYOtLPQYuTVWU+5ZMz0sNJR5ek4TKU/t+mdJr3F5dKqCsSp2pTuMkABAW76sXD 8XMp9BDYiasLRZPkLfpZRKuqGaDFYePfZFN6HZu11Vdz9SZ1dApT3cWvb5le2oV9TQ CmytUmfiaFocPbcGjHsMJTzrbpnaNwmUW2w+mB8d6OPpMDOad8CtCFti1bmk34IJFg nGJCva77QB5E6hY+uAgUd+m857RrnHa029vK7kvN+UlSLrLENrz6BLmKbrqoIEXUtx Qrg2ayEzLkwO0oJ1dXVfn8/bC/6UsEqbo1H8JlRfrcJ+3L12sXh6MIpXyZwuAQ0ubA espqRKQKESUJA== Received: by mail-ej1-f71.google.com with SMTP id ne21-20020a1709077b95b029057eb61c6fdfso5751296ejc.22 for ; Tue, 10 Aug 2021 08:44:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5AP2dzWQmetkNwE6G5QVVMfPs+OnCAS4GY0Pon18HyY=; b=cUaJgkm+AoMgkwQNfb7Fa9HQBU4aA6KfXSTM/s51sx3+M+/RKDyj+vNs7lciDe7V1P DzMFZNdGRJWNZt2e0nYFwmd3vXaZ44nh4Ijr+HrxP/hbHGkIqeHsHnqVCsuT/eSpLg9/ E2LryJ8sOQ/s09xPH5DVArkuQyZoOjB/AG54dBvovS5opHspuhfd3ALHj8+QQApPlUYd XQkCV04mwsh0pb18yV2iEkJmk/5UlA0TT6FYD0AfSrKhc/GnJqHY4aBFp2EsSu2aeXSn EbI8dBeJE+qHmX9MhyQFgoms2RtoS4isFHw/JEKtPNtxxTCzHKMPDu/wmuKhTzMbh1SJ 9ocg== X-Gm-Message-State: AOAM533gFnKRCaMLxuesThl8wQ/Su0p2X2zFcckGsU5dOxXD6QdtxO/Q Ul8+fJL5CNduqjVJBKy+Mdgs6vZlF0o8z8ilbfvGmAmCp0o4YyrpU+VtFJoc7blzcEgaxMCt84Q hfsjIRgyMzRefJOKCWq+UBZDL X-Received: by 2002:a50:ec0a:: with SMTP id g10mr5649671edr.125.1628610253456; Tue, 10 Aug 2021 08:44:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQla6mFmcV7QGTZZXGNlUFQOlqk+X04u8lc5j2+3A7yfI16iKbjtP5k7zGgrBkhbmFDJY3kQ== X-Received: by 2002:a50:ec0a:: with SMTP id g10mr5649649edr.125.1628610253239; Tue, 10 Aug 2021 08:44:13 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id fp5sm3646319ejc.6.2021.08.10.08.44.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 08:44:12 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Abhinandan Gujjar Cc: Ciara Power , Akhil Goyal , dpdk stable Date: Tue, 10 Aug 2021 17:39:54 +0200 Message-Id: <20210810154022.749358-74-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810154022.749358-1-christian.ehrhardt@canonical.com> References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test/crypto: fix mempool size for session-less' has been queued to stable release 19.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/76f8afec4acd5c34a769b20acd3f8f2f3b2b5eb8 Thanks. Christian Ehrhardt --- >From 76f8afec4acd5c34a769b20acd3f8f2f3b2b5eb8 Mon Sep 17 00:00:00 2001 From: Abhinandan Gujjar Date: Sun, 18 Jul 2021 17:48:51 +0530 Subject: [PATCH] test/crypto: fix mempool size for session-less [ upstream commit b812567ef6daa2a99a05a38bd79252c97e46078b ] Currently, private_data_offset for the sessionless is computed wrongly which includes extra bytes added by sizeof(struct rte_crypto_sym_xform) * 2. This causes buffer overflow which leads to test application crash while freeing the ops mempool. This patch provides fix for the same and also takes care of increasing the length of ops to accommodate space for rte_event_crypto_metadata while creating the crypto ops mempool. Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test") Signed-off-by: Abhinandan Gujjar Reported-by: Ciara Power Acked-by: Akhil Goyal --- app/test/test_event_crypto_adapter.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 1c0a0fa5e3..b30e0f8f3e 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -224,8 +224,7 @@ test_op_forward_mode(uint8_t session_less) op->sess_type = RTE_CRYPTO_OP_SESSIONLESS; first_xform = &cipher_xform; sym_op->xform = first_xform; - uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH + - (sizeof(struct rte_crypto_sym_xform) * 2); + uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH; op->private_data_offset = len; /* Fill in private data information */ rte_memcpy(&m_data.response_info, &response_info, @@ -419,8 +418,7 @@ test_op_new_mode(uint8_t session_less) op->sess_type = RTE_CRYPTO_OP_SESSIONLESS; first_xform = &cipher_xform; sym_op->xform = first_xform; - uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH + - (sizeof(struct rte_crypto_sym_xform) * 2); + uint32_t len = IV_OFFSET + MAXIMUM_IV_LENGTH; op->private_data_offset = len; /* Fill in private data information */ rte_memcpy(&m_data.response_info, &response_info, @@ -516,7 +514,8 @@ configure_cryptodev(void) NUM_MBUFS, MBUF_CACHE_SIZE, DEFAULT_NUM_XFORMS * sizeof(struct rte_crypto_sym_xform) + - MAXIMUM_IV_LENGTH, + MAXIMUM_IV_LENGTH + + sizeof(union rte_event_crypto_metadata), rte_socket_id()); if (params.op_mpool == NULL) { RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n"); -- 2.32.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-10 15:11:15.875900565 +0200 +++ 0074-test-crypto-fix-mempool-size-for-session-less.patch 2021-08-10 15:11:13.078638532 +0200 @@ -1 +1 @@ -From b812567ef6daa2a99a05a38bd79252c97e46078b Mon Sep 17 00:00:00 2001 +From 76f8afec4acd5c34a769b20acd3f8f2f3b2b5eb8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b812567ef6daa2a99a05a38bd79252c97e46078b ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index f689bc1f22..3ad20921e2 100644 +index 1c0a0fa5e3..b30e0f8f3e 100644 @@ -28 +29 @@ -@@ -228,8 +228,7 @@ test_op_forward_mode(uint8_t session_less) +@@ -224,8 +224,7 @@ test_op_forward_mode(uint8_t session_less) @@ -38 +39 @@ -@@ -423,8 +422,7 @@ test_op_new_mode(uint8_t session_less) +@@ -419,8 +418,7 @@ test_op_new_mode(uint8_t session_less) @@ -48 +49 @@ -@@ -520,7 +518,8 @@ configure_cryptodev(void) +@@ -516,7 +514,8 @@ configure_cryptodev(void)