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 7AD3FA0543 for ; Sat, 5 Nov 2022 18:13:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74BC440151; Sat, 5 Nov 2022 18:13:40 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id 310D9400D5 for ; Sat, 5 Nov 2022 18:13:39 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id a14so10886551wru.5 for ; Sat, 05 Nov 2022 10:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o4UECMTH+obl6S5JyOZTyj8gXSd6TqwFE7YNnY8DxgI=; b=XpbxX3VRYz3Zni2RSjwnFAyc8BJB8RYrJ6OfIgnUo9tyY+T/zrcIo0+k7RnPi/jcqC BSrA1D4weWwFp8IuBJhFlGsIkW0hEUA9JrbZNFxCmsiUVIcoqfvk4P6CiZAkszh/gW8l ofuiK3endQEynmzwRu5FQ6fFsrIcvYec/hr9D1X/mJRALi2FdnvTKCiDOuncNxEGb2Rn v3I0GocMvxUYP03iax2GBYReazqtT4ORm1I8G7nH0OysBGUPIlrWqkdqKjdDa/BXbeFV 2eG9Pyes3/8sFiXcpsmCoK48Da8FpyvFOY7AihNelCelRCwwMJP6JO6TiNhLakUtVsV0 ZlGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o4UECMTH+obl6S5JyOZTyj8gXSd6TqwFE7YNnY8DxgI=; b=kDwNaSD78CkFoYpouuXo8VO7HXEeryIB9Ke0ZC3h1g1c/L/HOkJbwQyqB3IDcGrQES qM2nBrBONM2rKluVE0HxfhwvPbkq4Scaoa4jsQXIIVAuk8bHGMl92KvfsI/wkMPRnlZ4 YEza5TrOa2uyVWjADMBZ1xX7NG8dGMMd4KuiWm3G6rpQ1U55s/mtwps9CpAz4sIO3JLY LjpSOpEMQTdtv3wgaymVtX5n7NoRnkjk0CPdSTYDbMZ4L/z4xovR0rihaqjdB7ghO1rt bqOQIF6nX8MtXm8pEg5SaZhuRnl0x3Zgz8ZnSJdGf06tGoCA9owcfxqPcS7uD8KIe8ko PvuQ== X-Gm-Message-State: ACrzQf1MdfsZmcHPSqKSScveuI0c8gokrbxi34HZ3jGFK0haYN93aw7m 46uEJsKg11eWs/hqEhpX7qQRkC4QAwY= X-Google-Smtp-Source: AMsMyM5eVsvg2Y442IbqwJsrTrGkOVP9PvkkbGi5MRazNC+Rw+qCnyQd/YWgxS76Rg8zgMIa7gWizw== X-Received: by 2002:a5d:67cf:0:b0:236:6f36:6029 with SMTP id n15-20020a5d67cf000000b002366f366029mr25856210wrw.224.1667668418864; Sat, 05 Nov 2022 10:13:38 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id s7-20020adfeb07000000b0022a3a887ceasm2552948wrn.49.2022.11.05.10.13.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Nov 2022 10:13:38 -0700 (PDT) From: luca.boccassi@gmail.com To: Ciara Power Cc: Fan Zhang , Pablo de Lara , dpdk stable Subject: patch 'test/crypto: fix wireless auth digest segment' has been queued to stable release 20.11.7 Date: Sat, 5 Nov 2022 17:11:34 +0000 Message-Id: <20221105171146.1520039-35-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221105171146.1520039-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-100-luca.boccassi@gmail.com> <20221105171146.1520039-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/07/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ed2b89a29ec9dd06cbd95ff898447e04668ee4e5 Thanks. Luca Boccassi --- >From ed2b89a29ec9dd06cbd95ff898447e04668ee4e5 Mon Sep 17 00:00:00 2001 From: Ciara Power Date: Fri, 7 Oct 2022 13:46:50 +0000 Subject: [PATCH] test/crypto: fix wireless auth digest segment [ upstream commit dc3f6c5347b2b64899694c2f94a6af53c95d2b4d ] The segment size for some tests was too small to hold the auth digest. This caused issues when using op->sym->auth.digest.data for comparisons in AESNI_MB PMD after a subsequent patch enables SGL. For example, if segment size is 2, and digest size is 4, then 4 bytes are read from op->sym->auth.digest.data, which overflows into the memory after the segment, rather than using the second segment that contains the remaining half of the digest. Fixes: 11c5485bb276 ("test/crypto: add scatter-gather tests for IP and OOP") Signed-off-by: Ciara Power Acked-by: Fan Zhang Acked-by: Pablo de Lara --- app/test/test_cryptodev.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 9dfea535a0..bba040078b 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -2636,6 +2636,16 @@ create_wireless_algo_auth_cipher_operation( remaining_off -= rte_pktmbuf_data_len(sgl_buf); sgl_buf = sgl_buf->next; } + + /* The last segment should be large enough to hold full digest */ + if (sgl_buf->data_len < auth_tag_len) { + rte_pktmbuf_free(sgl_buf->next); + sgl_buf->next = NULL; + TEST_ASSERT_NOT_NULL(rte_pktmbuf_append(sgl_buf, + auth_tag_len - sgl_buf->data_len), + "No room to append auth tag"); + } + sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(sgl_buf, uint8_t *, remaining_off); sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(sgl_buf, -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-05 17:11:11.774426054 +0000 +++ 0035-test-crypto-fix-wireless-auth-digest-segment.patch 2022-11-05 17:11:08.782944960 +0000 @@ -1 +1 @@ -From dc3f6c5347b2b64899694c2f94a6af53c95d2b4d Mon Sep 17 00:00:00 2001 +From ed2b89a29ec9dd06cbd95ff898447e04668ee4e5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit dc3f6c5347b2b64899694c2f94a6af53c95d2b4d ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index c6d47a035e..203b8b61fa 100644 +index 9dfea535a0..bba040078b 100644 @@ -29 +30 @@ -@@ -2990,6 +2990,16 @@ create_wireless_algo_auth_cipher_operation( +@@ -2636,6 +2636,16 @@ create_wireless_algo_auth_cipher_operation(