1. 27 10月, 2020 2 次提交
  2. 30 9月, 2020 3 次提交
  3. 18 9月, 2020 2 次提交
  4. 10 9月, 2020 2 次提交
  5. 27 8月, 2020 2 次提交
  6. 24 8月, 2020 1 次提交
  7. 19 8月, 2020 2 次提交
  8. 30 7月, 2020 2 次提交
    • L
      RDMA/mlx5: Initialize QP mutex for the debug kernels · 7fa84b57
      Leon Romanovsky 提交于
      In DCT and RSS RAW QP creation flows, the QP mutex wasn't initialized and
      the magic field inside lock was missing. This caused to the following
      kernel warning for kernels build with CONFIG_DEBUG_MUTEXES.
      
       DEBUG_LOCKS_WARN_ON(lock->magic != lock)
       WARNING: CPU: 3 PID: 16261 at kernel/locking/mutex.c:938 __mutex_lock+0x60e/0x940
       Modules linked in: bonding nf_tables ipip tunnel4 geneve ip6_udp_tunnel udp_tunnel ip6_gre ip6_tunnel tunnel6 ip_gre gre ip_tunnel mlx5_ib mlx5_core mlxfw ptp pps_core rdma_ucm ib_uverbs ib_ipoib ib_umad openvswitch nsh xt_MASQUERADE nf_conntrack_netlink nfnetlink iptable_nat xt_addrtype xt_conntrack nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter overlay ib_srp scsi_transport_srp rpcrdma ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_cm ib_core [last unloaded: mlxfw]
       CPU: 3 PID: 16261 Comm: ib_send_bw Not tainted 5.8.0-rc4_for_upstream_min_debug_2020_07_08_22_04 #1
       Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
       RIP: 0010:__mutex_lock+0x60e/0x940
       Code: c0 0f 84 6d fa ff ff 44 8b 15 4e 9d ba 00 45 85 d2 0f 85 5d fa ff ff 48 c7 c6 f2 de 2b 82 48 c7 c7 f1 8a 2b 82 e8 d2 4d 72 ff <0f> 0b 4c 8b 4d 88 e9 3f fa ff ff f6 c2 04 0f 84 37 fe ff ff 48 89
       RSP: 0018:ffff88810bb8b870 EFLAGS: 00010286
       RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
       RDX: ffff88829f1dd880 RSI: 0000000000000000 RDI: ffffffff81192afa
       RBP: ffff88810bb8b910 R08: 0000000000000000 R09: 0000000000000028
       R10: 0000000000000000 R11: 0000000000003f85 R12: 0000000000000002
       R13: ffff88827d8d3ce0 R14: ffffffffa059f615 R15: ffff8882a4d02610
       FS:  00007f3f6988e740(0000) GS:ffff8882f5b80000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000556556158000 CR3: 000000010a63c005 CR4: 0000000000360ea0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
       Call Trace:
        ? cmd_exec+0x947/0xe60 [mlx5_core]
        ? __mutex_lock+0x76/0x940
        ? mlx5_ib_qp_set_counter+0x25/0xa0 [mlx5_ib]
        mlx5_ib_qp_set_counter+0x25/0xa0 [mlx5_ib]
        mlx5_ib_counter_bind_qp+0x9b/0xe0 [mlx5_ib]
        __rdma_counter_bind_qp+0x6b/0xa0 [ib_core]
        rdma_counter_bind_qp_auto+0x363/0x520 [ib_core]
        _ib_modify_qp+0x316/0x580 [ib_core]
        ib_modify_qp_with_udata+0x19/0x30 [ib_core]
        modify_qp+0x4c4/0x600 [ib_uverbs]
        ib_uverbs_ex_modify_qp+0x87/0xe0 [ib_uverbs]
        ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x129/0x1c0 [ib_uverbs]
        ib_uverbs_cmd_verbs.isra.5+0x5d5/0x11f0 [ib_uverbs]
        ? ib_uverbs_handler_UVERBS_METHOD_QUERY_CONTEXT+0x120/0x120 [ib_uverbs]
        ? lock_acquire+0xb9/0x3a0
        ? ib_uverbs_ioctl+0xd0/0x210 [ib_uverbs]
        ? ib_uverbs_ioctl+0x175/0x210 [ib_uverbs]
        ib_uverbs_ioctl+0x14b/0x210 [ib_uverbs]
        ? ib_uverbs_ioctl+0xd0/0x210 [ib_uverbs]
        ksys_ioctl+0x234/0x7d0
        ? exc_page_fault+0x202/0x640
        ? do_syscall_64+0x1f/0x2e0
        __x64_sys_ioctl+0x16/0x20
        do_syscall_64+0x59/0x2e0
        ? asm_exc_page_fault+0x8/0x30
        ? rcu_read_lock_sched_held+0x52/0x60
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: b4aaa1f0 ("IB/mlx5: Handle type IB_QPT_DRIVER when creating a QP")
      Link: https://lore.kernel.org/r/20200730082719.1582397-2-leon@kernel.orgReviewed-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      7fa84b57
    • L
      RDMA/mlx5: Allow providing extra scatter CQE QP flag · 81530ab0
      Leon Romanovsky 提交于
      Scatter CQE feature relies on two flags MLX5_QP_FLAG_SCATTER_CQE and
      MLX5_QP_FLAG_ALLOW_SCATTER_CQE, both of them can be provided without
      relation to device capability.
      
      Relax global validity check to allow MLX5_QP_FLAG_ALLOW_SCATTER_CQE QP
      flag.
      
      Existing user applications are failing on this new validity check.
      
      Fixes: 90ecb37a ("RDMA/mlx5: Change scatter CQE flag to be set like other vendor flags")
      Fixes: 37518fa4 ("RDMA/mlx5: Process all vendor flags in one place")
      Link: https://lore.kernel.org/r/20200728120255.805733-1-leon@kernel.orgReviewed-by: NArtemy Kovalyov <artemyko@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      81530ab0
  9. 29 7月, 2020 1 次提交
  10. 25 7月, 2020 1 次提交
  11. 09 7月, 2020 1 次提交
    • L
      RDMA/mlx5: Set PD pointers for the error flow unwind · 0a037150
      Leon Romanovsky 提交于
      ib_pd is accessed internally during destroy of the TIR/TIS, but PD
      can be not set yet. This leading to the following kernel panic.
      
        BUG: kernel NULL pointer dereference, address: 0000000000000074
        PGD 8000000079eaa067 P4D 8000000079eaa067 PUD 7ae81067 PMD 0 Oops: 0000 [#1] SMP PTI
        CPU: 1 PID: 709 Comm: syz-executor.0 Not tainted 5.8.0-rc3 #41 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
        RIP: 0010:destroy_raw_packet_qp_tis drivers/infiniband/hw/mlx5/qp.c:1189 [inline]
        RIP: 0010:destroy_raw_packet_qp drivers/infiniband/hw/mlx5/qp.c:1527 [inline]
        RIP: 0010:destroy_qp_common+0x2ca/0x4f0 drivers/infiniband/hw/mlx5/qp.c:2397
        Code: 00 85 c0 74 2e e8 56 18 55 ff 48 8d b3 28 01 00 00 48 89 ef e8 d7 d3 ff ff 48 8b 43 08 8b b3 c0 01 00 00 48 8b bd a8 0a 00 00 <0f> b7 50 74 e8 0d 6a fe ff e8 28 18 55 ff 49 8d 55 50 4c 89 f1 48
        RSP: 0018:ffffc900007bbac8 EFLAGS: 00010293
        RAX: 0000000000000000 RBX: ffff88807949e800 RCX: 0000000000000998
        RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88807c180140
        RBP: ffff88807b50c000 R08: 000000000002d379 R09: ffffc900007bba00
        R10: 0000000000000001 R11: 000000000002d358 R12: ffff888076f37000
        R13: ffff88807949e9c8 R14: ffffc900007bbe08 R15: ffff888076f37000
        FS:  00000000019bf940(0000) GS:ffff88807dd00000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000000000000074 CR3: 0000000076d68004 CR4: 0000000000360ee0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        Call Trace:
         mlx5_ib_create_qp+0xf36/0xf90 drivers/infiniband/hw/mlx5/qp.c:3014
         _ib_create_qp drivers/infiniband/core/core_priv.h:333 [inline]
         create_qp+0x57f/0xd20 drivers/infiniband/core/uverbs_cmd.c:1443
         ib_uverbs_create_qp+0xcf/0x100 drivers/infiniband/core/uverbs_cmd.c:1564
         ib_uverbs_write+0x5fa/0x780 drivers/infiniband/core/uverbs_main.c:664
         __vfs_write+0x3f/0x90 fs/read_write.c:495
         vfs_write+0xc7/0x1f0 fs/read_write.c:559
         ksys_write+0x5e/0x110 fs/read_write.c:612
         do_syscall_64+0x3e/0x70 arch/x86/entry/common.c:359
         entry_SYSCALL_64_after_hwframe+0x44/0xa9
        RIP: 0033:0x466479
        Code: Bad RIP value.
        RSP: 002b:00007ffd057b62b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
        RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000466479
        RDX: 0000000000000070 RSI: 0000000020000240 RDI: 0000000000000003
        RBP: 00000000019bf8fc R08: 0000000000000000 R09: 0000000000000000
        R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
        R13: 0000000000000bf6 R14: 00000000004cb859 R15: 00000000006fefc0
      
      Fixes: 6c41965d ("RDMA/mlx5: Don't access ib_qp fields in internal destroy QP path")
      Link: https://lore.kernel.org/r/20200707110612.882962-4-leon@kernel.orgSigned-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      0a037150
  12. 08 7月, 2020 1 次提交
  13. 07 7月, 2020 2 次提交
  14. 02 7月, 2020 1 次提交
  15. 23 6月, 2020 1 次提交
    • L
      RDMA/mlx5: Protect from kernel crash if XRC_TGT doesn't have udata · 6eefa839
      Leon Romanovsky 提交于
      Don't deref udata if it is NULL
      
        BUG: kernel NULL pointer dereference, address: 0000000000000030
        #PF: supervisor read access in kernel mode
        #PF: error_code(0x0000) - not-present page
        PGD 0 P4D 0
        Oops: 0000   SMP PTI
        CPU: 2 PID: 1592 Comm: python3 Not tainted 5.7.0-rc6+ #1
        Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
        RIP: 0010:create_qp+0x39e/0xae0 [mlx5_ib]
        Code: c0 0d 00 00 bf 10 01 00 00 e8 be a9 e4 e0 48 85 c0 49 89 c2 0f 84 0c 07 00 00 41 8b 85 74 63 01 00 0f c8 a9 00 00 00 10 74 0a <41> 8b 46 30 0f c8 41 89 42 14 41 8b 52 18 41 0f b6 4a 1c 0f ca 89
        RSP: 0018:ffffc9000067f8b0 EFLAGS: 00010206
        RAX: 0000000010170000 RBX: ffff888441313000 RCX: 0000000000000000
        RDX: 0000000000000200 RSI: 0000000000000000 RDI: ffff88845b1d4400
        RBP: ffffc9000067fa60 R08: 0000000000000200 R09: ffff88845b1d4200
        R10: ffff88845b1d4200 R11: ffff888441313000 R12: ffffc9000067f950
        R13: ffff88846ac00140 R14: 0000000000000000 R15: ffff88846c2bc000
        FS:  00007faa1a3c0540(0000) GS:ffff88846fd00000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000000000000030 CR3: 0000000446dca003 CR4: 0000000000760ea0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        PKRU: 55555554
        Call Trace:
         ? __switch_to_asm+0x40/0x70
         ? __switch_to_asm+0x34/0x70
         mlx5_ib_create_qp+0x897/0xfa0 [mlx5_ib]
         ib_create_qp+0x9e/0x300 [ib_core]
         create_qp+0x92d/0xb20 [ib_uverbs]
         ? ib_uverbs_cq_event_handler+0x30/0x30 [ib_uverbs]
         ? release_resource+0x30/0x30
         ib_uverbs_create_qp+0xc4/0xe0 [ib_uverbs]
         ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0xc8/0xf0 [ib_uverbs]
         ib_uverbs_run_method+0x223/0x770 [ib_uverbs]
         ? track_pfn_remap+0xa7/0x100
         ? uverbs_disassociate_api+0xd0/0xd0 [ib_uverbs]
         ? remap_pfn_range+0x358/0x490
         ib_uverbs_cmd_verbs.isra.6+0x19b/0x370 [ib_uverbs]
         ? rdma_umap_priv_init+0x82/0xe0 [ib_core]
         ? vm_mmap_pgoff+0xec/0x120
         ib_uverbs_ioctl+0xc0/0x120 [ib_uverbs]
         ksys_ioctl+0x92/0xb0
         __x64_sys_ioctl+0x16/0x20
         do_syscall_64+0x48/0x130
         entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: e383085c ("RDMA/mlx5: Set ECE options during QP create")
      Link: https://lore.kernel.org/r/20200621115959.60126-1-leon@kernel.orgSigned-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      6eefa839
  16. 19 6月, 2020 4 次提交
  17. 16 6月, 2020 1 次提交
  18. 15 6月, 2020 1 次提交
  19. 04 6月, 2020 3 次提交
  20. 30 5月, 2020 1 次提交
  21. 28 5月, 2020 6 次提交