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 8550A41D9C; Tue, 28 Feb 2023 12:05:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E8F640EE4; Tue, 28 Feb 2023 12:05:05 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2067.outbound.protection.outlook.com [40.107.220.67]) by mails.dpdk.org (Postfix) with ESMTP id BB4564021F for ; Tue, 28 Feb 2023 12:05:02 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AcNK3xRTNuCeIoo++eMSZukRWEZ3JWWW8DqbipW1/k8avoObWiaFR0n6sS541rA+W6mB/6AdUWZpLewpTvGLWl4iRA0g7ZMR+m/eYyBOpm/dlJB6VyJCB5A6c4DuNPiE7iOs6B6JhEv6hJQTAR+bNBhesOu1iN0sGOvtfdI6Lf+h3iI1frl8NMaRwZ82iL0JJsndZF+97byYkqO+mzw7VTPCKAXo8XaxskVWYl7MmIJTjuxAw5Hj7ta1FPYXZl7fCl7SlNQt2cz8iXVgZSzNzju0oTmOn7K4xCm6IpJUM3Vx9KooOzc5J18zbh5T8rm824GRWNmzIogktXJRz+KYfg== 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=MbZDmZNatLnDE1TEyOEdH9GkwRPWw085rPaU9NebxJw=; b=exNZ2WTlLdSjGRW/cWdHEfknvGaB0rcxzDaYPZgesQas1jKV5nXE+67cvhGlyETYO/UpNxCTEV5utISIM2ZK+DAt6lQs6c4fPUSJd/M0oeipa1c3XNKGKWePIiKVlqrIcn6Z8ynXVPuI3/3ZjXMfrFe+DMi75UYcs7x70dzbAmIvrJq5gxQEOD5EB/F8xqa7SiTA2HRBNpiMRI+H1C2AggDN6vLMI2952ZgWc88+UXTxP0/Slfh75bPaRcfdUx+zHN4S+fgxQVDDmxEc6/5pjJFqTphjtHOgSy2IZKcwnfdxuqYJV9HeVLdKiFfiK94pAPwEWuMEeOr9V8LAD946Rw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MbZDmZNatLnDE1TEyOEdH9GkwRPWw085rPaU9NebxJw=; b=OkQT5FRukwbf/9mDNjId6B8d/0mZKeci6hcdM5AEqEJiNkeg0KG8E4L/F5qke5fqIQqSNgt+t2bzb2UV0E0peYXgF0tbhdJ5b2+42ydatSie3JUSaWwEXZ5qADQTJrgOt+aQfbHxqOzQ5GI9lwkSE+LvxH6NOQlIuztpmbvmfOw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB8557.namprd12.prod.outlook.com (2603:10b6:8:18b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29; Tue, 28 Feb 2023 11:05:00 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%7]) with mapi id 15.20.6134.030; Tue, 28 Feb 2023 11:05:00 +0000 Message-ID: Date: Tue, 28 Feb 2023 11:04:54 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Ankur Dwivedi , dev@dpdk.org, Thomas Monjalon Cc: jerinj@marvell.com, David Marchand , Ali Alnubani , "Li, WeiyuanX" References: <20230223123029.2117781-1-adwivedi@marvell.com> <20230223123029.2117781-2-adwivedi@marvell.com> From: Ferruh Yigit Subject: Re: [PATCH v1 1/2] ethdev: fix null pointer dereference In-Reply-To: <20230223123029.2117781-2-adwivedi@marvell.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0013.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:150::18) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB8557:EE_ X-MS-Office365-Filtering-Correlation-Id: e0f03e95-2c71-4b2e-8422-08db197ba27c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: At5pCLoNuvjMmaZEfWWcoKcwRknsT07oU3bIrsWAo3X33kapCLy1cuOpo4qk1MBG8C4Ay78W/yB8mIVDZ3nnzcz3TPXG5/8s5xf+kqFLBkzpNF37FL9xWjjvpca+Zd5/xSfQ7v0aiaFU3ks6xFlk6dURom6kRzLVUzq0/BBzno0Vj790KWGoFAQzVGsgTSa3DuhnaZXvsVHP0mXqlkVrWwgWwQLJNRFKdW+oaWg+eh1i9MEsIXOIPuUEAtrOBpIV4IkS2vxWXWYOIcXuReWxgUMR4TdGhXkNuQL71wyYmrGpLy6RNJCis33r9BnanSbtWalqVla/igrdsL97mX5zzmzL9BciLvpWHRCLZC5o7/Ahg81fExCtEjQT8JqnAy8/St9540gcAhD13IM7MX/Ei7kZ3yFgbBRC0JAHOthAGU8untGpOXNfbO+8WFW4+QCr8+S7c2Slwwamvhl7Y1De8K0qqXkeqYMVydqKjftlcslGzzJu/q2ushCDwjXksC4ZNDH5dmHxTDZJA2+N49nBD4aP3F7RFXb6cVx60i3M6qkNmVTXrpbkoe6DFcABCtg6upAcS5AZRADfhyqHbB27iZzU9nQAP6QtCHZGWTsxBeXtHwyYr75n//8WNPtM4elP0jTMH228sMPZtepMKvMIJYGNhBFii+oeTlbjjyUr2nzMHsMvJWQA28VNGS85px5umZFB9totCw+91a1sF7iDb9MvXS/7h4fGN8xjtEPzQW4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(346002)(376002)(366004)(136003)(396003)(451199018)(86362001)(36756003)(31696002)(38100700002)(66476007)(66556008)(2906002)(44832011)(8936002)(8676002)(66946007)(5660300002)(41300700001)(478600001)(2616005)(6506007)(26005)(110136005)(54906003)(6666004)(316002)(6512007)(6486002)(4326008)(186003)(53546011)(966005)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RzM5WWN4M0w1UytSWm9sS3FmZG1USEQ2cENnQk81dkJGQmdQb3BpVnYzWU93?= =?utf-8?B?V0NrY1VMcVNPaDZKVUM5L3RKZ3FZWVM5aUREQVRSd0t3YVlib2xudzljWWlC?= =?utf-8?B?NWNhNnI5cmN1WHg1UnlnUEx3UVJNTFU3b25uZHRQNUFuTWw5bzhITTUzQUk5?= =?utf-8?B?T1ZHdDJSV1dQb0d3VllmZEk4STQ2aWV1c21yVFdVMVFlOVhmYU9xRmJmWE4r?= =?utf-8?B?aUZnMVEzWGFxSnZNdnBKSURibEI5eEtsTGNIVldWcHVXd1RvM2c2SCtjUjBN?= =?utf-8?B?OTIybHljcktTc2lUdHFoTWpxWHZSL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-8?Q?x07LABCCuneAuom8Z5BC1NL8U?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e0f03e95-2c71-4b2e-8422-08db197ba27c X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2023 11:05:00.2986 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fdINBl7+87OtK3vN/QE8MInQQ3IQtiS3W4hF6d5YdScdV28vRnHE8AZMSUTTAmNn X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8557 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2/23/2023 12:30 PM, Ankur Dwivedi wrote: > The speed_fec_capa pointer can be null. So dereferencing the pointer is > removed and only the pointer is captured in trace function. > Fixed few more trace functions in which null pointer can be dereferenced. > > Coverity issue: 383238 > Bugzilla ID: 1162 > Fixes: 6679cf21d608 ("ethdev: add trace points") > Fixes: ed04fd4072e9 ("ethdev: add trace points for flow") > > Signed-off-by: Ankur Dwivedi Hi Ankur, There is another bug report: https://bugs.dpdk.org/show_bug.cgi?id=1167 As far as I can see that is caused by '__rte_trace_point_register()' is calling 'register_fn()' [1]. At registering trace point stage, most of the pointers can be invalid, and this can crash other locations too. Why 'register_fn()' called withing the trace point register? Can we remove it? [1] #define RTE_TRACE_POINT_REGISTER(trace, name) RTE_INIT(trace##_init) __rte_trace_point_register(..., (void (*)(void)) trace); __rte_trace_point_register(handle, name, void (*register_fn)(void)) { ... register_fn(); ... }