Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754518AbdGNOyS convert rfc822-to-8bit (ORCPT ); Fri, 14 Jul 2017 10:54:18 -0400 Received: from mga03.intel.com ([134.134.136.65]:58069 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754178AbdGNOyP (ORCPT ); Fri, 14 Jul 2017 10:54:15 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,359,1496127600"; d="scan'208";a="1151542296" From: "Ismail, Mustafa" To: Greg Kroah-Hartman CC: "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "stable@vger.kernel.org" , Yevgeny Kliteynik , Tziporet Koren , Alex Polak , Boris Pismenny , Leon Romanovsky , Doug Ledford Subject: RE: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by user verbs cmds Thread-Topic: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by user verbs cmds Thread-Index: AQHS++9L/iTyRkuxdUiZieB8x0MiOqJR55OQgAB/PAD//6htAIABSNMAgAAPbyA= Date: Fri, 14 Jul 2017 14:54:13 +0000 Message-ID: <5C5647B5F4794941BAAC07CF28785CBC33E4FCFE@fmsmsx101.amr.corp.intel.com> References: <20170713153957.515045341@linuxfoundation.org> <20170713153959.566717957@linuxfoundation.org> <5C5647B5F4794941BAAC07CF28785CBC33E4E81F@fmsmsx101.amr.corp.intel.com> <20170713162540.GB22870@kroah.com> <5C5647B5F4794941BAAC07CF28785CBC33E4EC25@fmsmsx101.amr.corp.intel.com> <20170714064908.GC16816@kroah.com> In-Reply-To: <20170714064908.GC16816@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWEwYjhhOWQtMjQxMy00YzUxLTljNzUtYTRlNWI5ZTU5MDZmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InR5YnNlWVBtd0czejBEaVNla3FiRFhCSUxWbXRjY1NLZWpTN0JWUTVrRlk9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.1.200.106] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3267 Lines: 81 > -----Original Message----- > From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org] > Sent: Friday, July 14, 2017 1:49 AM > To: Ismail, Mustafa > Cc: linux-kernel@vger.kernel.org; linux-rdma@vger.kernel.org; > stable@vger.kernel.org; Yevgeny Kliteynik ; > Tziporet Koren ; Alex Polak > ; Boris Pismenny ; Leon > Romanovsky ; Doug Ledford > Subject: Re: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied > by user verbs cmds > > On Thu, Jul 13, 2017 at 06:44:38PM +0000, Ismail, Mustafa wrote: > > > -----Original Message----- > > > From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org] > > > Sent: Thursday, July 13, 2017 11:26 AM > > > To: Ismail, Mustafa > > > Cc: linux-kernel@vger.kernel.org; linux-rdma@vger.kernel.org; > > > stable@vger.kernel.org; Yevgeny Kliteynik ; > > > Tziporet Koren ; Alex Polak > > > ; Boris Pismenny ; > Leon > > > Romanovsky ; Doug Ledford > > > > Subject: Re: [PATCH 4.4 29/57] RDMA/uverbs: Check port number > > > supplied by user verbs cmds > > > > > > On Thu, Jul 13, 2017 at 03:54:28PM +0000, Ismail, Mustafa wrote: > > > > > Subject: [PATCH 4.4 29/57] RDMA/uverbs: Check port number > > > > > supplied by user verbs cmds > > > > > > > > > > 4.4-stable review patch. If anyone has any objections, please > > > > > let me > > > know. > > > > > > > > Yes, this breaks modify qp. > > > > See https://patchwork.kernel.org/patch/9830663/ > > > > > > I don't understand this response at all, sorry. > > > > > > What should I do about this? Is this patch alone a problem? Is > > > there some other patch I should apply that is in Linus's tree? > > > Where is the problem, only in this old release? > > > > > Applying this patch will break RDMA functionality with respect to > modify_qp. > > Specifically this part: > > + if (cmd.port_num < rdma_start_port(ib_dev) || > > + cmd.port_num > rdma_end_port(ib_dev)) > > + return -EINVAL; > > + > > The cmd.port_num is only valid if (cmd->base.attr_mask & IB_QP_PORT). > > So the above can be fixed with: > > if ((cmd->base.attr_mask & IB_QP_PORT) && > > (cmd.port_num < rdma_start_port(ib_dev) || > > cmd.port_num > rdma_end_port(ib_dev))) > > return -EINVAL; > > > > A version of this patch is in Linus's tree and it has the same problem: > > commit 5ecce4c9b17bed4dc9cb58bfb10447307569b77b > "RDMA/uverbs: Check port number supplied by user verbs cmds" > > > > We will be submitting a patch to fix this shortly. > > Ok, so we will be "bug compatible" with Linus's tree then, right? :) > > Should I hold off on applying this now, or just stay in sync and wait for your > fixes to land in Linus's tree? I vote stay-in-sync, as the other stable trees are > also "broken" in the same way right now... > I was thinking it would be better not to break iWARP and possibly other RDMA protocols, in more stable trees if possible and apply the patch and fix at the same time. But I see your point. Regards, Mustafa > thanks, > > greg k-h