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 A0FE0A0032 for ; Fri, 24 Jun 2022 17:02:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96375427FF; Fri, 24 Jun 2022 17:02:11 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 0EA3E427EC for ; Fri, 24 Jun 2022 17:02:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656082929; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C1QC9hi72+Xl1B3KuBlavfYj0pvuyKO0+Hv6UY599gU=; b=JUgV8xEEyH0X+4/GnoV511xZyGnc5lpomQNT3i56gWAUfFWerj5For+oWNxCtg8H4tACDT HFrXhlH493wCwb+hIjpkj6kW5d6FXHU5Vo3sc4v18en8vzTON2KnZoN3v0mTrgf0oDp9Q5 hFrXhU6VlVgP50jTdZ4NYfgj01W7jPI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-391-i3H_5qz7N2iUxcHSgUJ2Ug-1; Fri, 24 Jun 2022 11:02:08 -0400 X-MC-Unique: i3H_5qz7N2iUxcHSgUJ2Ug-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 190CD3C1015E; Fri, 24 Jun 2022 15:02:08 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA5919D63; Fri, 24 Jun 2022 15:02:06 +0000 (UTC) From: Kevin Traynor To: Nicolas Chautru Cc: Maxime Coquelin , dpdk stable Subject: patch 'baseband/acc100: add protection for some negative scenario' has been queued to stable release 21.11.2 Date: Fri, 24 Jun 2022 16:01:14 +0100 Message-Id: <20220624150148.1855580-6-ktraynor@redhat.com> In-Reply-To: <20220624150148.1855580-1-ktraynor@redhat.com> References: <20220624150148.1855580-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/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/fd2d725ae5b240642dc4aaa3ab1a11b0e529dfd8 Thanks. Kevin --- >From fd2d725ae5b240642dc4aaa3ab1a11b0e529dfd8 Mon Sep 17 00:00:00 2001 From: Nicolas Chautru Date: Tue, 31 May 2022 15:31:43 -0700 Subject: [PATCH] baseband/acc100: add protection for some negative scenario [ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ] Catch exception in PMD in case of invalid input parameter. Fixes: 5ad5060f8f7a ("baseband/acc100: add LDPC processing functions") Signed-off-by: Nicolas Chautru Reviewed-by: Maxime Coquelin --- drivers/baseband/acc100/rte_acc100_pmd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index 170eceb37b..6cdc6e65f7 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -1237,4 +1237,6 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index) } /* LBRM case - includes a division by N */ + if (unlikely(z_c == 0)) + return 0; if (rv_index == 1) return (((bg == 1 ? ACC100_K0_1_1 : ACC100_K0_1_2) * n_cb) @@ -1765,4 +1767,8 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op, /* Soft output */ if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_SOFT_OUTPUT)) { + if (op->turbo_dec.soft_output.data == 0) { + rte_bbdev_log(ERR, "Soft output is not defined"); + return -1; + } if (check_bit(op->turbo_dec.op_flags, RTE_BBDEV_TURBO_EQUALIZER)) -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-24 15:51:09.184871634 +0100 +++ 0006-baseband-acc100-add-protection-for-some-negative-sce.patch 2022-06-24 15:51:08.843984006 +0100 @@ -1 +1 @@ -From 8454d94825181d7b833ea8346671e15b8dde5640 Mon Sep 17 00:00:00 2001 +From fd2d725ae5b240642dc4aaa3ab1a11b0e529dfd8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 79bee4345d..32c8bc2b34 100644 +index 170eceb37b..6cdc6e65f7 100644