From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FE63C43381 for ; Thu, 21 Mar 2019 15:26:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 12AF621874 for ; Thu, 21 Mar 2019 15:26:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Hok3BpOX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728530AbfCUP0c (ORCPT ); Thu, 21 Mar 2019 11:26:32 -0400 Received: from mail-eopbgr150057.outbound.protection.outlook.com ([40.107.15.57]:31047 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727070AbfCUP0b (ORCPT ); Thu, 21 Mar 2019 11:26:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rX0A1JaXTOvMgMjJHSsMrbz7SwurVQsDLh30OMZyc2Y=; b=Hok3BpOXTFBoLpkvbtjLaOF446FmfmB2YOajfm9JPPdxtUfp7aNNRj4tDRpkSfzn5rlNbgc9ZrsKQTk5E8H+ufJ5sewTalq8jM5+rqjpCU6u5D8YVm8wEXt86UtHp//TaWm6WsawWaZCpa2BC8lQtYF3132j99KEybeJfzVbH2s= Received: from AM6PR04MB5000.eurprd04.prod.outlook.com (20.177.33.219) by AM6PR04MB5319.eurprd04.prod.outlook.com (20.177.35.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Thu, 21 Mar 2019 15:26:28 +0000 Received: from AM6PR04MB5000.eurprd04.prod.outlook.com ([fe80::8557:3564:b43b:896]) by AM6PR04MB5000.eurprd04.prod.outlook.com ([fe80::8557:3564:b43b:896%5]) with mapi id 15.20.1709.015; Thu, 21 Mar 2019 15:26:28 +0000 From: Ioana Ciocoi Radulescu To: David Miller CC: "netdev@vger.kernel.org" , Ioana Ciornei , "brouer@redhat.com" Subject: RE: [PATCH net] dpaa2-eth: Fix possible access beyond end of array Thread-Topic: [PATCH net] dpaa2-eth: Fix possible access beyond end of array Thread-Index: AQHU3ybBTyMfu92j7kmlwnWod5rsQaYVKxqAgAEKvwA= Date: Thu, 21 Mar 2019 15:26:27 +0000 Message-ID: References: <1553091059-15991-1-git-send-email-ruxandra.radulescu@nxp.com> <20190320.162903.998898758592076249.davem@davemloft.net> In-Reply-To: <20190320.162903.998898758592076249.davem@davemloft.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ruxandra.radulescu@nxp.com; x-originating-ip: [192.88.166.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 37553c2e-ad8f-430c-9f45-08d6ae119668 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM6PR04MB5319; x-ms-traffictypediagnostic: AM6PR04MB5319: x-microsoft-antispam-prvs: x-forefront-prvs: 0983EAD6B2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(39860400002)(136003)(346002)(376002)(396003)(189003)(199004)(13464003)(55016002)(305945005)(33656002)(68736007)(186003)(486006)(99286004)(102836004)(26005)(7696005)(11346002)(476003)(446003)(8936002)(53936002)(76176011)(6436002)(53546011)(9686003)(14454004)(2906002)(6246003)(6506007)(478600001)(25786009)(4326008)(7736002)(106356001)(105586002)(66066001)(14444005)(97736004)(81156014)(5660300002)(81166006)(74316002)(54906003)(229853002)(256004)(6116002)(71200400001)(6916009)(71190400001)(8676002)(86362001)(316002)(52536014)(4744005)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR04MB5319;H:AM6PR04MB5000.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: EFoqTvZo42Ayu51dLgTSFHTelOHElnQr3Z/pDDxwvkzcB/hD3erFvLs1ld95P69c8IoZK6haKqnrHmQI2qr4DYWMr6s8P4yEnr569uiTQ3xiJLfR/X2LW3jr1Y0RrRCeHjsq9BWVkqvlBGqZHsBLNLjlhFSB7Bol6cepB8bk2C97okBg2jmBy0Ig5CVBnmG6zQHtnoT6SM4DoDZTd0R073IPGkmQzVqFP8oBZawB0bdS+LbYEzu1Xn1ppPzaCuvfkhOa2i0f6UKgNQ2wUgrndO4UKMnMKOyBOdlKXLnJiQ7trhFOLykgPHAXJawUcdahs0t+kzrqClaMLbjmiHEGN7gRzVzm1FPveZSaSVEkiueuNYFYTq99LvbbHpBQgsB9+q+KUYhKiPeYQtcAFvZK6rZf6iLkbzDMy22VeJ2gwVg= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37553c2e-ad8f-430c-9f45-08d6ae119668 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2019 15:26:28.0189 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5319 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > -----Original Message----- > From: David Miller > Sent: Thursday, March 21, 2019 1:29 AM > To: Ioana Ciocoi Radulescu > Cc: netdev@vger.kernel.org; Ioana Ciornei ; > brouer@redhat.com > Subject: Re: [PATCH net] dpaa2-eth: Fix possible access beyond end of arr= ay >=20 > From: Ioana Ciocoi Radulescu > Date: Wed, 20 Mar 2019 14:11:04 +0000 >=20 > > Make sure we don't try to enqueue XDP_REDIRECT frames to an > > inexistent FQ. > > > > While it is guaranteed not to have more than one queue per core, > > having fewer queues than CPUs on an interface is a valid > > configuration. > > > > Fixes: d678be1dc1ec ("dpaa2-eth: add XDP_REDIRECT support") > > Reported-by: Jesper Dangaard Brouer > > Signed-off-by: Ioana Radulescu >=20 > Applied, thanks. >=20 > I hope the modulus operation doesn't start showing up on profiles. I haven't seen any performance impact on XDP_REDIRECT numbers. Also, I think this patch should be added to stable as well, the bug it fixes is quite ugly. Thanks, Ioana