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 55A7AA0548; Thu, 20 May 2021 03:23:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8E7340143; Thu, 20 May 2021 03:23:58 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2A96440041; Thu, 20 May 2021 03:23:56 +0200 (CEST) IronPort-SDR: 9CBZlp1vpff68aygINh7pH+raRNyzLhba+b2rwvkPDG54fPZRPLRM8Y2uXBPqIR4hThdZtqc7S 7B1WygNOHoTA== X-IronPort-AV: E=McAfee;i="6200,9189,9989"; a="198026783" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="198026783" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2021 18:23:55 -0700 IronPort-SDR: R4SYlyjwU/WwAL2aJFzmNLFHKzDgxqfS0wv1/vt5+XAyH5UJR/2b8jCLiKOClgAK3dcVUw8WFd EeDQ3W9mJqVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="474922335" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga002.fm.intel.com with ESMTP; 19 May 2021 18:23:54 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Wed, 19 May 2021 18:23:54 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Wed, 19 May 2021 18:23:54 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.44) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Wed, 19 May 2021 18:23:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NKPYeMtJzGbhoHw9UhFZDrbhpfth7/FZv3PpPwZGqGWn3JtGFlX3yd+DNIxTdx4vPKt54moE85ncOyC84WVUN4DrmGBc4IshiKbAeWiTfUUEb2saeyoRY1j3AvA3+9dvwSKS3jZ+UqxCQ6eqTueZSjSYqbXZBs9WMIiMlO909t30ejQvQfOTj6C9nM5yZqkbzmPXzm7G/gG3WNYz5YBRPXM7C0lOXf6ecPDGSzZiJcElhHMReliryHEVG0biMKD0CflPJJkyJwsGws9xZ0SXr+ZhXrUI1aNpCdN0CVEbKbfewYXToxdc2B9EkOuen/w0jefwp0aoTkJMLceHtI1mfw== 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=vq1cZcDMLPsm6g/mVQB2XncYqjGUYsF3oJjBH436hqw=; b=kOgapr57rFXqvpozhNgu8uPUSbYT1+7iseLqjPHANxWg6DWm2sbv7os1M9GALYIXXnT8aHvgsz+sF6P5j+RjiybiNyYdPAnvO60czFRpFG+J04WRa4KKkyGH44Lh6Hf0ghQWKa040OrBY456YQ0uur3qpVt+/GAiKKdvMNNThBuIHNmO1lwJc/uoqAchnR+cW4iIhiH268kdh/RYnw4TCtfD+xK9Nta6DnzkU9SkpuVEN2q0WPuXutlmEKchcAfT8v8vggVxgCnzn3Vc3uTaCDsiXSSDSOppM5VKGeCaLlTNA6qXnkWUM4mKEp31p41H27IJRZdZsGaB2MkBm1cuWw== 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=vq1cZcDMLPsm6g/mVQB2XncYqjGUYsF3oJjBH436hqw=; b=HbX5M9mrxmXqgPZT2Oyo2ueU93BYw0jByDep3gcMt/sClXI63JKlNobAkU0Eo95nuGU75seW2016qhWM4+g1mIuKeH+o4Jr9dSqf8jGJM5NOeP/AviUAgUpcNyWJQhdDtfQ/2suvbEzbHj1Z+RVYG8LbmLYNGJl1c+fpEgqnKyM= Received: from MN2PR11MB3807.namprd11.prod.outlook.com (2603:10b6:208:f0::24) by BL1PR11MB5269.namprd11.prod.outlook.com (2603:10b6:208:310::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Thu, 20 May 2021 01:23:50 +0000 Received: from MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::55a3:215a:f054:6b52]) by MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::55a3:215a:f054:6b52%5]) with mapi id 15.20.4129.034; Thu, 20 May 2021 01:23:50 +0000 From: "Xing, Beilei" To: "Wang, Haiyue" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "stable@dpdk.org" , "Wu, Jingjing" Thread-Topic: [PATCH v1] net/iavf: fix RSS key access out of index Thread-Index: AQHXTIfPDAD2tMUicEOF1bi0DJ2cK6rrlF0A Date: Thu, 20 May 2021 01:23:50 +0000 Message-ID: References: <20210519075933.11807-1-haiyue.wang@intel.com> In-Reply-To: <20210519075933.11807-1-haiyue.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.53] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4ff18249-892e-4ea0-4a79-08d91b2deca9 x-ms-traffictypediagnostic: BL1PR11MB5269: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Zzb+xcIB6DCQh2e8l/qOz7czTwuZSH1NgpVGtF+xQHMp5Ftnx11ebOCkj1k9xLKc5o93b3BL8B5ZIsssNrHlvw2Rq98HzjAXN5tDK8hsy2n9EKR0qVnCHh2nQ3icYdhDweu7AiCUNNHv5Oe3Bs8jLoQoaVBElieoTNuGs9PbwOwfc7cUo0E71JtrJWwhe+4xlHra27pBYytF1qiHTJ1XKnh/SjHEUX+tFnv3xgOkizLU6hGhPwogxlYSqGJ1rQZEQYX//O+rQys2REinKEzn1hnq5OcyA3ywvrrFMisXgrHLm/G2s9Es9YAy4a9RhcRo8kgXDPuqmpwl9TMQXxQ4KSqIdyUOx/A8SOH4IOkiWwW9+oh78WsALcrs4FpvZH2ShAYmO/H5gsIQQ4wp0rfN28Gazzb0yyiE0hY+1gBwxPJVtD1I6gd8nxntGE5g06Gys0o9le7NHtiCJIm255jxHzwhmZ/WMQ3eJIX9QWBuCSUhr4AigrnKdt2o3fgNqvCdZeF+MKJx30vdYFF1JAHSDdPmdvsVVYGw6E8jAAB7eTqGz+oyDhD0CMSbjpdCEAzEqPNYUfzuivPW+QD2fLZUu/ShMR+CYjc1HnRsLpVsRP4= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3807.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(136003)(376002)(396003)(366004)(39860400002)(83380400001)(52536014)(76116006)(66946007)(66446008)(66476007)(66556008)(2906002)(64756008)(71200400001)(26005)(122000001)(53546011)(110136005)(7696005)(4326008)(450100002)(38100700002)(478600001)(186003)(5660300002)(86362001)(8936002)(33656002)(8676002)(9686003)(316002)(107886003)(55016002)(54906003)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?8eFX3SlvgbiCyt8pDp51dysev7Pd5RK6RFeqwsqBbM888sutto6fpDUGYFcy?= =?us-ascii?Q?5Irm8SaPigYzSXaW6LZPfZx7ZbxbPjPYbmXmxRGfNDs60bnGccdQokrQPSTJ?= =?us-ascii?Q?ebOdBW/8d7p3kQpkx3N5uKclF5DKsJOGu989FpZh1RRoq3ZUKbsJQ22c1Spy?= =?us-ascii?Q?Mo+S/Dw/0POpHmp9Jc1S1EgW9qwULsTow3nIKFzfTAQ7taaeiAMif7izzeur?= =?us-ascii?Q?JceQgZINXiaKNKmEQiZ5NDjbSd4D6z7r0Op8SGE/DaKQqWru+W5451xv9BC6?= =?us-ascii?Q?iJ6BVFnUj/yBzds/e4PmJvj9xZDpIZ7fN9oJ78qXImdCOVW5iFls/PLYkGzG?= =?us-ascii?Q?N4GKevhx5CF3UcyUYnC9L/NLi5ZkjUqGnvU4TBVEhjFsy3J6ZBRWXVPBaqDd?= =?us-ascii?Q?PPooxfkOPpu5U0Hg7fZNWvC8F2OLaS42FeJRCQGFLbK8Gc8pU1icQvwLzikr?= =?us-ascii?Q?BEml0MaB3cLowCW82aIJBMVg+eoUn7RIhVVYzpFwcZle9XtxDAzhEUljjSzR?= =?us-ascii?Q?DlFIrpy7iUssYGCYSLoywAH75vbpGw5+1S4TuMyS0Tn2nn61RsxrolLXOmNr?= =?us-ascii?Q?w/O0JoYc+jiBhfdzWV93zDsJu7aMqbL50IyPF/P1fZVTLQ4krnD8ea+n0S20?= =?us-ascii?Q?m3yiYBvLAYPL2kybH6RYRuul77y+13dyKQogEHI/YC5Y6FjtS1grxlTcE+GU?= =?us-ascii?Q?dcRTzNAoL5DuqGjStfhocE7qLVZEyW3XIsFH3n+h1tt2MAyl2oU8YQnSI416?= =?us-ascii?Q?gQ7bQo+zU9JWUHpy+PsCN2BGV6Rco2mXZSL1vvTN4xdKPfPgSxkoCVawfwU2?= =?us-ascii?Q?uu/VKMpoSHQsue+rgSOCUDKSMZ5S6c8Bp0oHbO+RwxAMGOzeoGEVUnLzQ7/l?= =?us-ascii?Q?qPelHphc/j4Ewg9ZrhbNRfsK2I/1yK+8FnUdG1ky5FkuXjLAGe+JZgAcy8C+?= =?us-ascii?Q?GdtQAhNhP15rPSzzUi4NxxTjqU4o3X5R+Cc61llTM5DD6y+mSJJ4Kmjz7RLG?= =?us-ascii?Q?8IEvnGcPgSyCvxTns+SMQXxG8Ndif54zPGkJ48QcSTZ4nelz+aQ4mcetJ6Q2?= =?us-ascii?Q?Z4LJSFD3PABAlOrCeWVbM0a/BGJeszVRHJffmQKZh88L0yxvbV2qhyzXAZGa?= =?us-ascii?Q?C3Tnn7L/M7fsBMfTRw/vjJsNLrfexJ3ezCYaTKP/MBF01JQa8QA/pIw7mi8+?= =?us-ascii?Q?2tly9fcQY8WHqKeQLtmNelVqMZHEjWRKHPr8aeEf4iTNjWu9IPcvywMqOFMS?= =?us-ascii?Q?LsjOHY3j5v5q3U/avoZ7gN0lnvVCE5FVDSx5RzuPuguLB3jypDzNSRDnx3Py?= =?us-ascii?Q?abHv2SKVfPFln44vGxcK+hrR?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB3807.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ff18249-892e-4ea0-4a79-08d91b2deca9 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2021 01:23:50.6852 (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: ScB204geVTiRdEbmlt6DxbbrShCz7w6vEy/V4CAsck42LWK8Lj6cCbxxICerB9ar6g08YXbiGyGB6pvdBqQn6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5269 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1] net/iavf: fix RSS key access out of index 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" > -----Original Message----- > From: Wang, Haiyue > Sent: Wednesday, May 19, 2021 4:00 PM > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Wang, Haiyue > ; stable@dpdk.org; Wu, Jingjing > ; Xing, Beilei > Subject: [PATCH v1] net/iavf: fix RSS key access out of index >=20 > The array rss_key has size 'vf->vf_res->rss_key_size', the array index sh= ould > be less than that. >=20 > Cc: stable@dpdk.org > Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") >=20 > Signed-off-by: Haiyue Wang > --- > drivers/net/iavf/iavf_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethde= v.c > index d688c31cfb..cb38fe81e1 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter) > /* configure RSS key */ > if (!rss_conf->rss_key) { > /* Calculate the default hash key */ > - for (i =3D 0; i <=3D vf->vf_res->rss_key_size; i++) > + for (i =3D 0; i < vf->vf_res->rss_key_size; i++) > vf->rss_key[i] =3D (uint8_t)rte_rand(); > } else > rte_memcpy(vf->rss_key, rss_conf->rss_key, > -- > 2.31.1 Acked-by: Beilei Xing