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 53F09A0C46; Fri, 23 Jul 2021 10:38:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA67B40040; Fri, 23 Jul 2021 10:38:07 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id A7DB84003C; Fri, 23 Jul 2021 10:38:05 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10053"; a="211897642" X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="211897642" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2021 01:38:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,263,1620716400"; d="scan'208";a="502433214" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by FMSMGA003.fm.intel.com with ESMTP; 23 Jul 2021 01:38:03 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 23 Jul 2021 01:38:03 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Fri, 23 Jul 2021 01:38:03 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 23 Jul 2021 01:38:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D1Pre7DC7/ZdsrtKLs345yomm1uMn49/pV7xXmf2tVgBZBtRi2WVKee9S2Ir4am79XVr/1ca/pvtd1EkgdCdP4J78dlmybZGR6wgPS8xAVuIhPzq9dWuUEvtNPOBt3iTObaUR5x14VrVcYWFPTAE/AngELK8btEUaFVNMCElbhfDD7b7fQwULu2IiJU9x6He6xk6YfOh/YIpq7qsqYffEuZLcV03JU5gp5rdujdGH3dzM/tt5H3+DHEqoTLLLPP75KmDrQU/6Z4CQaXeTCoGK79yUavfjuyngDOz7+EpMbauwc7DX40qG0ihduKYk2CNOEVcaL/IbVp4Q1JXCmmtPw== 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-SenderADCheck; bh=jW85TIjwQk2i0nibBfOCCJGJo+N6gIAjx+VAHFL5qZM=; b=dTKieV6rMxGIb1m+b6HMFzTNAp4AyIdHdlooZvN94x8vQUu6D55UptGyiXSLLATWgw+/pfPWbfaj2ADXosCB7+0DvOy9OM1kEDDpPKPewfFILFmAYOIl+SHD2CY1oSbN6p+g7wqtnbXKlGn3B4QbdwrXPtT6cdb1GqwvdQCzzbpZ524/N9/mqWo3ZhgvawO7ihoJ1cTmPGaTWGgeUJd7L+LFZbtgxdLzcB0YWIqpyR6kbgy8zFF7gorAl+1brQ/VKvXCO7wJ397eQ6tn+/MhEtFWaVcdDpFalOqExrYJMKGKrO0VHPaZ+27zGmXdOiBPORsPTtHYGJr+KmlIpTgIDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jW85TIjwQk2i0nibBfOCCJGJo+N6gIAjx+VAHFL5qZM=; b=vSCuicKB43A+rtGkXPt/tgx395CIQnaqIPPXlfw+42d0lxDsv3PBBrLaR5O3steZBbSNtvyFdyQfXYS9pSfVsTkiykjtr0HAIRcTqjYhvuJ+y/YvB5tgOTfhzsCga51psvV6NqtYlMa7mhM/o95/UWgvFqIzpI9LRh7A7bBiKZo= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5047.namprd11.prod.outlook.com (2603:10b6:510:3c::18) by PH0PR11MB5190.namprd11.prod.outlook.com (2603:10b6:510:3c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Fri, 23 Jul 2021 08:38:01 +0000 Received: from PH0PR11MB5047.namprd11.prod.outlook.com ([fe80::513:57f8:360:23fc]) by PH0PR11MB5047.namprd11.prod.outlook.com ([fe80::513:57f8:360:23fc%8]) with mapi id 15.20.4352.029; Fri, 23 Jul 2021 08:38:01 +0000 To: Richael Zhuang , CC: References: <20210723021313.7085-2-richael.zhuang@arm.com> <20210723022242.8092-1-richael.zhuang@arm.com> <20210723022242.8092-2-richael.zhuang@arm.com> From: David Hunt Message-ID: Date: Fri, 23 Jul 2021 09:37:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.12.0 In-Reply-To: <20210723022242.8092-2-richael.zhuang@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-ClientProxiedBy: LO4P123CA0248.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a7::19) To PH0PR11MB5047.namprd11.prod.outlook.com (2603:10b6:510:3c::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.4.11.161] (95.45.22.52) by LO4P123CA0248.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.26 via Frontend Transport; Fri, 23 Jul 2021 08:38:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cc191bd2-2f80-40ac-747b-08d94db52eaf X-MS-TrafficTypeDiagnostic: PH0PR11MB5190: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:849; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V76sC5Ujag13C0cClw63S9blu7HnGtvyISM4wDk+Z99BVxHksU879fz0pEQMYvvOxwydwVhJSLAD9pOTFlKSd4KmBmIyU6QFFywbJQvn3SLdi97kgrdRiY95EnChpRgZgxFifcIJu2NFdKA5WMs50VM+HhcLtGTUvbr9T2B2a39H7s9bmAYyAIEqn8OcZyiWXYhBA+Zdrc0m6NWxdSMj3eLzeanXQgsYGilytOUMR04Hf039Bx2W/a5jT44Zux4Xzfz0iXsbnJu/xkwfGVCGX78QZAhGJzu+vKodrFA3pZib4SseAMuY1OtLK5UF9YmtAYizdCO666ExQpQVYWNcyqQUH/IGsIf/7h4Gcc4s2ncfwx32jMjGN1He/njl2UCiZqaQCSn9Qbm5ccNUkKXsAzBsxEFP2dCbbI0GXSkysmlvVMQhDJqfWY1nusu8mMYc2IH16WczuE9NQ8YrRHddiQp2OWLu5mXIAMUImn52cUwkjt3cXuA4GgWKORDPLba5nR/oypWQ4MzzK20L1R86gO0GN+wPd+HMevsrT5W829L5snDMcIKHtHpAHA19Q6Evi4kKYlQVqy+roZNvcClzuhKYOjVGhvi0eqcwnmKhX6dWvN9JRHzHHtmAm7ISo52/xo0fFd4mcKE9QdxtVatGvcG/mfax0WnQ/WbUIjoHKG1TPeUuTIAoRtGIiz4gMwT1awm9f9yQ9ddvkVdeGq3EGPMZVAgWr3SeNslcOCCLEuQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5047.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(376002)(346002)(366004)(396003)(39860400002)(6486002)(956004)(66946007)(36756003)(5660300002)(4326008)(83380400001)(186003)(316002)(4744005)(38100700002)(53546011)(31696002)(8936002)(2616005)(44832011)(26005)(478600001)(2906002)(16576012)(31686004)(6666004)(86362001)(66556008)(8676002)(66476007)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eVZyVWt0disxQnhQbnU3d1NyMmEzbjBGVGIydFpyT2ZlcitwRGxHV0lxZk1v?= =?utf-8?B?Z3RyWWRINzJ2Tmdub0krZDBrVXFtM05neWFTK2w5R25RSGZBak9VSTZTVURu?= =?utf-8?B?Yll5UFZJanpsemlBSUJacTA0K3F0bVorNEI2Q1FaakQ5OVVQeklwdWdROWF2?= =?utf-8?B?T2c5VHc2K0RhZUtlYWpHT3JhWERNM3R5d2lYZ0wvQlcxTGFzVnA2KzV1UkF4?= =?utf-8?B?RUFpUUFHNTZTUFBudTVhMFJlS3BGMVpLZTlZcER1YWdJaTJWZk53ekVyMncy?= =?utf-8?B?dE5WdjdOVW02bzI1MWVhWEpuZURUYVNhZzVlaHJKZ2FQVSt1UExGY1dMNENL?= =?utf-8?B?a3o5Kzczam15Y0xnL3Z4V0xiYlBHUWcxaUFOa1dVZ2lmYTJtWWhWbHhXbllp?= =?utf-8?B?MWhuaG9SYVY2WDBzNDlQWkNKUGtEZnptYVExZmhoVnVEZm0vR2djVEdWYzFy?= =?utf-8?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NkQ2V0FoUVZRcDBsRWxnZWNHcHRn?= =?utf-8?B?dWt6S3hBRDZsUDdFTTFvSGpnbnE4QTk4cEFJQTk5dndZUmx3SVNCTE9lVWgw?= =?utf-8?B?L2h1VC9lN2dqM2NJRjFGT2NtSE5IYmtuWE5EbmsrZFhpVjUvMmJlZXpucDlW?= =?utf-8?B?OUlrdVlGQjRodUVYMkgrSlJwM0lpcEU4ZW1JcmdWS1RVV3Ztcjl3UEtubUtF?= =?utf-8?B?SHFLekNtbVNCT09mRVB3bUZ2YXhnWE1GNFlSU2ZJcDlnZGJJUUIydzhWMDVS?= =?utf-8?B?eStNb0JieWJxUlJheGZNejJGNHgvd0NMbFNFMlY4TFpLVzJiYXFpa1BiNEZF?= =?utf-8?B?V2xvSGJzMm1YSUtZRkdIVVNPdGFCWWRkQjVJZzZUQlJkZnF4T2tSdUpMdlcz?= =?utf-8?Q?OO/YWDZhoWZ91LhjZz14Q1kAbgEmk3NJ6YsssW7?= X-MS-Exchange-CrossTenant-Network-Message-Id: cc191bd2-2f80-40ac-747b-08d94db52eaf X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5047.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2021 08:38:01.8390 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rtx8rkczBrmb6M4WL9mu+uj0A511NfjNblQQFySvagU9wyKENpYMcpRtWBElSvOL+YTfN5rbh+cVgm7dDEH2Ow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5190 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 1/1] power: check freq count before filling the freqs array 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 Sender: "dev" Hi Richael, On 23/7/2021 3:22 AM, Richael Zhuang wrote: > The freqs array size is RTE_MAX_LCORE_FREQS. Before filling the > array with num_freqs elements, restrict the total num to > RTE_MAX_LCORE_FREQS. This fix aims to fix the coverity scan issue > like: > Overrunning array "pi->freqs" of 256 bytes by passing it to a > function which accesses it at byte offset 464. > > Coverity issue: 371913 > Fixes: ef1cc88f1837 ("power: support cppc_cpufreq driver") > Cc: richael.zhuang@arm.com > Cc: stable@dpdk.org > > Signed-off-by: Richael Zhuang > --- > lib/power/power_cppc_cpufreq.c | 5 +++++ > lib/power/power_pstate_cpufreq.c | 5 +++++ > 2 files changed, 10 insertions(+) > ---snip--- LGTM to fix the coverity issue. Acked-by: David Hunt