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 BDD4AA0C47 for ; Mon, 26 Jul 2021 15:54:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFAD440F35; Mon, 26 Jul 2021 15:54:37 +0200 (CEST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id BC1D640F35 for ; Mon, 26 Jul 2021 15:54:36 +0200 (CEST) Received: by mail-wr1-f43.google.com with SMTP id e2so11190995wrq.6 for ; Mon, 26 Jul 2021 06:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4lY8K6NR+kphnJWjfShgiTn/YgrJwJ7P09F2GJm4qQQ=; b=iXB/wkhqwyXFxIXpyR2LQGKeQ3vLJvplCUMAeh6j5HpqyMbNWZbKkLFd9aOwFI+B0w nzrDpMy/paRB2b/KjteHDtg8ZduA2PKR7DWh/nVDYdrY8n+QnGKPvEbuIWV4VE4yGCbj HrnFkOzutXR4M+Jtsx1nOjzNdfLkwidwTJfPcVXc9wbox+bRwQIJ8Lm4vW0ygdihimRL M2ZyoeJ1IYdVYui8NfZVaOxbwYF1S+zycwylWoo7fBwsZsI7hbNWp93tgjlhqXZP22NF Mu3PaYGgUSdrs1WUrNEJck0tCFucb0XJ48G2nK0U/xicZiY+R3PSygB9Lt/pyWMEGa1Y I2Sw== 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=4lY8K6NR+kphnJWjfShgiTn/YgrJwJ7P09F2GJm4qQQ=; b=TehZrOHA3fqUCX0nNgloZDHZCf6CV5wBYbUS1tCmHqqluZwkGIK0hVUpHJolebYDGP TqgOHkWGPN2Fzm5NR2zZrrF6fxBLbNKeyhkN3xcaxmhUgmOPJlFPfL5pnQMrWF4mrv1h 9Xjp5LkG+H+bBwThuorOOVX52bYeH7qYGJrDJQVXsbJqEy60hazfzw1w98cdGsNIIS/C 9H29nq0aUrY3GNAVMbucVWL1a+PaZyJZLqocqBV+3olJIbyJrAmX2/qddF5nw/VURja1 f/gqCra9Tblg+xywawAZyKgMKewQXjV8AFt4E44mYejWyxZtkEh06MhytWIeo6MlgQTI Gipw== X-Gm-Message-State: AOAM532PNeUcyOtfVX33rtMESageuZbPdfVvrZnsiXVKp4yGT+VmhL3A /j5f0JQ5J2pnhhJUNlTi7cM= X-Google-Smtp-Source: ABdhPJwX0rEdNcPRrjbiJZVUHtQCOtkYpqvzZm7a9vQKualqyeMsL44AqlkLiPuhk3mTWd6+etsJWA== X-Received: by 2002:adf:e3cf:: with SMTP id k15mr19069864wrm.60.1627307676516; Mon, 26 Jul 2021 06:54:36 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id p4sm43489130wrt.23.2021.07.26.06.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:54:36 -0700 (PDT) From: luca.boccassi@gmail.com To: Abhinandan Gujjar Cc: Ciara Power , Akhil Goyal , dpdk stable Date: Mon, 26 Jul 2021 14:52:44 +0100 Message-Id: <20210726135322.149850-21-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.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 20.11.3 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 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/28/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/db878744bc390175b754e5cba78290f73b5ed03e Thanks. Luca Boccassi --- >From db878744bc390175b754e5cba78290f73b5ed03e 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 335211cd8c..71b58fcbb8 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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:16.958898775 +0100 +++ 0021-test-crypto-fix-mempool-size-for-session-less.patch 2021-07-26 13:53:15.837292370 +0100 @@ -1 +1 @@ -From b812567ef6daa2a99a05a38bd79252c97e46078b Mon Sep 17 00:00:00 2001 +From db878744bc390175b754e5cba78290f73b5ed03e 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 335211cd8c..71b58fcbb8 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)