From patchwork Mon Jun 26 15:53:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Amrani, Ram" X-Patchwork-Id: 9809977 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 97D5460209 for ; Mon, 26 Jun 2017 15:54:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98E78285D9 for ; Mon, 26 Jun 2017 15:54:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D1452861A; Mon, 26 Jun 2017 15:54:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5EB2285D9 for ; Mon, 26 Jun 2017 15:54:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbdFZPyJ (ORCPT ); Mon, 26 Jun 2017 11:54:09 -0400 Received: from mail-cys01nam02on0066.outbound.protection.outlook.com ([104.47.37.66]:35680 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750919AbdFZPyI (ORCPT ); Mon, 26 Jun 2017 11:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zGKeHK4NCt+NdsudHgjcPk+Q/lYwCtujaXteHdWe3WQ=; b=LjgpLnX6QBfmZlAzY3Pm4jyLobOB8fm/5ZmtK2lVqHFdBrWdebf0+UvuUZXXAqrbuNQ3WXIdDMDT5ADkx9Pa8AVO/d5ysP9FnZy3qgTcR2dky46YVjKiRwcy73vYKfbTsgSw33ZdUmyfO9kn/7eRYtQPpl4Cmj0JQuSsl0wTzsk= Received: from CY1PR07CA0013.namprd07.prod.outlook.com (2a01:111:e400:c60a::23) by DM2PR0701MB1018.namprd07.prod.outlook.com (2a01:111:e400:246f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Mon, 26 Jun 2017 15:54:06 +0000 Received: from BL2FFO11FD052.protection.gbl (2a01:111:f400:7c09::138) by CY1PR07CA0013.outlook.office365.com (2a01:111:e400:c60a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15 via Frontend Transport; Mon, 26 Jun 2017 15:54:06 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD052.mail.protection.outlook.com (10.173.161.214) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1178.14 via Frontend Transport; Mon, 26 Jun 2017 15:54:05 +0000 Received: from lb-tlvb-ramrani.il.qlogic.org (10.185.6.119) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Mon, 26 Jun 2017 08:54:01 -0700 From: Ram Amrani To: , CC: , Ram Amrani Subject: [PATCH rdma 1/1] IB/core: Fix input len in multiple user verbs Date: Mon, 26 Jun 2017 18:53:49 +0300 Message-ID: <1498492429-28051-2-git-send-email-Ram.Amrani@cavium.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1498492429-28051-1-git-send-email-Ram.Amrani@cavium.com> References: <1498492429-28051-1-git-send-email-Ram.Amrani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39850400002)(39400400002)(39410400002)(39450400003)(39840400002)(2980300002)(428002)(199003)(189002)(9170700003)(5660300001)(50226002)(36756003)(106466001)(101416001)(2906002)(105586002)(104016004)(48376002)(8676002)(50466002)(81166006)(54906002)(356003)(575784001)(86362001)(8936002)(305945005)(77096006)(6666003)(5003940100001)(38730400002)(2950100002)(107886003)(189998001)(478600001)(72206003)(47776003)(76176999)(50986999)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1018; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD052; 1:v489agrV9WRwJkC1oCnJhuTSeR7FfKH3qh/9EnwVa9uCAMgcLBrC+Ue9j2s3J+yDz0JoUgdu/CJbfwJqPFM6AAU4GxsyC2EzQClLPsYK2ymhCE3ZiXTwoYRuWK2dQ8QtOTvf/1fiGve/wi2VXB4iPJ2uNiqMxOLlk69R/xpkZzmDdfbIR/FhcHBdkddTOe+c0SgI6++SM8xcgEYJKoW7NXA6jIAWUV2oDtmNeE6PHRBBRuO9rXXY4ixjsU+xgMHiUnj5C2yCNxBWn2l5a7DWw9hA9d2CdrUcDSdrW80tqWaOBpWCKEfXN9s2FhcBrera0d3+5IboGCZjSpq3PSOZMvtLrvUWuKM+zuVkjFaDRFfu6GpHVdFBqxSDu6qFCj6X9P+DXRNHk7LxvMYqTIuazxHvKYAYzbKPRv07kJYjwPn0ulPduRK6mqI+iuFx6xOHVIoWz+Vsb9KDRPJ9bcgWP9EEqEoHOwK55gSaIyp3pao2x8LWblRw+Lh5Dd+VZS6wBwfFPPRUKCU/CRLSHYbjzuvxb0elDm7Svu/QFIgTz2RoHf5oImBJfx3LkfAGf0Q6bEiXCTBeXlhzhSF0gclqT3NTDIdVaxKmQZlGzb8HZQ7olGYpuGu5AayoPDBU2BzC+VhC5KMEEHMsKKGhy7xmpItuif6kNXgxrjoalZhs14eIBiMFBYTs/7iJxWSXYKhJV9GNXf9WIoL5VbhKuy1JpPHN3s22b1X8vPyHAICJRdNkDpDi5i4/8gYVJyuPo5STolCQn7TqO17V2n9p1kcga9BPb69Eucz+qPic09q3jNjBrpuJZ5T/Ug2sECF7R2nPjw4b5dW81ddlJFO9moDsHT1s8ZwIwcj7fImjEt3WUSE= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ae7fb768-3433-4dbd-856d-08d4bcab9322 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506067)(300135500095); SRVR:DM2PR0701MB1018; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 3:uWeRFPRHxiUWh4kU0quJVBaiZm9+UF8E4VO6VihZRSm7t2EJFqg0HDPfqpzUFa9JfP5Us+DboxTw0KNB1DCJdRy17o3GgPhh6qSBCZRYBqBTXVGqMKlZmna4bIVSRjndCqIDBDGvwnvL5xVAZnoFLqGVln9MVZGUdpPacaclbbi9KgGywOWxUIARUyxe++giukUsNgf5gyX+9fTEWYPJvus8V5fmzQhDNR0JogaUfM7AijYybOR7qpfziV6i2EDl/Pm9/k42GNGJSPVUbPMPYW2vts6i3Mh/kwj2HO98qxiU9CuSKYsStMHBmzg9R9748UNALixSGXXQig8UsTb8fefT1iA8K9uH4A8cJCGSbjaYkL+ohF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O3DAI6tcTGsszsQR3nLWoQR8W9mxTcmafda4uDAouyD6Dmvbo3TBrV2nRi7qrQnXsTdNjCZTSCxUZNTjMGkucbh9D6zFEMdwMSu/oZtZz1/yPk/oGsHNz5JjC1AJlLtENA== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 20:wjrw2d2Q56OA+1uSK4Pc+awlKuoKjG3797ZfLwHgZG6Uer5PFp4QU1sVK0SN319wn9WVEH4LYzQViqqEP8DdsGmnnh2imWKYkzUc9kaeGNuo/l0S2L/i/SyhHkwxnQoS8jPGCKZzaSPPHlj9yZNc1cIOWqhLub6kF/rO7GzttQWb9myPih/g9+++d/f2a+/RLXEng+khQyLq1I9DgW55CgRwZ99/mFwDFkhdhDydydlf6hqLwpar2IoFRAFs3mAlnI/4KYVsapGssCIaYecz29oCaLJb6AnvWwnzRl4/l9UeBEteZYWQVwXlZotCwBdZz2gll6SjOLyLmm6UfUOpdpSajIsJV5VTVWlNfX3pOCGYAaag1BXhzTH1Aqqr2vOlddi4kBCUx3GqabVx3JKkI47OT2ZdaGX9RtEZBL7o+zo2fJa7LJbvNVVa9dnRF27NXoYPvyFV/eV5dGZmj+hneKeJXZ9X0cSVgHTzzmKHy0kYVgVnaccLt8BRNhfKh7q4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(13016025)(13018025)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0701MB1018; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0701MB1018; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1018; 4:4sLLLzE1nwEUT/VI4uqgy5bvLng7gBDE3EiUFT5Q?= =?us-ascii?Q?1bOLM5QgRAcFwOD1prhKkMCadCDukeIgZF8Q6twFELO3BBJaU7YLiYCw0zBl?= =?us-ascii?Q?+0SxU9966y2a+6ynBH/ytD4LxlDBYbuyzbWBfRmhvITsieTO/YuuMkeznXsV?= =?us-ascii?Q?JuuJR53tp/D7UUn0EJaW6Kx6Bb6iSbKIGPqAiDcGolh6V7JKGoQblVyAGidW?= =?us-ascii?Q?9KuIcK0o39ZWmA7kK4KOiD2SZf+kZl5T3Ztpu8azVDglcXi3xfSf1o0UErq5?= =?us-ascii?Q?mSTwvUSdEhmPIRw/wAG4M1nhUpi5AM4iUu+Y9I1QNaD5ZksZIVgMKsQKAvqN?= =?us-ascii?Q?EPDp1m2juyLSkVFMc6lnM5RPAAbukzDXS6sZ4cdJlKUr8iWXjDqXT34cg4/B?= =?us-ascii?Q?EgDNbp1nDXat9pCvu28feupKMZG/EoAKZKHYv2UcziEuCKVzbfC7iskkaLBM?= =?us-ascii?Q?smTVJKFn8pNcY5bj4yPrDJc6ektkb7s+vpbew3KnNrEGS9MUDcpTWYXeznnb?= =?us-ascii?Q?NX+oLiXB944N0eXxlA3zA7ob67yZm1vpzYmFOt787UV0VlIM0rK7ykhlIkIl?= =?us-ascii?Q?Ko2XhjE6AI7UIaRU0P5NreCoLiRVKjgMOaTSG0U1/5hcuv8R9uTKyLG1yd+D?= =?us-ascii?Q?KwQmlQcnyC70zxMBh3WzKt1mqbU86a6vlZOYgvcQ/7QV8u+ONfI7xqSb/Y9O?= =?us-ascii?Q?2Z8NtDSg/r86PZR5QrKWv6ZmYpqrBpcgTKAHlDTD/GT2BbKanETjUVfF75R5?= =?us-ascii?Q?F++KEkoJ2NxEtV4TciZ5DQITwnBqYvILNXEZk0Lf/4rkp/qn1MdHftVssd8f?= =?us-ascii?Q?tUWqObRixabA6h3UGgyt5DSWhwYBVfeJxzk/wOmIFbuFDDUxOaJofhxaowYf?= =?us-ascii?Q?NurOSjoYk3rYiTQ85b0OPYQjU+scAoZA1w5j4V//ZPlXMjoQO08nQDOA3FCI?= =?us-ascii?Q?oxN/Pqeferz9ITlizhAS6Lcc1kfLvPSXNuntbLFOKkOLt2m7E+OBX2pXSKN1?= =?us-ascii?Q?3238xSmjaSvl2TcaP3HmtrcaJ0mdwVGXHHbmv3FhWmkPostUPbK3ZFgHw9DP?= =?us-ascii?Q?JWuWNG85YJ0XlBFpVOzBFFUxhlx60l39/ZjmAcdoJCnQJzvEeB/WxTPHK0NK?= =?us-ascii?Q?83+NYFPlgMVOlewhkQrGkAl8/yzPmlTjNMYxToLFOstrkKbUj2Ej77Z1RwJI?= =?us-ascii?Q?PJAumozrUuXEgrAEvZy1PRJLVlW0TzMABz5r043urqny4OAUBVZ+/Z45Yw?= =?us-ascii?Q?=3D=3D?= X-Forefront-PRVS: 0350D7A55D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1018; 23:UkfrqmUSq8WVwOYNqlaDS4lqdFagVHBPpemaCQe?= =?us-ascii?Q?IeFiLgj3KuBxMmX5RgPHu9eZp1OGoHS5u3hnrPb26iTDrmqgWmTNANzj2v7+?= =?us-ascii?Q?WlW7zdgP8SDCM3BJOl++xlTMRXGJM+VgYrJFkAM+hBqY1gNdnl5Pd6DYMlO2?= =?us-ascii?Q?SkIHPowHXmEID1UJOnyK69WWqcwaTD3q/Ddbhn5zddM0FP6Utep/MnHp2f5G?= =?us-ascii?Q?PuKGmOd6eT5JZhzUFGwYrfeE5kkipJmYcExyulKGRQdCVCom2aIA4Q7xnmWR?= =?us-ascii?Q?fCrQd0SfHOOFu8XivTAkAL3rcCjA1A6KiPh4s3ygIY79j0V6OvwKmyOZ92Ar?= =?us-ascii?Q?vF6AWHFneO5Jz4sLgZkW/MBwaOjAlDkBLpUCoXK2mEMVCO5na1qwxBGfovcd?= =?us-ascii?Q?jsc5pxOmvJINh0v4gTx2uROH4Zs6JZs9+2Uy17L/I+1JPx21hIIqV+LZnHWp?= =?us-ascii?Q?3DEBLG2jQHbaCxBmmhl0HXLw3t8JjQ72X0UN/6ItVk82hPjIWqwsb5K34dn1?= =?us-ascii?Q?ggrHeqyoZOq+6e4jQ7By4PLr9jQRmrkP7tL8HJS1ATWY7VGzoCpEyoGQS6zX?= =?us-ascii?Q?hM0da1m+B87ssBNWc4DjPxlZrFafd8evIvZ5GgBqDH7llvb+JMIssLu2NLa2?= =?us-ascii?Q?chx5wca5RqCV5UBNlyw9ZK+Cu56F2OER77VBnr6DSQSBLqYE5jXB8itu8MX3?= =?us-ascii?Q?C+EwkTto7c+i1k53gsa4kBVkXpLCO4jwuaQ6YwapJ1JDvoVhmCQy49+1eRHk?= =?us-ascii?Q?tc/Tv+2VocRYSeDvlvPF345PAgHg5l84LI87Xb4d4XL0jiPgxfSltN+7ACYX?= =?us-ascii?Q?0bAb5EqNYDKzOpDSBpI9mS9lt2xcJOGndwPBMJatsC7q5NP8e80gkiJTJ7bu?= =?us-ascii?Q?QT/V11W4FiyhLuxoSqWrBeWjVNYqEDsrevcPqre5iyd+o85ol2md4jx/mjgZ?= =?us-ascii?Q?ALzaQgnAGQiitzih0TzfipZjzv9yoGbag4ju/5EjYxXkM9XelbzQCMfZcwqY?= =?us-ascii?Q?MHzpchsyAMj2VQb3WZpb4sg1fGklsjv4mVp80uQvbDZsveTBgqgLmgxqF7uh?= =?us-ascii?Q?1n4AynqjjiuMsE/MeaKJKl7raaSqV?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1018; 6:yN8axhh/jbU4OE2UiwWqx2Aq718c+tsC/OlLtAvy?= =?us-ascii?Q?H48AFqBecfxw844K5HkBHxSP70aWJnaE+8ad1W9w/3yBXeHzdRmMFVzkYGor?= =?us-ascii?Q?U83Da1CmZ8ioY9huj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ii?Q?aZI=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 5:FoHCRhxmPdL0+rLqxysBC62g0oqxnKAa/Ey7VmgwG5H1ZO3k5tFo6expG/PJ98VfzdzYvf8gS9kpS5Z5+3Ght903L0qsyG5h3diypFHbDjokNSSsOkAI9HmCrEVDxBWdTBy1wQDiLzs+h8ybdO8iJ2VUdd7GRkRmt/nkHp3/4yljQF9JXGE4bTajWwecMY0L7O54EUQdkd/z4utU1M8jDG9xJl3pNVPth4fdbrovNEXGiO2BUcB0ZBfO0bqGzSf3B9a4rrCiS3pYytnKEQXcILd9F88dD9uDjEzra3AVUuJTa89s6Xmyo2vVZnP4vPmUxxPOhEVnbN8vSMm8Pg6k4zz0I45ZAf3YaEGFpC6JJ8jzgShRtYuuXjkSKtLEKSbzRKcil08NjqCi+wdUIdyzE4X/X7v4WxFlN8gyf1dwumteMueH9jVVmEFVJATR3hsQO+OgyosGKfhZl6DImxGC+TdqhHl0mz+ESgKpV5x0+UkStZ6KqtnA5dNVCJiSBO93; 24:rkmkgC2CJm0qDvcjPI/fxuIhCIMSyWBIYW79Rsw4jEW4h7ssmR1I5jPf3d1b61hhXn24fKMFz9Qf/vW9ajWSaucE0utKpuX34iJEY+DJZtk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 7:9hGrpxWHcpebywcVGfPGpXLWqr5/FdcFAyN3HqSqd7cR5Nvf6c41gFQJmm+rjm/BBtfYh3ePcpeqIo5UNNR06D24id0SkYvAdJl29Je2VsXryNvP+udk0HG4mgwcukjwOCerzHzbo6f14ZZkMGL4epcdGAkqY1+EP/jF3CahfmLhmP8upDNqKm9Lv3a4zOFC569gQ2uHhtZ89ZL1LmQzzvMaLqapnrK7kQS44eYbtxYNhxoL6xGKf/IGSAyugV50t4DyfZLLbJS523+BWJKx7+LsHJqIxl8pZ3wjkGCHRmri6aQ2ugRW7c+ZxBzWpElEWKOExEymoMlWTqfLmqcQbyr8vEa882/sX5301OWjqVhzQUP9rO+HKnnaf2fUagKtPAId9UbJJsAJATch6Azj0k5MAzpg0XYH3Z+qsYDYSQGf7IqCLo3A1qF8hpZyAXag6FGKt3MUWXVLfMbfyVwaoiRSlIZ/Hp3JaaqvukJ+w6HTVxEV1K/lgo67E1mWdot5+51g6JDagj0E60aag4aWTGmV8og+QuI4t/4B9zIhJP5CZpc+DCCMvDhMm8gaaK4VHa91MeZyWqnOmC/MYCG6XRRJNiSy+Uy5dvl5mMJBWesxEjXbXa8ptuJovu5rd2IF26/v3jjR+Hv4hErhDaGtQyuEMpRJMEzvZE5koZvazNBI3GPPTqidtQOuM38vmqNrnylCHYqsge9Z3uBNKbJTlxFETQDUyzKHagz/4V6tyt6ojNj8FZ7Q3mZEBBt0fpWThEXDHzP4HaNg280xCnV+Os19Kt2pf7rqEA3vMFkqHxc= X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2017 15:54:05.5813 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1018 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most user verbs pass user data to the kernel with the inclusion of the ib_uverbs_cmd_hdr structure. This is problematic because the vendor has no ideas if the verb was called by a legacy verb or an extended verb. Also, the incosistency between the verbs is confusing. Fixes: 565197dd8fb1 ("IB/core: Extend ib_uverbs_create_cq") Signed-off-by: Ram Amrani Signed-off-by: Ariel Elior --- drivers/infiniband/core/uverbs_cmd.c | 70 ++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 70b7fb1..c418a0a 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -91,9 +91,10 @@ ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file, goto err; } - INIT_UDATA(&udata, buf + sizeof cmd, - (unsigned long) cmd.response + sizeof resp, - in_len - sizeof cmd, out_len - sizeof resp); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long) cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); ret = ib_rdmacg_try_charge(&cg_obj, ib_dev, RDMACG_RESOURCE_HCA_HANDLE); if (ret) @@ -313,9 +314,10 @@ ssize_t ib_uverbs_alloc_pd(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - INIT_UDATA(&udata, buf + sizeof cmd, - (unsigned long) cmd.response + sizeof resp, - in_len - sizeof cmd, out_len - sizeof resp); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long) cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); uobj = uobj_alloc(uobj_get_type(pd), file->ucontext); if (IS_ERR(uobj)) @@ -482,9 +484,10 @@ ssize_t ib_uverbs_open_xrcd(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - INIT_UDATA(&udata, buf + sizeof cmd, - (unsigned long) cmd.response + sizeof resp, - in_len - sizeof cmd, out_len - sizeof resp); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long) cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); mutex_lock(&file->device->xrcd_tree_mutex); @@ -646,9 +649,10 @@ ssize_t ib_uverbs_reg_mr(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - INIT_UDATA(&udata, buf + sizeof cmd, - (unsigned long) cmd.response + sizeof resp, - in_len - sizeof cmd, out_len - sizeof resp); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long) cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); if ((cmd.start & ~PAGE_MASK) != (cmd.hca_va & ~PAGE_MASK)) return -EINVAL; @@ -740,7 +744,8 @@ ssize_t ib_uverbs_rereg_mr(struct ib_uverbs_file *file, INIT_UDATA(&udata, buf + sizeof(cmd), (unsigned long) cmd.response + sizeof(resp), - in_len - sizeof(cmd), out_len - sizeof(resp)); + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); if (cmd.flags & ~IB_MR_REREG_SUPPORTED || !cmd.flags) return -EINVAL; @@ -1080,7 +1085,8 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file, INIT_UDATA(&uhw, buf + sizeof(cmd), (unsigned long)cmd.response + sizeof(resp), - in_len - sizeof(cmd), out_len - sizeof(resp)); + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); memset(&cmd_ex, 0, sizeof(cmd_ex)); cmd_ex.user_handle = cmd.user_handle; @@ -1161,9 +1167,10 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - INIT_UDATA(&udata, buf + sizeof cmd, - (unsigned long) cmd.response + sizeof resp, - in_len - sizeof cmd, out_len - sizeof resp); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long) cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); cq = uobj_get_obj_read(cq, cmd.cq_handle, file->ucontext); if (!cq) @@ -1719,9 +1726,10 @@ ssize_t ib_uverbs_open_qp(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - INIT_UDATA(&udata, buf + sizeof cmd, - (unsigned long) cmd.response + sizeof resp, - in_len - sizeof cmd, out_len - sizeof resp); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long) cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); obj = (struct ib_uqp_object *)uobj_alloc(uobj_get_type(qp), file->ucontext); @@ -2038,7 +2046,8 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *file, return -EOPNOTSUPP; INIT_UDATA(&udata, buf + sizeof(cmd.base), NULL, - in_len - sizeof(cmd.base), out_len); + in_len - sizeof(cmd.base) - sizeof(struct ib_uverbs_cmd_hdr), + out_len); ret = modify_qp(file, &cmd, &udata); if (ret) @@ -2543,7 +2552,8 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file, INIT_UDATA(&udata, buf + sizeof(cmd), (unsigned long)cmd.response + sizeof(resp), - in_len - sizeof(cmd), out_len - sizeof(resp)); + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); uobj = uobj_alloc(uobj_get_type(ah), file->ucontext); if (IS_ERR(uobj)) @@ -3609,10 +3619,10 @@ ssize_t ib_uverbs_create_srq(struct ib_uverbs_file *file, xcmd.max_sge = cmd.max_sge; xcmd.srq_limit = cmd.srq_limit; - INIT_UDATA(&udata, buf + sizeof cmd, - (unsigned long) cmd.response + sizeof resp, - in_len - sizeof cmd - sizeof(struct ib_uverbs_cmd_hdr), - out_len - sizeof resp); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long) cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); ret = __uverbs_create_xsrq(file, ib_dev, &xcmd, &udata); if (ret) @@ -3636,10 +3646,10 @@ ssize_t ib_uverbs_create_xsrq(struct ib_uverbs_file *file, if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT; - INIT_UDATA(&udata, buf + sizeof cmd, - (unsigned long) cmd.response + sizeof resp, - in_len - sizeof cmd - sizeof(struct ib_uverbs_cmd_hdr), - out_len - sizeof resp); + INIT_UDATA(&udata, buf + sizeof(cmd), + (unsigned long) cmd.response + sizeof(resp), + in_len - sizeof(cmd) - sizeof(struct ib_uverbs_cmd_hdr), + out_len - sizeof(resp)); ret = __uverbs_create_xsrq(file, ib_dev, &cmd, &udata); if (ret)