1. 02 2月, 2018 3 次提交
  2. 01 2月, 2018 2 次提交
  3. 30 1月, 2018 1 次提交
  4. 29 1月, 2018 3 次提交
  5. 26 1月, 2018 1 次提交
  6. 25 1月, 2018 1 次提交
  7. 20 1月, 2018 1 次提交
  8. 19 1月, 2018 5 次提交
  9. 17 1月, 2018 14 次提交
  10. 16 1月, 2018 4 次提交
    • J
      IB/mlx4: Fix incorrectly releasing steerable UD QPs when have only ETH ports · 852f6927
      Jack Morgenstein 提交于
      Allocating steerable UD QPs depends on having at least one IB port,
      while releasing those QPs does not.
      
      As a result, when there are only ETH ports, the IB (RoCE) driver
      requests releasing a qp range whose base qp is zero, with
      qp count zero.
      
      When SR-IOV is enabled, and the VF driver is running on a VM over
      a hypervisor which treats such qp release calls as errors
      (rather than NOPs), we see lines in the VM message log like:
      
       mlx4_core 0002:00:02.0: Failed to release qp range base:0 cnt:0
      
      Fix this by adding a check for a zero count in mlx4_release_qp_range()
      (which thus treats releasing 0 qps as a nop), and eliminating the
      check for device managed flow steering when releasing steerable UD QPs.
      (Freeing ib_uc_qpns_bitmap unconditionally is also OK, since it
      remains NULL when steerable UD QPs are not allocated).
      
      Cc: <stable@vger.kernel.org>
      Fixes: 4196670b ("IB/mlx4: Don't allocate range of steerable UD QPs for Ethernet-only device")
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NLeon Romanovsky <leon@kernel.org>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      852f6927
    • J
      RDMA/qedr: Fix endian problems around imm_data · 7bed7ebc
      Jason Gunthorpe 提交于
      The double swap matches what user space rdma-core does to imm_data.
      
      wc->imm_data is not used in the kernel so this change has no practical
      impact.
      Acked-by: NMichal Kalderon <michal.kalderon@cavium.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      7bed7ebc
    • J
      RDMA/hns: Fix endian problems around imm_data and rkey · ccb8a29e
      Jason Gunthorpe 提交于
      This matches the changes made recently to the userspace hns
      driver when it was made sparse clean.
      
      See rdma-core commit bffd380cfe56 ("libhns: Make the provider sparse
      clean")
      
      wc->imm_data is not used in the kernel so this change has no practical
      impact.
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      ccb8a29e
    • L
      RDMA/mlx5: Fix out-of-bound access while querying AH · ae59c3f0
      Leon Romanovsky 提交于
      The rdma_ah_find_type() accesses the port array based on an index
      controlled by userspace. The existing bounds check is after the first use
      of the index, so userspace can generate an out of bounds access, as shown
      by the KASN report below.
      
      ==================================================================
      BUG: KASAN: slab-out-of-bounds in to_rdma_ah_attr+0xa8/0x3b0
      Read of size 4 at addr ffff880019ae2268 by task ibv_rc_pingpong/409
      
      CPU: 0 PID: 409 Comm: ibv_rc_pingpong Not tainted 4.15.0-rc2-00031-gb60a3faf5b83-dirty #3
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014
      Call Trace:
       dump_stack+0xe9/0x18f
       print_address_description+0xa2/0x350
       kasan_report+0x3a5/0x400
       to_rdma_ah_attr+0xa8/0x3b0
       mlx5_ib_query_qp+0xd35/0x1330
       ib_query_qp+0x8a/0xb0
       ib_uverbs_query_qp+0x237/0x7f0
       ib_uverbs_write+0x617/0xd80
       __vfs_write+0xf7/0x500
       vfs_write+0x149/0x310
       SyS_write+0xca/0x190
       entry_SYSCALL_64_fastpath+0x18/0x85
      RIP: 0033:0x7fe9c7a275a0
      RSP: 002b:00007ffee5498738 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
      RAX: ffffffffffffffda RBX: 00007fe9c7ce4b00 RCX: 00007fe9c7a275a0
      RDX: 0000000000000018 RSI: 00007ffee5498800 RDI: 0000000000000003
      RBP: 000055d0c8d3f010 R08: 00007ffee5498800 R09: 0000000000000018
      R10: 00000000000000ba R11: 0000000000000246 R12: 0000000000008000
      R13: 0000000000004fb0 R14: 000055d0c8d3f050 R15: 00007ffee5498560
      
      Allocated by task 1:
       __kmalloc+0x3f9/0x430
       alloc_mad_private+0x25/0x50
       ib_mad_post_receive_mads+0x204/0xa60
       ib_mad_init_device+0xa59/0x1020
       ib_register_device+0x83a/0xbc0
       mlx5_ib_add+0x50e/0x5c0
       mlx5_add_device+0x142/0x410
       mlx5_register_interface+0x18f/0x210
       mlx5_ib_init+0x56/0x63
       do_one_initcall+0x15b/0x270
       kernel_init_freeable+0x2d8/0x3d0
       kernel_init+0x14/0x190
       ret_from_fork+0x24/0x30
      
      Freed by task 0:
      (stack is not available)
      
      The buggy address belongs to the object at ffff880019ae2000
       which belongs to the cache kmalloc-512 of size 512
      The buggy address is located 104 bytes to the right of
       512-byte region [ffff880019ae2000, ffff880019ae2200)
      The buggy address belongs to the page:
      page:000000005d674e18 count:1 mapcount:0 mapping:          (null) index:0x0 compound_mapcount: 0
      flags: 0x4000000000008100(slab|head)
      raw: 4000000000008100 0000000000000000 0000000000000000 00000001000c000c
      raw: dead000000000100 dead000000000200 ffff88001a402000 0000000000000000
      page dumped because: kasan: bad access detected
      
      Memory state around the buggy address:
       ffff880019ae2100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       ffff880019ae2180: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc
      >ffff880019ae2200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                                ^
       ffff880019ae2280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       ffff880019ae2300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      ==================================================================
      Disabling lock debugging due to kernel taint
      
      Cc: <stable@vger.kernel.org>
      Fixes: 44c58487 ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types")
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      ae59c3f0
  11. 12 1月, 2018 2 次提交
  12. 11 1月, 2018 2 次提交
  13. 09 1月, 2018 1 次提交