From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-db3on0054.outbound.protection.outlook.com ([157.55.234.54]:55603 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751906AbbHXGw1 (ORCPT ); Mon, 24 Aug 2015 02:52:27 -0400 Subject: Re: [PATCH 1/3] IB/uverbs: reject invalid or unknown opcodes To: Christoph Hellwig References: <1440002254-795-1-git-send-email-hch@lst.de> <20150822082516.GC1857@lst.de> CC: Sagi Grimberg , Doug Ledford , Sean Hefty , Hal Rosenstock , Eli Cohen , "linux-rdma@vger.kernel.org" , "stable@vger.kernel.org" From: Haggai Eran Message-ID: <55DABF1E.2050804@mellanox.com> Date: Mon, 24 Aug 2015 09:52:14 +0300 MIME-Version: 1.0 In-Reply-To: <20150822082516.GC1857@lst.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 22/08/2015 11:25, Christoph Hellwig wrote: > On Sat, Aug 22, 2015 at 06:38:47AM +0000, Haggai Eran wrote: >> It looks like the default case in the non-UD branch is currently used to handle plain IB_WR_SEND operations, so the patch would cause these to return an error. > > Indeed. It's handled fine in patch 2 which splits up the case, but > will be incorrectly rejected with just this patch applied. Okay. Maybe you can just add a case for IB_WR_SEND in this patch to avoid hurting bisectability. Looking at the uverbs part in patch 2, I think the changes are okay. I noticed there's a (__be32 __force) cast of the immediate data from userspace (it was already in the existing code). I wonder, why not define the field in the uapi struct as __be32 in the first place? Haggai