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 4DF33A00C5 for ; Wed, 20 Jul 2022 10:22:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46BB141101; Wed, 20 Jul 2022 10:22:43 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2053.outbound.protection.outlook.com [40.107.94.53]) by mails.dpdk.org (Postfix) with ESMTP id 24EF94003C for ; Wed, 20 Jul 2022 10:22:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hHpTv4gVHtvOurxKFpZk62daVPqHAWvEb0i+0dYOilm4m84dlsIQ/JlDOs8sxOzNG8n5n5yd1lsa2sG+p6aXmAo9RvSWprl0OPtm9I882D0tEHospLD1iX8DboyEwvGFWRjjl0E3s4rJLG/PNEu0CWnu5a8rnnHUXWeAtPQFdrL3FeaHB47GH74GmFmks6A+Fq1b3EhmGQkY8Ybep6GQhleaGqFRvUcefU6vtzjWJcmm4DQG4ywGmNvqPIKtprevtpZOcvg4nlGdV9X7fPdfOfY6fBOTXM9zc9fcgs3L+IeFDPbbagY9cb0MQ7jGgZx22GPhl1zUa7fr+CM90rTY9A== 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=3h0XLio0GvT8fyDi8WsYD/k7rDzsqMwbljnX/6c7/2U=; b=lk/eaPCDyFv2eqVGUsSoNLRQBbW1Op3X2r/+VizYe6G+eNa4bJNbbnyrroznXM/XxT1mIf1wBGdMZMpAOfHtzvfacS7gnx3hzqZpmcBb5KVqKq0xvBHQuicnivGDcRCrWt8JX688xQOi4XGumQUgV14Dpldv2S2zDCK9hI9ucRZp1nijxgDqsm0+afu2ZWNTibvnK3ym+v+ivT+aUnAWWa4sXO2eB+VycIV6dZ1LXy3IssRX6mvfyLjXo44pvQpniqYG9bXFZKzxMwzR7X6MwRTl2KLlu1OXuH7Bacny9yIRaHNOrCxOQePImwPjj9e1v/Kf2WrgpqDYYHGtCMqYaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3h0XLio0GvT8fyDi8WsYD/k7rDzsqMwbljnX/6c7/2U=; b=VZCDWmUfWD0AZUBMsIS+qd7Y/QLY6ICZPog42lWBP0UiNJ+2sAa60oGIDXjGsKnkGf1uDgm+sr+BdDSRggSNOOvBEhYwLt8wFlidaEU2qPReErDraMG403Uzuom9AOVxHJ40q22Hobtd5HU2WB+HiIRdVdcGnBbwPjtmQmOFP8KxfiHHMDEjzHu3xD18+ItTmzcs3D0LKo7ZDlIETC3Vbh2FANCm1MHJVSd9RjwLRtC8uGl9JQ2ZoIlU/fxLEmIihbmtLu/7sXRkwupjm3YH82ciWfFUP4v1uetp3DsVf8zyjWJUjmQtkm52BqVjoZgUBSdQF8IrW3fk5Hm7w6pciQ== Received: from BN9P223CA0019.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::24) by BN6PR12MB1185.namprd12.prod.outlook.com (2603:10b6:404:1e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.18; Wed, 20 Jul 2022 08:22:38 +0000 Received: from BN8NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10b:cafe::ad) by BN9P223CA0019.outlook.office365.com (2603:10b6:408:10b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.20 via Frontend Transport; Wed, 20 Jul 2022 08:22:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by BN8NAM11FT036.mail.protection.outlook.com (10.13.177.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:22:38 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:22:33 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 20 Jul 2022 01:22:31 -0700 From: Xueming Li To: Nicolas Chautru CC: , Maxime Coquelin , "dpdk stable" Subject: patch 'baseband/acc100: add protection for some negative scenario' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:20:35 +0300 Message-ID: <20220720082132.3954126-6-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc651e80-beaa-4bfa-8635-08da6a2901e3 X-MS-TrafficTypeDiagnostic: BN6PR12MB1185:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?eDXjqDf/SV27VjjnciNJRXsQXIqAN6yUzjRDAaWGE3Y0r0ticU6/kKCdVCzQ?= =?us-ascii?Q?+xvsuv1yw81uVeehzRn0jvG4AHGvNjpQCI8VfpartJEtCqLjv8X3CbR3BXUE?= =?us-ascii?Q?crZafyOwWaez/305AXDTRJxNm9NQFOjOjCKPNquNIJVehqB9GMYVKlkkSEPN?= =?us-ascii?Q?prwDIQFmw3Nc/bdkWcXaW5rCCfjHdtF792cnfWPS4vPJ/o5KeIURWW/MY6qv?= =?us-ascii?Q?mqSubzNb53BXQZyC4BJ4rPdxD/2G1hLvKVoX9+BrUTs7USJKfc41cVVPd3HE?= =?us-ascii?Q?nsq5cAb/sGXTjfYkFksX9am+VPZea6p+bwr7SjmhK8X+40kdfXDfBkS5wI6v?= =?us-ascii?Q?UAHM/0cijES/zGW9rlIRoAS5Zl0+XQmUEAvGbmuDebFAND3FuQx0y+69SxWU?= =?us-ascii?Q?YIVBdDUl7ujFqfyIlamWBmblB4/MHeTrRCAno46+23K7t/n7baUKa3PXAqjq?= =?us-ascii?Q?P00/Icn6seFY5hrQte9Gpju45i6Ou8cPlPb/5zezxw7rzjz8DCCwZSdQPv4g?= =?us-ascii?Q?G54BMKoqbPK2ERLxbhk0fToOVxqF+dtmultxP/+azbbqeCjY/a10BSdI563r?= =?us-ascii?Q?PhKBx7Xebnj1jkwpgZlRENK/D4lEOiIBfrbmj8FUbYo60aUGBDtxnrEDH8MC?= =?us-ascii?Q?jc3b14cUmjUDY2sz8Qutlba/tVWHhG28ZRGhmK4HSr1sz3Pfaw5dbzdyVtn8?= =?us-ascii?Q?xUGx5cjeZeoCwhokh750rngaEwmk5kO5zrt87+dwaMqQ223GEiZtKKSh2LgB?= =?us-ascii?Q?A/VHDvDr5tnhIJhhECOgaQDEEWSXQzxbO27bEi4E1oGOWoT+AOedDkMbncBP?= =?us-ascii?Q?TTZHIrL/s9zFnOVSchgTKnTYMIg6dwI1SImPYzXECZOTGvBxB4gznq/eLyR4?= =?us-ascii?Q?is4HF3P+m0RNbM1veLMKH2ulq4RAbbqwOzmr499JOZcQMspptoU2AzCK8HQz?= =?us-ascii?Q?qvmMWFpndcFTxkIetd9lGA=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(346002)(136003)(376002)(39860400002)(40470700004)(36840700001)(46966006)(5660300002)(8936002)(36756003)(81166007)(356005)(1076003)(54906003)(478600001)(6916009)(2616005)(186003)(82740400003)(316002)(16526019)(41300700001)(86362001)(336012)(426003)(47076005)(7696005)(36860700001)(2906002)(966005)(40460700003)(26005)(82310400005)(6286002)(40480700001)(70206006)(70586007)(4326008)(8676002)(55016003)(53546011)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:22:38.2519 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc651e80-beaa-4bfa-8635-08da6a2901e3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1185 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.6 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/22/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/437389abd9170b9792966555653e9806c41cd453 Thanks. Xueming Li --- >From 437389abd9170b9792966555653e9806c41cd453 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 Cc: Xueming Li [ 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 29b2f14807..cc3f54ef29 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -1234,6 +1234,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index) return (bg == 1 ? ACC100_K0_3_1 : ACC100_K0_3_2) * z_c; } /* 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) / n) * z_c; @@ -1758,6 +1760,10 @@ 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)) *s_out_length = e; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:00:59.092564452 +0800 +++ 0006-baseband-acc100-add-protection-for-some-negative-sce.patch 2022-07-20 15:00:58.651000594 +0800 @@ -1 +1 @@ -From 8454d94825181d7b833ea8346671e15b8dde5640 Mon Sep 17 00:00:00 2001 +From 437389abd9170b9792966555653e9806c41cd453 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8454d94825181d7b833ea8346671e15b8dde5640 ] @@ -9 +11,0 @@ -Cc: stable@dpdk.org @@ -18 +20 @@ -index 79bee4345d..32c8bc2b34 100644 +index 29b2f14807..cc3f54ef29 100644 @@ -21 +23 @@ -@@ -1236,6 +1236,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index) +@@ -1234,6 +1234,8 @@ get_k0(uint16_t n_cb, uint16_t z_c, uint8_t bg, uint8_t rv_index) @@ -30 +32 @@ -@@ -1764,6 +1766,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op, +@@ -1758,6 +1760,10 @@ acc100_dma_desc_td_fill(struct rte_bbdev_dec_op *op,