<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/infiniband, branch linux-4.5.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>IB/srp: Fix a debug kernel crash</title>
<updated>2016-06-01T19:17:03+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-04-12T21:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f131e8e07c4ff651a4a2508b9f2cc3a52708b9ab'/>
<id>f131e8e07c4ff651a4a2508b9f2cc3a52708b9ab</id>
<content type='text'>
commit 54f5c9c52d69afa55abf2b034df8d45f588466c3 upstream.

Avoid that the following BUG() is triggered against a debug
kernel:

kernel BUG at include/linux/scatterlist.h:92!
RIP: 0010:[&lt;ffffffffa0467199&gt;]  [&lt;ffffffffa0467199&gt;] srp_map_idb+0x199/0x1a0 [ib_srp]
Call Trace:
 [&lt;ffffffffa04685fa&gt;] srp_map_data+0x84a/0x890 [ib_srp]
 [&lt;ffffffffa0469674&gt;] srp_queuecommand+0x1e4/0x610 [ib_srp]
 [&lt;ffffffff813f5a5e&gt;] scsi_dispatch_cmd+0x9e/0x180
 [&lt;ffffffff813f8b07&gt;] scsi_request_fn+0x477/0x610
 [&lt;ffffffff81298ffe&gt;] __blk_run_queue+0x2e/0x40
 [&lt;ffffffff81299070&gt;] blk_delay_work+0x20/0x30
 [&lt;ffffffff81071f07&gt;] process_one_work+0x197/0x480
 [&lt;ffffffff81072239&gt;] worker_thread+0x49/0x490
 [&lt;ffffffff810787ea&gt;] kthread+0xea/0x100
 [&lt;ffffffff8159b632&gt;] ret_from_fork+0x22/0x40

Fixes: f7f7aab1a5c0 ("IB/srp: Convert to new registration API")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 54f5c9c52d69afa55abf2b034df8d45f588466c3 upstream.

Avoid that the following BUG() is triggered against a debug
kernel:

kernel BUG at include/linux/scatterlist.h:92!
RIP: 0010:[&lt;ffffffffa0467199&gt;]  [&lt;ffffffffa0467199&gt;] srp_map_idb+0x199/0x1a0 [ib_srp]
Call Trace:
 [&lt;ffffffffa04685fa&gt;] srp_map_data+0x84a/0x890 [ib_srp]
 [&lt;ffffffffa0469674&gt;] srp_queuecommand+0x1e4/0x610 [ib_srp]
 [&lt;ffffffff813f5a5e&gt;] scsi_dispatch_cmd+0x9e/0x180
 [&lt;ffffffff813f8b07&gt;] scsi_request_fn+0x477/0x610
 [&lt;ffffffff81298ffe&gt;] __blk_run_queue+0x2e/0x40
 [&lt;ffffffff81299070&gt;] blk_delay_work+0x20/0x30
 [&lt;ffffffff81071f07&gt;] process_one_work+0x197/0x480
 [&lt;ffffffff81072239&gt;] worker_thread+0x49/0x490
 [&lt;ffffffff810787ea&gt;] kthread+0xea/0x100
 [&lt;ffffffff8159b632&gt;] ret_from_fork+0x22/0x40

Fixes: f7f7aab1a5c0 ("IB/srp: Convert to new registration API")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net/mlx5e: Device's mtu field is u16 and not int</title>
<updated>2016-05-19T01:35:02+00:00</updated>
<author>
<name>Saeed Mahameed</name>
<email>saeedm@mellanox.com</email>
</author>
<published>2016-04-21T21:33:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=88e2d2d2eb82a0f3c96a19868dbe30dac219cd47'/>
<id>88e2d2d2eb82a0f3c96a19868dbe30dac219cd47</id>
<content type='text'>
[ Upstream commit 046339eaab26804f52f6604877f5674f70815b26 ]

For set/query MTU port firmware commands the MTU field
is 16 bits, here I changed all the "int mtu" parameters
of the functions wrapping those firmware commands to be u16.

Signed-off-by: Saeed Mahameed &lt;saeedm@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 046339eaab26804f52f6604877f5674f70815b26 ]

For set/query MTU port firmware commands the MTU field
is 16 bits, here I changed all the "int mtu" parameters
of the functions wrapping those firmware commands to be u16.

Signed-off-by: Saeed Mahameed &lt;saeedm@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips</title>
<updated>2016-05-11T09:21:22+00:00</updated>
<author>
<name>Hariprasad S</name>
<email>hariprasad@chelsio.com</email>
</author>
<published>2016-04-05T04:53:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2b2da6e18561efbd763659fd0ff1dfb9dd54873e'/>
<id>2b2da6e18561efbd763659fd0ff1dfb9dd54873e</id>
<content type='text'>
commit 32cc92c7b5e52357a0a24010bae9eb257fa75d3e upstream.

For T4, kernel mode qps don't use the user doorbell. User mode qps during
flow control db ringing are forced into kernel, where user doorbell is
treated as kernel doorbell and proper bar2 offset in bar2 virtual space is
calculated, which incase of T4 is a bogus address, causing a kernel panic
due to illegal write during doorbell ringing.
In case of T4, kernel mode qp bar2 virtual address should be 0. Added T4
check during bar2 virtual address calculation to return 0. Fixed Bar2
range checks based on bar2 physical address.

The below oops will be fixed

  &lt;1&gt;BUG: unable to handle kernel paging request at 000000000002aa08
  &lt;1&gt;IP: [&lt;ffffffffa011d800&gt;] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  &lt;4&gt;PGD 1416a8067 PUD 15bf35067 PMD 0
  &lt;4&gt;Oops: 0002 [#1] SMP
  &lt;4&gt;last sysfs file:
  /sys/devices/pci0000:00/0000:00:03.0/0000:02:00.4/infiniband/cxgb4_0/node_guid
  &lt;4&gt;CPU 5
  &lt;4&gt;Modules linked in: rdma_ucm rdma_cm ib_cm ib_sa ib_mad ib_uverbs
  ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE
  iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack
  ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables bridge autofs4
  target_core_iblock target_core_file target_core_pscsi target_core_mod
  configfs bnx2fc cnic uio fcoe libfcoe libfc scsi_transport_fc scsi_tgt 8021q
  garp stp llc cpufreq_ondemand acpi_cpufreq freq_table mperf vhost_net macvtap
  macvlan tun kvm uinput microcode iTCO_wdt iTCO_vendor_support sg joydev
  serio_raw i2c_i801 i2c_core lpc_ich mfd_core e1000e ptp pps_core ioatdma dca
  i7core_edac edac_core shpchp ext3 jbd mbcache sd_mod crc_t10dif pata_acpi
  ata_generic ata_piix iw_cxgb4 iw_cm ib_core ib_addr cxgb4 ipv6 dm_mirror
  dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan]
  &lt;4&gt;
  Supermicro X8ST3/X8ST3
  &lt;4&gt;RIP: 0010:[&lt;ffffffffa011d800&gt;]  [&lt;ffffffffa011d800&gt;]
  c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  &lt;4&gt;RSP: 0000:ffff880155a03db0  EFLAGS: 00010006
  &lt;4&gt;RAX: 000000000000001d RBX: ffff88013ae5fc00 RCX: ffff880155adb180
  &lt;4&gt;RDX: 000000000002aa00 RSI: 0000000000000001 RDI: ffff88013ae5fdf8
  &lt;4&gt;RBP: ffff880155a03e10 R08: 0000000000000000 R09: 0000000000000001
  &lt;4&gt;R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
  &lt;4&gt;R13: 000000000000001d R14: ffff880156414ab0 R15: ffffe8ffffc05b88
  &lt;4&gt;FS:  0000000000000000(0000) GS:ffff8800282a0000(0000) knlGS:0000000000000000
  &lt;4&gt;CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
  &lt;4&gt;CR2: 000000000002aa08 CR3: 000000015bd0e000 CR4: 00000000000007e0
  &lt;4&gt;DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  &lt;4&gt;DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  &lt;4&gt;Process cxgb4 (pid: 394, threadinfo ffff880155a00000, task ffff880156414ab0)
  &lt;4&gt;Stack:
  &lt;4&gt; ffff880156415068 ffff880155adb180 ffff880155a03df0 ffffffffa00a344b
  &lt;4&gt;&lt;d&gt; 00000000000003e8 ffff880155920000 0000000000000004 ffff880155920000
  &lt;4&gt;&lt;d&gt; ffff88015592d438 ffffffffa00a3860 ffff880155a03fd8 ffffe8ffffc05b88
  &lt;4&gt;Call Trace:
  &lt;4&gt; [&lt;ffffffffa00a344b&gt;] ? enable_txq_db+0x2b/0x80 [cxgb4]
  &lt;4&gt; [&lt;ffffffffa00a3860&gt;] ? process_db_full+0x0/0xa0 [cxgb4]
  &lt;4&gt; [&lt;ffffffffa00a38a6&gt;] process_db_full+0x46/0xa0 [cxgb4]
  &lt;4&gt; [&lt;ffffffff8109fda0&gt;] worker_thread+0x170/0x2a0
  &lt;4&gt; [&lt;ffffffff810a6aa0&gt;] ? autoremove_wake_function+0x0/0x40
  &lt;4&gt; [&lt;ffffffff8109fc30&gt;] ? worker_thread+0x0/0x2a0
  &lt;4&gt; [&lt;ffffffff810a660e&gt;] kthread+0x9e/0xc0
  &lt;4&gt; [&lt;ffffffff8100c28a&gt;] child_rip+0xa/0x20
  &lt;4&gt; [&lt;ffffffff810a6570&gt;] ? kthread+0x0/0xc0
  &lt;4&gt; [&lt;ffffffff8100c280&gt;] ? child_rip+0x0/0x20
  &lt;4&gt;Code: e9 ba 00 00 00 66 0f 1f 44 00 00 44 8b 05 29 07 02 00 45 85 c0 0f 85
  71 02 00 00 8b 83 70 01 00 00 45 0f b7 ed c1 e0 0f 44 09 e8 &lt;89&gt; 42 08 0f ae f8
  66 c7 83 82 01 00 00 00 00 44 0f b7 ab dc 01
  &lt;1&gt;RIP  [&lt;ffffffffa011d800&gt;] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  &lt;4&gt; RSP &lt;ffff880155a03db0&gt;
  &lt;4&gt;CR2: 000000000002aa08`

Based on original work by Bharat Potnuri &lt;bharat@chelsio.com&gt;

Fixes: 74217d4c6a4fb0d8 ("iw_cxgb4: support for bar2 qid densities exceeding the page size")

Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Reviewed-by: Leon Romanovsky &lt;leon@leon.nu&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 32cc92c7b5e52357a0a24010bae9eb257fa75d3e upstream.

For T4, kernel mode qps don't use the user doorbell. User mode qps during
flow control db ringing are forced into kernel, where user doorbell is
treated as kernel doorbell and proper bar2 offset in bar2 virtual space is
calculated, which incase of T4 is a bogus address, causing a kernel panic
due to illegal write during doorbell ringing.
In case of T4, kernel mode qp bar2 virtual address should be 0. Added T4
check during bar2 virtual address calculation to return 0. Fixed Bar2
range checks based on bar2 physical address.

The below oops will be fixed

  &lt;1&gt;BUG: unable to handle kernel paging request at 000000000002aa08
  &lt;1&gt;IP: [&lt;ffffffffa011d800&gt;] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  &lt;4&gt;PGD 1416a8067 PUD 15bf35067 PMD 0
  &lt;4&gt;Oops: 0002 [#1] SMP
  &lt;4&gt;last sysfs file:
  /sys/devices/pci0000:00/0000:00:03.0/0000:02:00.4/infiniband/cxgb4_0/node_guid
  &lt;4&gt;CPU 5
  &lt;4&gt;Modules linked in: rdma_ucm rdma_cm ib_cm ib_sa ib_mad ib_uverbs
  ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE
  iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack
  ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables bridge autofs4
  target_core_iblock target_core_file target_core_pscsi target_core_mod
  configfs bnx2fc cnic uio fcoe libfcoe libfc scsi_transport_fc scsi_tgt 8021q
  garp stp llc cpufreq_ondemand acpi_cpufreq freq_table mperf vhost_net macvtap
  macvlan tun kvm uinput microcode iTCO_wdt iTCO_vendor_support sg joydev
  serio_raw i2c_i801 i2c_core lpc_ich mfd_core e1000e ptp pps_core ioatdma dca
  i7core_edac edac_core shpchp ext3 jbd mbcache sd_mod crc_t10dif pata_acpi
  ata_generic ata_piix iw_cxgb4 iw_cm ib_core ib_addr cxgb4 ipv6 dm_mirror
  dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan]
  &lt;4&gt;
  Supermicro X8ST3/X8ST3
  &lt;4&gt;RIP: 0010:[&lt;ffffffffa011d800&gt;]  [&lt;ffffffffa011d800&gt;]
  c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  &lt;4&gt;RSP: 0000:ffff880155a03db0  EFLAGS: 00010006
  &lt;4&gt;RAX: 000000000000001d RBX: ffff88013ae5fc00 RCX: ffff880155adb180
  &lt;4&gt;RDX: 000000000002aa00 RSI: 0000000000000001 RDI: ffff88013ae5fdf8
  &lt;4&gt;RBP: ffff880155a03e10 R08: 0000000000000000 R09: 0000000000000001
  &lt;4&gt;R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
  &lt;4&gt;R13: 000000000000001d R14: ffff880156414ab0 R15: ffffe8ffffc05b88
  &lt;4&gt;FS:  0000000000000000(0000) GS:ffff8800282a0000(0000) knlGS:0000000000000000
  &lt;4&gt;CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
  &lt;4&gt;CR2: 000000000002aa08 CR3: 000000015bd0e000 CR4: 00000000000007e0
  &lt;4&gt;DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  &lt;4&gt;DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  &lt;4&gt;Process cxgb4 (pid: 394, threadinfo ffff880155a00000, task ffff880156414ab0)
  &lt;4&gt;Stack:
  &lt;4&gt; ffff880156415068 ffff880155adb180 ffff880155a03df0 ffffffffa00a344b
  &lt;4&gt;&lt;d&gt; 00000000000003e8 ffff880155920000 0000000000000004 ffff880155920000
  &lt;4&gt;&lt;d&gt; ffff88015592d438 ffffffffa00a3860 ffff880155a03fd8 ffffe8ffffc05b88
  &lt;4&gt;Call Trace:
  &lt;4&gt; [&lt;ffffffffa00a344b&gt;] ? enable_txq_db+0x2b/0x80 [cxgb4]
  &lt;4&gt; [&lt;ffffffffa00a3860&gt;] ? process_db_full+0x0/0xa0 [cxgb4]
  &lt;4&gt; [&lt;ffffffffa00a38a6&gt;] process_db_full+0x46/0xa0 [cxgb4]
  &lt;4&gt; [&lt;ffffffff8109fda0&gt;] worker_thread+0x170/0x2a0
  &lt;4&gt; [&lt;ffffffff810a6aa0&gt;] ? autoremove_wake_function+0x0/0x40
  &lt;4&gt; [&lt;ffffffff8109fc30&gt;] ? worker_thread+0x0/0x2a0
  &lt;4&gt; [&lt;ffffffff810a660e&gt;] kthread+0x9e/0xc0
  &lt;4&gt; [&lt;ffffffff8100c28a&gt;] child_rip+0xa/0x20
  &lt;4&gt; [&lt;ffffffff810a6570&gt;] ? kthread+0x0/0xc0
  &lt;4&gt; [&lt;ffffffff8100c280&gt;] ? child_rip+0x0/0x20
  &lt;4&gt;Code: e9 ba 00 00 00 66 0f 1f 44 00 00 44 8b 05 29 07 02 00 45 85 c0 0f 85
  71 02 00 00 8b 83 70 01 00 00 45 0f b7 ed c1 e0 0f 44 09 e8 &lt;89&gt; 42 08 0f ae f8
  66 c7 83 82 01 00 00 00 00 44 0f b7 ab dc 01
  &lt;1&gt;RIP  [&lt;ffffffffa011d800&gt;] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  &lt;4&gt; RSP &lt;ffff880155a03db0&gt;
  &lt;4&gt;CR2: 000000000002aa08`

Based on original work by Bharat Potnuri &lt;bharat@chelsio.com&gt;

Fixes: 74217d4c6a4fb0d8 ("iw_cxgb4: support for bar2 qid densities exceeding the page size")

Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Reviewed-by: Leon Romanovsky &lt;leon@leon.nu&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/security: Restrict use of the write() interface</title>
<updated>2016-05-04T21:49:09+00:00</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgunthorpe@obsidianresearch.com</email>
</author>
<published>2016-04-11T01:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0919927a5c86e71655ebc3a96a465c6eb640927b'/>
<id>0919927a5c86e71655ebc3a96a465c6eb640927b</id>
<content type='text'>
commit e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 upstream.

The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl().  This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory instead.

For the immediate repair, detect and deny suspicious accesses to
the write API.

For long term, update the user space libraries and the kernel API
to something that doesn't present the same security vulnerabilities
(likely a structured ioctl() interface).

The impacted uAPI interfaces are generally only available if
hardware from drivers/infiniband is installed in the system.

Reported-by: Jann Horn &lt;jann@thejh.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
[ Expanded check to all known write() entry points ]
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 upstream.

The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl().  This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory instead.

For the immediate repair, detect and deny suspicious accesses to
the write API.

For long term, update the user space libraries and the kernel API
to something that doesn't present the same security vulnerabilities
(likely a structured ioctl() interface).

The impacted uAPI interfaces are generally only available if
hardware from drivers/infiniband is installed in the system.

Reported-by: Jann Horn &lt;jann@thejh.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
[ Expanded check to all known write() entry points ]
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/mlx5: Expose correct max_sge_rd limit</title>
<updated>2016-05-04T21:49:09+00:00</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagi@grimberg.me</email>
</author>
<published>2016-03-31T16:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f0a5cc2e6685a452ccb7002073664dd5849a6e19'/>
<id>f0a5cc2e6685a452ccb7002073664dd5849a6e19</id>
<content type='text'>
commit 986ef95ecdd3eb6fa29433e68faa94c7624083be upstream.

mlx5 devices (Connect-IB, ConnectX-4, ConnectX-4-LX) has a limitation
where rdma read work queue entries cannot exceed 512 bytes.
A rdma_read wqe needs to fit in 512 bytes:
- wqe control segment (16 bytes)
- rdma segment (16 bytes)
- scatter elements (16 bytes each)

So max_sge_rd should be: (512 - 16 - 16) / 16 = 30.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@grimberg.me&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 986ef95ecdd3eb6fa29433e68faa94c7624083be upstream.

mlx5 devices (Connect-IB, ConnectX-4, ConnectX-4-LX) has a limitation
where rdma read work queue entries cannot exceed 512 bytes.
A rdma_read wqe needs to fit in 512 bytes:
- wqe control segment (16 bytes)
- rdma segment (16 bytes)
- scatter elements (16 bytes each)

So max_sge_rd should be: (512 - 16 - 16) / 16 = 30.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@grimberg.me&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>IB/core: Fix oops in ib_cache_gid_set_default_gid</title>
<updated>2016-05-04T21:49:08+00:00</updated>
<author>
<name>Doug Ledford</name>
<email>dledford@redhat.com</email>
</author>
<published>2016-04-23T00:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0203ecf1fd3040cf8f2ea3d248036ed9f12c72dc'/>
<id>0203ecf1fd3040cf8f2ea3d248036ed9f12c72dc</id>
<content type='text'>
commit f4e7de63ab273b6a5e35c82eb4fc6363c855ddd4 upstream.

When we fail to find the default gid index, we can't continue
processing in this routine or else we will pass a negative
index to later routines resulting in invalid memory access
attempts and a kernel oops.

Fixes: 03db3a2d81e6 (IB/core: Add RoCE GID table management)
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f4e7de63ab273b6a5e35c82eb4fc6363c855ddd4 upstream.

When we fail to find the default gid index, we can't continue
processing in this routine or else we will pass a negative
index to later routines resulting in invalid memory access
attempts and a kernel oops.

Fixes: 03db3a2d81e6 (IB/core: Add RoCE GID table management)
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>iser-target: Rework connection termination</title>
<updated>2016-04-12T14:33:47+00:00</updated>
<author>
<name>Jenny Derzhavetz</name>
<email>jennyf@mellanox.com</email>
</author>
<published>2016-02-24T17:24:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=924d4bb8248a08837d70c02c4744601e34a28179'/>
<id>924d4bb8248a08837d70c02c4744601e34a28179</id>
<content type='text'>
commit 6d1fba0c2cc7efe42fd761ecbba833ed0ea7b07e upstream.

When we receive an event that triggers connection termination,
we have a a couple of things we may want to do:
1. In case we are already terminating, bailout early
2. In case we are connected but not bound, disconnect and schedule
   a connection cleanup silently (don't reinstate)
3. In case we are connected and bound, disconnect and reinstate the connection

This rework fixes a bug that was detected against a mis-behaved
initiator which rejected our rdma_cm accept, in this stage the
isert_conn is no bound and reinstate caused a bogus dereference.

What's great about this is that we don't need the
post_recv_buf_count anymore, so get rid of it.

Signed-off-by: Jenny Derzhavetz &lt;jennyf@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 6d1fba0c2cc7efe42fd761ecbba833ed0ea7b07e upstream.

When we receive an event that triggers connection termination,
we have a a couple of things we may want to do:
1. In case we are already terminating, bailout early
2. In case we are connected but not bound, disconnect and schedule
   a connection cleanup silently (don't reinstate)
3. In case we are connected and bound, disconnect and reinstate the connection

This rework fixes a bug that was detected against a mis-behaved
initiator which rejected our rdma_cm accept, in this stage the
isert_conn is no bound and reinstate caused a bogus dereference.

What's great about this is that we don't need the
post_recv_buf_count anymore, so get rid of it.

Signed-off-by: Jenny Derzhavetz &lt;jennyf@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>iser-target: Separate flows for np listeners and connections cma events</title>
<updated>2016-04-12T14:33:46+00:00</updated>
<author>
<name>Jenny Derzhavetz</name>
<email>jennyf@mellanox.com</email>
</author>
<published>2016-02-24T17:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=86ea155a13db977b1134b7045123209fede9cfab'/>
<id>86ea155a13db977b1134b7045123209fede9cfab</id>
<content type='text'>
commit f81bf458208ef6d12b2fc08091204e3859dcdba4 upstream.

No need to restrict this check to specific events.

Signed-off-by: Jenny Derzhavetz &lt;jennyf@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f81bf458208ef6d12b2fc08091204e3859dcdba4 upstream.

No need to restrict this check to specific events.

Signed-off-by: Jenny Derzhavetz &lt;jennyf@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>iser-target: Add new state ISER_CONN_BOUND to isert_conn</title>
<updated>2016-04-12T14:33:46+00:00</updated>
<author>
<name>Jenny Derzhavetz</name>
<email>jennyf@mellanox.com</email>
</author>
<published>2016-02-24T17:23:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8cfea5d3dc7988d5270cb73335c5b8174d6878f1'/>
<id>8cfea5d3dc7988d5270cb73335c5b8174d6878f1</id>
<content type='text'>
commit aea92980601f7ddfcb3c54caa53a43726314fe46 upstream.

We need an indication that isert_conn-&gt;iscsi_conn binding has
happened so we'll know not to invoke a connection reinstatement
on an unbound connection which will lead to a bogus isert_conn-&gt;conn
dereferece.

Signed-off-by: Jenny Derzhavetz &lt;jennyf@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit aea92980601f7ddfcb3c54caa53a43726314fe46 upstream.

We need an indication that isert_conn-&gt;iscsi_conn binding has
happened so we'll know not to invoke a connection reinstatement
on an unbound connection which will lead to a bogus isert_conn-&gt;conn
dereferece.

Signed-off-by: Jenny Derzhavetz &lt;jennyf@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>iser-target: Fix identification of login rx descriptor type</title>
<updated>2016-04-12T14:33:46+00:00</updated>
<author>
<name>Jenny Derzhavetz</name>
<email>jennyf@mellanox.com</email>
</author>
<published>2016-02-24T17:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cce41f40d86dac51a7fa8b876d425fa66e9b1314'/>
<id>cce41f40d86dac51a7fa8b876d425fa66e9b1314</id>
<content type='text'>
commit b89a7c25462b164db280abc3b05d4d9d888d40e9 upstream.

Once connection request is accepted, one rx descriptor
is posted to receive login request. This descriptor has rx type,
but is outside the main pool of rx descriptors, and thus
was mistreated as tx type.

Signed-off-by: Jenny Derzhavetz &lt;jennyf@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit b89a7c25462b164db280abc3b05d4d9d888d40e9 upstream.

Once connection request is accepted, one rx descriptor
is posted to receive login request. This descriptor has rx type,
but is outside the main pool of rx descriptors, and thus
was mistreated as tx type.

Signed-off-by: Jenny Derzhavetz &lt;jennyf@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
</feed>
