From patchwork Thu Jun 15 12:39:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 13281234 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7779EB64DD for ; Thu, 15 Jun 2023 12:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244899AbjFOMj5 (ORCPT ); Thu, 15 Jun 2023 08:39:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231163AbjFOMjh (ORCPT ); Thu, 15 Jun 2023 08:39:37 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CA371FDB; Thu, 15 Jun 2023 05:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CM9a2gpQXsnUMFahtnG5AJxUcdkXYjJOaeCl/6zvjRWBS342tFkdBnLBuynOVtGMcZl1xLuwulOTUFdK5PhdYnNZrhyaayiiMq4fWas+0w5iWbRm1HpI6NqKerOHm+3iZ9A/l+fMiPlKZBrspjYp00HJ/el/p9Lms4yyzfAoukIQqduVnwiP9mhYen27pl1eUBouVUq9qt4FL+gGLeClr+E1jfWkBBdMSAfzij+6Lw6VG0hTUVUjtIzuBbVqB5aqNlvVlY6sRbLwScl1nigSmwO1sF7A9E2sBNNAHXNPPu7+I+lLjgGCOQfy5TOWFfIiL1xkrMwjUh31s0Wvnc0JfA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VtanfBGT+mWGGyxIZuDUjabw0GquLIuK0ZfPJquwskE=; b=PCDA3qT0Jo+f62Ka0YK14Sk/nLfbnV7ZGPIlW9+US7xaWdsqz4yfMp4VxJ7chsEOPSbAuDjRLjWIk1hZ5D5QXA6h8saEeQsFRO0rbOEQj3G0cO37S5QEPMvknRQuocXrvVmYNDNvWOCaE1QoXrKYEqgKt4ugI15tZUuxQIL37wfe4Jbh7apDhHMZ3eJRBFOpfrWdUyZCBZMcdP5KsbBiWsrAd4nE3J73Kw5rhN/aZqZ9GgbSUnDWG6rBsUpjTudQHf10csHcHTK81uTmKYa+TOnp41e6rCIGcQ1aFfRWxlV5oYu+ChI4/DvbnAoZQxJUSI41WEIrWXnau3kbsZ10TQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VtanfBGT+mWGGyxIZuDUjabw0GquLIuK0ZfPJquwskE=; b=en45HcGLOZ1k+Ltxrx4Xrtq7dX3VaLTqWHBK1qpdqxBY6KIw7FCVf/t2L5VMgWD6vcnBdOT39QJD/7CdZ4ly1TKEclMjPzQoZTNNrnclxWPOo6ZZbKYyOnkhkpYn2Y0RHKtu80aWx/OEyiEcXSPmfaGEm3A3Q5W1TflgrrsPtpt3DF7ktvp+vPd2y0MS2LtQkBGsmvNfzMD+ut/itaB2cCt9BdB3HIoWi7OJpau8nXzwtxfcHTAOczg7S0r2ttGMaWOjZkP2WzKf8f4kqJjeyLr0j+fRRkEuZpiaKHwPtybGYxP36wqV6mch+e3qScVmNyK4UpgBYTcxCesiXE0UNw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by CY8PR12MB9035.namprd12.prod.outlook.com (2603:10b6:930:77::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Thu, 15 Jun 2023 12:39:34 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::f7a7:a561:87e9:5fab]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::f7a7:a561:87e9:5fab%7]) with mapi id 15.20.6477.037; Thu, 15 Jun 2023 12:39:34 +0000 Date: Thu, 15 Jun 2023 09:39:30 -0300 From: Jason Gunthorpe To: Linus Torvalds Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Leon Romanovsky Subject: [GIT PULL] Please pull RDMA subsystem changes Message-ID: Content-Disposition: inline X-ClientProxiedBy: BYAPR08CA0061.namprd08.prod.outlook.com (2603:10b6:a03:117::38) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|CY8PR12MB9035:EE_ X-MS-Office365-Filtering-Correlation-Id: ecbd1563-a1de-4282-a989-08db6d9d9285 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vjTaUZjD/acw67FFMUA+45AMk1qFv0kmwT1qinc65sOO8m8e1GExKK76aMxXmHsgOCHBS31q0OJ+vOb9k6bB9AVo42W5asa4S/05HXTQsbGf/D/Fyo/z0EbGxO9KIJBGr2ggl1oZPH/So2NJVnsKQ8uAGo32rtApfp5x0ucM7HJdfIT/wSwZtsGiwgQGd0qtAGeVeHq9A67Rv/JNfdWPcULiNkGPs1h5jSFojqh3LrruF/qgfjzqzi4odp6I2Ix/eVJhl6fBA6FLryfPA1y4QOH09vKL2Idoz/cHWb0lIiKYYyqrDeYSIKI9nxwK44QeYTbVYFL41Rpr8I0Mmv9irBZhJzAfuD+ZDBStpRNReZHRdg5ZHqWQeK3yRvvnDasSzI6wVQRD4AUDiK9jIQnpGyviQbV3gfkYCfm+L47bxF930V3or7ynPxqh7HuMhMqasbLM1/333LKfDnzRpDjFEYz9A5EkUbwfTy0xYQYKBqMiMe8rTTr39vycgYsS5lY9EC2BUBBpPY+EbNSA2SxX4vBV1R7NR+wtBEm04loXefihLMQuFZKrwSGKthD96Kjqb5zZ24XL0lQWlenyb4KH7kNGBXmPkF0TmRdSlji75rc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39860400002)(136003)(396003)(376002)(346002)(451199021)(2616005)(83380400001)(36756003)(86362001)(38100700002)(478600001)(8936002)(6486002)(6666004)(8676002)(2906002)(4326008)(5660300002)(44144004)(66476007)(66946007)(66556008)(316002)(186003)(41300700001)(66899021)(21480400003)(107886003)(6916009)(6512007)(26005)(6506007)(2700100001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iEDUEMTzFZ3d83wFBYHEeCcof/iC0k5TlFN1y62dzgQjmw4udYtX7bsRR3oY+84dYqw5itFlQD6XAbik4g2J60AV1mqW9U/frddGkvRuH3V/lf68KOz5MfE+Vb//wpQnVHuasp9Pkaews1LhlW8Ryojm0IaF/X8viyAJyBu/DK0exsdkKz1zFCk/4Nz6tGko2h3Ew2oWTlnAeZjm+Dmtd/bgy8CAa53fd1oBDwW590fb9ERz9ggCKQMUlW5bkdFk85sLr1b4Ng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cKlKxjO1Qm/ttNHSbxsMjQDnulaorgyWLKz2s5W2UfqBZYdXL6B9osXXT8UKijjg9tHq05dDQlWl4N4nKjS3dQp+w4dYJAb/hjhNOYsF8i4VBN3AKyCqiWCZ337pKuQPCgg7JoxuVzTk4yCQ9zxNWhyBJzQkxmVKik7m8Ygwf7RlYOSYtsO4nZC5O0YaexnxD6fH+kRpbC1UBBI2TzUPt5kpfD8jnFdWVWwXGYZeZ+bdKkYyNyb4e7s9DA= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: ecbd1563-a1de-4282-a989-08db6d9d9285 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2023 12:39:33.9948 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: u3+xffkkgE4WHiaGS5zGYOoxbKrSPBlbQToUJFSDG4ifrRX6FZHEUA/9tjCJnnxs X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB9035 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Hi Linus, This is an unusually large bunch of bug fixes for the later rc cycle, rxe and mlx5 both dumped a lot of things at once. rxe continues to fix itself, and mlx5 is fixing a bunch of "queue counters" related bugs. There is one highly notable bug fix regarding the qkey. This small security check was missed in the original 2005 implementation and it allows some significant issues. Thanks, Jason The following changes since commit 5842d1d9c1b0d17e0c29eae65ae1f245f83682dd: RDMA/irdma: Fix Local Invalidate fencing (2023-05-29 14:06:29 -0300) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git tags/for-linus for you to fetch changes up to 0c7e314a6352664e12ec465f576cf039e95f8369: RDMA/rxe: Fix rxe_cq_post (2023-06-14 14:12:43 -0300) ---------------------------------------------------------------- v6.4 second rc RDMA pull request Many rc bug fixes: - Two rtrs bug fixes for error unwind bugs - Several rxe bug fixes: * Incorrect Rx packet validation * Using memory without a refcount * Syzkaller found use before initialization * Regression fix for missing locking with the tasklet conversion from this merge window - Have bnxt report the correct link properties to userspace, this was a regression in v6.3 - Several mlx5 bug fixes: * Kernel crash triggerable by userspace for the RAW ethernet profile * Defend against steering refcounting issues created by userspace * Incorrect change of QP port affinity parameters in some LAG configurations - Fix mlx5 Q counters: * Do not over allocate Q counters to allow userspace to use the full port capacity * Kernel crash triggered by eswitch due to mis-use of Q counters * Incorrect mlx5_device for Q counters in some LAG configurations - Properly implement the IBA spec restricting privileged qkeys to root - Always an error when reading from a disassociated device's event queue - isert bug fixes: * Avoid a deadlock with the CM handler and CM ID destruction * Correct list corruption due to incorrect locking * Fix a use after free around connection tear down ---------------------------------------------------------------- Bob Pearson (3): RDMA/rxe: Fix packet length checks RDMA/rxe: Fix ref count error in check_rkey() RDMA/rxe: Fix rxe_cq_post Edward Srouji (1): RDMA/uverbs: Restrict usage of privileged QKEYs Kamal Heib (1): RDMA/bnxt_re: Fix reporting active_{speed,width} attributes Li Zhijian (2): RDMA/rtrs: Fix the last iu->buf leak in err path RDMA/rtrs: Fix rxe_dealloc_pd warning Maher Sanalla (1): RDMA/mlx5: Initiate dropless RQ for RAW Ethernet functions Mark Bloch (2): RDMA/mlx5: Create an indirect flow table for steering anchor RDMA/mlx5: Fix affinity assignment Mark Zhang (1): RDMA/cma: Always set static rate to 0 for RoCE Patrisious Haddad (3): RDMA/mlx5: Fix Q-counters per vport allocation RDMA/mlx5: Remove vport Q-counters dependency on normal Q-counters RDMA/mlx5: Fix Q-counters query in LAG mode Saravanan Vajravel (3): IB/isert: Fix dead lock in ib_isert IB/isert: Fix possible list corruption in CMA handler IB/isert: Fix incorrect release of isert connection Yishai Hadas (1): IB/uverbs: Fix to consider event queue closing also upon non-blocking mode Zhu Yanjun (1): RDMA/rxe: Fix the use-before-initialization error of resp_pkts drivers/infiniband/core/cma.c | 4 +- drivers/infiniband/core/uverbs_cmd.c | 7 +- drivers/infiniband/core/uverbs_main.c | 12 +- drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 - drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 +- drivers/infiniband/hw/bnxt_re/main.c | 2 - drivers/infiniband/hw/mlx5/counters.c | 89 +++++-- drivers/infiniband/hw/mlx5/fs.c | 276 ++++++++++++++++++++- drivers/infiniband/hw/mlx5/fs.h | 16 ++ drivers/infiniband/hw/mlx5/main.c | 3 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 14 ++ drivers/infiniband/hw/mlx5/qp.c | 3 + drivers/infiniband/sw/rxe/rxe_cq.c | 4 +- drivers/infiniband/sw/rxe/rxe_net.c | 6 + drivers/infiniband/sw/rxe/rxe_qp.c | 7 +- drivers/infiniband/sw/rxe/rxe_resp.c | 3 +- drivers/infiniband/ulp/isert/ib_isert.c | 16 +- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 55 ++-- drivers/infiniband/ulp/rtrs/rtrs.c | 4 +- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 12 - include/linux/mlx5/driver.h | 12 + include/rdma/ib_addr.h | 23 -- 22 files changed, 447 insertions(+), 130 deletions(-)