From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C85EA00C4; Thu, 23 Apr 2020 14:55:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF5971D150; Thu, 23 Apr 2020 14:55:30 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70048.outbound.protection.outlook.com [40.107.7.48]) by dpdk.org (Postfix) with ESMTP id 36E8B1C43A for ; Thu, 23 Apr 2020 14:55:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kWvDyDHtGSJZlzSZDTeQgvi6yjiX6/RKkmIjoulxQa316Nhg1VQfezkyDvwN6yJIuozU8eec5yz+GnRXwHGyqJgfjasPxsPugU+rfUZv4nDwAvC/Ah+pJ1krF+Lic3WxVouskV2LTh6I/gfdQBJ9AzP8iuLpV0EAI52HCUZTQyftSnKjmKprkVJDeMtI2C9xecdHkE9gU/aGkwrAXsU+oaC+/2xVaREqNpK8Ll2gYtbTm6eVsMZgZse7zFK5AuWpQb7xVzOMb12IwnT0RKLH577KUCLLoQ2lMuECag7gl1wHMUe1vyQ4JSD7D76F6fhwxSSMhbHH+HLcwL4wDZ79cA== 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=5Fa7JHqPBXlDBaSOdPHsU/PZ4Mx3EnA+d+4D/i4iiPw=; b=XDWf4GaQP08lcfL1OhA/fK2SLq3BXiqWmhheuCBydm2fpNAp0NrdE2WIZRkprBvtc1HbVNNoyb/kBGUVnBGCHzkrqaHs9Y0+JJshlSV56QIaOj8l6JIbrCQV27Xw8EQdW9OwKA9kJPmsPCnIHoa5dmbRrDAZvvGBXZW/Ycap5tCZuKw/mWoBIk6W3wqLPdtNgiifDLKxFqcpcqfReBjvGsex3wPV5RRWTwaoJokKUPtPeiPU456GF0tXTlv/AKw+tDiZ6tdu+eiMblPjj3b+aD5sIdwDMs7NNFElW8DTwlzspurWQOSFvU7Ku3Vn2jLqc2O7zGAWAZvC1RFTUW6XVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5Fa7JHqPBXlDBaSOdPHsU/PZ4Mx3EnA+d+4D/i4iiPw=; b=aRFHRnXmmI2eJ3zWIHHa6EgzfAVHPQAXBGYVQKxfLGe38IXfZ7Gnq6uRJZAA/fI64izpIrj7a9zHBf5sKPxNgmSUr8ERQhelmSP1d/tF2eq/hi9cwm2iSLRy5DM9e/PrCN49NWDHNwUSJpCBiVL4lcQCmgHT/uyTXwpHCmbotmM= Received: from VI1PR04MB3168.eurprd04.prod.outlook.com (2603:10a6:802:6::10) by VI1PR04MB6190.eurprd04.prod.outlook.com (2603:10a6:803:f1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Thu, 23 Apr 2020 12:55:27 +0000 Received: from VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::8c03:2f5:3b48:ba74]) by VI1PR04MB3168.eurprd04.prod.outlook.com ([fe80::8c03:2f5:3b48:ba74%7]) with mapi id 15.20.2921.030; Thu, 23 Apr 2020 12:55:27 +0000 From: Akhil Goyal To: Anoob Joseph , "Ananyev, Konstantin" , "dev@dpdk.org" , Lukasz Wojciechowski CC: "Doherty, Declan" Thread-Topic: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops Thread-Index: AQHWGSSzXmaTexK7xEqwxn6qrened6iGVnIAgAAVKICAAB1JAIAACCYAgAAO16A= Date: Thu, 23 Apr 2020 12:55:27 +0000 Message-ID: References: <20200422235158.24497-1-konstantin.ananyev@intel.com> In-Reply-To: Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; x-originating-ip: [45.118.167.83] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 6c013f54-4d5c-4ba8-5567-08d7e78598a9 x-ms-traffictypediagnostic: VI1PR04MB6190: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 03827AF76E x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB3168.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(8936002)(316002)(44832011)(86362001)(4326008)(110136005)(33656002)(52536014)(6506007)(5660300002)(478600001)(81156014)(26005)(9686003)(2906002)(186003)(55016002)(7696005)(71200400001)(66946007)(76116006)(64756008)(15650500001)(66476007)(66446008)(66556008); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 69/9TrH5EIxQ9v1nKEZYQS2GCe1MU9WZsbx9R5erW8v9nNzZB9zCEAfBITkxUcF3mLL8KojEp6JMg+PqTMjI70rnuRPK9DNEzsMxvOaxcT5Y/kXiEeYqeSeOtZFLZEVNwsmqkMAgngiGq8mFSYtUa+MsIjSuXNGDd0MOOKTSpxPtQwN+BsVBXl+6k736zp8jpUEJ0Te2o2FLN3HC6p67MeF2YOOq2LEFq9d8kmOBSaFcBReX7u1kJNQG6lJAa/tN2pdOjGSS0q6+0xp6uGxZSWesRGwDWL1EuxDOY7sXnRT9fZdjT1RdeaUwYIpCOegarmLJlCYPiURvb5BVFInO/+KjfTAijc4ERXRvpK2g85U3YuiV+ZSJ3ac2aSS7NDqw2JnebEUnHbnyxKhWDfdlDJ3w/WnoZanCgsw1H1i7rhCl6/5Mlk4VXLPRbJsaw3mM x-ms-exchange-antispam-messagedata: LE4Mw3pPKXE2yjer0WnT72e9ajaElRT51UuO82IoTBHru9CUM8UcW5tH1NTPBZdxMy50asdPVOugDWFSlJICgPOpX/tX8YbeBkPLjW5Etv1aOvFu2wBPAhM2zQpUSxZNuJWtzCVxhKFHFTmYVgo5qQ== x-ms-exchange-transport-forked: True 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: 6c013f54-4d5c-4ba8-5567-08d7e78598a9 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2020 12:55:27.2866 (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-CrossTenant-userprincipalname: x9rHgpvF2VrhJrikX0k7n2HyzPHpJm+yKKVR3BKi5a9YuOq6YsrpSw5TF1a4s2QMB8TwYEG2ue6gumY/QtGj/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6190 Subject: Re: [dpdk-dev] [PATCH] security: fix crash at accessing non-implemented ops X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Anoob/Konstantin, > > > > Check that ops->get_userdata is a valid function pointer will be compil= ed out. > > So PMDs that don't implement this function will crash in > > rte_security_get_userdata(). > > In our particular case - ixgbe. > > Same story with rte_security_set_pkt_metadata() - see the patch. >=20 > [Anoob] But ixgbe doesn't implement inline protocol which is the primary > consumer of this API (rte_security_get_userdata()). So what is the troubl= e? >=20 > Also, application is expected to call rte_security_set_pkt_metadata() onl= y on > devices with offload flag RTE_SECURITY_TX_OLOAD_NEED_MDATA. If a PMD > states it needs MDATA but fails to register a function pointer for doing = the same, > it is a control path problem. Checking for that in the datapath is an ove= rkill. >=20 Whatever your concern is, we can resolve it later, but for now we should ha= ve the same Unconditional checks that were there earlier. We need to make RC1 today/tom= orrow. And this cannot go as an issue. These are optional APIs and every PMD may not have supported that. Konstantin, Please send an update to your patch reverting the original patch for these = 2 functions. Currently it is adding 2 extra checks. Regards, Akhil