1. 16 7月, 2021 6 次提交
  2. 30 6月, 2021 1 次提交
  3. 25 6月, 2021 1 次提交
  4. 23 6月, 2021 6 次提交
  5. 22 6月, 2021 2 次提交
  6. 17 6月, 2021 13 次提交
  7. 04 6月, 2021 4 次提交
  8. 20 5月, 2021 1 次提交
  9. 18 5月, 2021 1 次提交
    • L
      RDMA/rxe: Return CQE error if invalid lkey was supplied · dc07628b
      Leon Romanovsky 提交于
      RXE is missing update of WQE status in LOCAL_WRITE failures.  This caused
      the following kernel panic if someone sent an atomic operation with an
      explicitly wrong lkey.
      
      [leonro@vm ~]$ mkt test
      test_atomic_invalid_lkey (tests.test_atomic.AtomicTest) ...
       WARNING: CPU: 5 PID: 263 at drivers/infiniband/sw/rxe/rxe_comp.c:740 rxe_completer+0x1a6d/0x2e30 [rdma_rxe]
       Modules linked in: crc32_generic rdma_rxe ip6_udp_tunnel udp_tunnel rdma_ucm rdma_cm ib_umad ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core mlx5_core ptp pps_core
       CPU: 5 PID: 263 Comm: python3 Not tainted 5.13.0-rc1+ #2936
       Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
       RIP: 0010:rxe_completer+0x1a6d/0x2e30 [rdma_rxe]
       Code: 03 0f 8e 65 0e 00 00 3b 93 10 06 00 00 0f 84 82 0a 00 00 4c 89 ff 4c 89 44 24 38 e8 2d 74 a9 e1 4c 8b 44 24 38 e9 1c f5 ff ff <0f> 0b e9 0c e8 ff ff b8 05 00 00 00 41 bf 05 00 00 00 e9 ab e7 ff
       RSP: 0018:ffff8880158af090 EFLAGS: 00010246
       RAX: 0000000000000000 RBX: ffff888016a78000 RCX: ffffffffa0cf1652
       RDX: 1ffff9200004b442 RSI: 0000000000000004 RDI: ffffc9000025a210
       RBP: dffffc0000000000 R08: 00000000ffffffea R09: ffff88801617740b
       R10: ffffed1002c2ee81 R11: 0000000000000007 R12: ffff88800f3b63e8
       R13: ffff888016a78008 R14: ffffc9000025a180 R15: 000000000000000c
       FS:  00007f88b622a740(0000) GS:ffff88806d540000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 00007f88b5a1fa10 CR3: 000000000d848004 CR4: 0000000000370ea0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
       Call Trace:
        rxe_do_task+0x130/0x230 [rdma_rxe]
        rxe_rcv+0xb11/0x1df0 [rdma_rxe]
        rxe_loopback+0x157/0x1e0 [rdma_rxe]
        rxe_responder+0x5532/0x7620 [rdma_rxe]
        rxe_do_task+0x130/0x230 [rdma_rxe]
        rxe_rcv+0x9c8/0x1df0 [rdma_rxe]
        rxe_loopback+0x157/0x1e0 [rdma_rxe]
        rxe_requester+0x1efd/0x58c0 [rdma_rxe]
        rxe_do_task+0x130/0x230 [rdma_rxe]
        rxe_post_send+0x998/0x1860 [rdma_rxe]
        ib_uverbs_post_send+0xd5f/0x1220 [ib_uverbs]
        ib_uverbs_write+0x847/0xc80 [ib_uverbs]
        vfs_write+0x1c5/0x840
        ksys_write+0x176/0x1d0
        do_syscall_64+0x3f/0x80
        entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Link: https://lore.kernel.org/r/11e7b553f3a6f5371c6bb3f57c494bb52b88af99.1620711734.git.leonro@nvidia.comSigned-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Acked-by: NZhu Yanjun <zyjzyj2000@gmail.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      dc07628b
  10. 12 5月, 2021 1 次提交
    • L
      RDMA/rxe: Clear all QP fields if creation failed · 67f29896
      Leon Romanovsky 提交于
      rxe_qp_do_cleanup() relies on valid pointer values in QP for the properly
      created ones, but in case rxe_qp_from_init() failed it was filled with
      garbage and caused tot the following error.
      
        refcount_t: underflow; use-after-free.
        WARNING: CPU: 1 PID: 12560 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
        Modules linked in:
        CPU: 1 PID: 12560 Comm: syz-executor.4 Not tainted 5.12.0-syzkaller #0
        Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
        RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
        Code: e9 db fe ff ff 48 89 df e8 2c c2 ea fd e9 8a fe ff ff e8 72 6a a7 fd 48 c7 c7 e0 b2 c1 89 c6 05 dc 3a e6 09 01 e8 ee 74 fb 04 <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55
        RSP: 0018:ffffc900097ceba8 EFLAGS: 00010286
        RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
        RDX: 0000000000040000 RSI: ffffffff815bb075 RDI: fffff520012f9d67
        RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
        R10: ffffffff815b4eae R11: 0000000000000000 R12: ffff8880322a4800
        R13: ffff8880322a4940 R14: ffff888033044e00 R15: 0000000000000000
        FS:  00007f6eb2be3700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 00007fdbe5d41000 CR3: 000000001d181000 CR4: 00000000001506e0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        Call Trace:
         __refcount_sub_and_test include/linux/refcount.h:283 [inline]
         __refcount_dec_and_test include/linux/refcount.h:315 [inline]
         refcount_dec_and_test include/linux/refcount.h:333 [inline]
         kref_put include/linux/kref.h:64 [inline]
         rxe_qp_do_cleanup+0x96f/0xaf0 drivers/infiniband/sw/rxe/rxe_qp.c:805
         execute_in_process_context+0x37/0x150 kernel/workqueue.c:3327
         rxe_elem_release+0x9f/0x180 drivers/infiniband/sw/rxe/rxe_pool.c:391
         kref_put include/linux/kref.h:65 [inline]
         rxe_create_qp+0x2cd/0x310 drivers/infiniband/sw/rxe/rxe_verbs.c:425
         _ib_create_qp drivers/infiniband/core/core_priv.h:331 [inline]
         ib_create_named_qp+0x2ad/0x1370 drivers/infiniband/core/verbs.c:1231
         ib_create_qp include/rdma/ib_verbs.h:3644 [inline]
         create_mad_qp+0x177/0x2d0 drivers/infiniband/core/mad.c:2920
         ib_mad_port_open drivers/infiniband/core/mad.c:3001 [inline]
         ib_mad_init_device+0xd6f/0x1400 drivers/infiniband/core/mad.c:3092
         add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:717
         enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331
         ib_register_device drivers/infiniband/core/device.c:1413 [inline]
         ib_register_device+0x7c7/0xa50 drivers/infiniband/core/device.c:1365
         rxe_register_device+0x3d5/0x4a0 drivers/infiniband/sw/rxe/rxe_verbs.c:1147
         rxe_add+0x12fe/0x16d0 drivers/infiniband/sw/rxe/rxe.c:247
         rxe_net_add+0x8c/0xe0 drivers/infiniband/sw/rxe/rxe_net.c:503
         rxe_newlink drivers/infiniband/sw/rxe/rxe.c:269 [inline]
         rxe_newlink+0xb7/0xe0 drivers/infiniband/sw/rxe/rxe.c:250
         nldev_newlink+0x30e/0x550 drivers/infiniband/core/nldev.c:1555
         rdma_nl_rcv_msg+0x36d/0x690 drivers/infiniband/core/netlink.c:195
         rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline]
         rdma_nl_rcv+0x2ee/0x430 drivers/infiniband/core/netlink.c:259
         netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
         netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338
         netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927
         sock_sendmsg_nosec net/socket.c:654 [inline]
         sock_sendmsg+0xcf/0x120 net/socket.c:674
         ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350
         ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
         __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433
         do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
         entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Link: https://lore.kernel.org/r/7bf8d548764d406dbbbaf4b574960ebfd5af8387.1620717918.git.leonro@nvidia.com
      Reported-by: syzbot+36a7f280de4e11c6f04e@syzkaller.appspotmail.com
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Reviewed-by: NZhu Yanjun <zyjzyj2000@gmail.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      67f29896
  11. 11 5月, 2021 2 次提交
  12. 28 4月, 2021 1 次提交
  13. 22 4月, 2021 1 次提交