<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/infiniband/core/ucma.c, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-10-20T17:35:51Z</updated>
<entry>
<title>IB/ucma: check workqueue allocation before usage</title>
<updated>2015-10-20T17:35:51Z</updated>
<author>
<name>Sasha Levin</name>
</author>
<published>2015-09-17T20:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0174b381caf89443d92c6fe75f725f2bfeba96b6'/>
<id>urn:sha1:0174b381caf89443d92c6fe75f725f2bfeba96b6</id>
<content type='text'>
Allocating a workqueue might fail, which wasn't checked so far and would
lead to NULL ptr derefs when an attempt to use it was made.

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/ucma: HW Device hot-removal support</title>
<updated>2015-08-30T22:12:41Z</updated>
<author>
<name>Yishai Hadas</name>
</author>
<published>2015-08-13T15:32:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1c30298ccab87151a0c4241fc5985c591598361'/>
<id>urn:sha1:e1c30298ccab87151a0c4241fc5985c591598361</id>
<content type='text'>
Currently, IB/cma remove_one flow blocks until all user descriptor managed by
IB/ucma are released. This prevents hot-removal of IB devices. This patch
allows IB/cma to remove devices regardless of user space activity. Upon getting
the RDMA_CM_EVENT_DEVICE_REMOVAL event we close all the underlying HW resources
for the given ucontext. The ucontext itself is still alive till its explicit
destroying by its creator.

Running applications at that time will have some zombie device, further
operations may fail.

Signed-off-by: Yishai Hadas &lt;yishaih@mellanox.com&gt;
Signed-off-by: Shachar Raindel &lt;raindel@mellanox.com&gt;
Reviewed-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/ucma: Fix theoretical user triggered use-after-free</title>
<updated>2015-08-29T02:54:48Z</updated>
<author>
<name>Jason Gunthorpe</name>
</author>
<published>2015-08-04T23:13:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e967fd0b84a843b2475acc67a5a8df138c5f5c0'/>
<id>urn:sha1:7e967fd0b84a843b2475acc67a5a8df138c5f5c0</id>
<content type='text'>
Something like this:

CPU A                         CPU B
Acked-by: Sean Hefty &lt;sean.hefty@intel.com&gt;

========================      ================================
ucma_destroy_id()
 wait_for_completion()
                              .. anything
                                ucma_put_ctx()
                                  complete()
 .. continues ...
                              ucma_leave_multicast()
                               mutex_lock(mut)
                                 atomic_inc(ctx-&gt;ref)
                               mutex_unlock(mut)
 ucma_free_ctx()
  ucma_cleanup_multicast()
   mutex_lock(mut)
     kfree(mc)
                               rdma_leave_multicast(mc-&gt;ctx-&gt;cm_id,..

Fix it by latching the ref at 0. Once it goes to 0 mc and ctx cannot
leave the mutex(mut) protection.

The other atomic_inc in ucma_get_ctx is OK because mutex(mut) protects
it from racing with ucma_destroy_id.

Signed-off-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Acked-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Destroy multcast_idr on module exit</title>
<updated>2015-07-14T17:20:15Z</updated>
<author>
<name>Johannes Thumshirn</name>
</author>
<published>2015-07-08T15:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45d254206f141f560e76319191f912d0a3d27bd3'/>
<id>urn:sha1:45d254206f141f560e76319191f912d0a3d27bd3</id>
<content type='text'>
Destroy multcast_idr on module exit, reclaiming the allocated memory.

This was detected by the following semantic patch (written by Luis Rodriguez
&lt;mcgrof@suse.com&gt;)
&lt;SmPL&gt;
@ defines_module_init @
declarer name module_init, module_exit;
declarer name DEFINE_IDR;
identifier init;
@@

module_init(init);

@ defines_module_exit @
identifier exit;
@@

module_exit(exit);

@ declares_idr depends on defines_module_init &amp;&amp; defines_module_exit @
identifier idr;
@@

DEFINE_IDR(idr);

@ on_exit_calls_destroy depends on declares_idr &amp;&amp; defines_module_exit @
identifier declares_idr.idr, defines_module_exit.exit;
@@

exit(void)
{
 ...
 idr_destroy(&amp;idr);
 ...
}

@ missing_module_idr_destroy depends on declares_idr &amp;&amp; defines_module_exit &amp;&amp; !on_exit_calls_destroy @
identifier declares_idr.idr, defines_module_exit.exit;
@@

exit(void)
{
 ...
 +idr_destroy(&amp;idr);
}

&lt;/SmPL&gt;

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/ucma: Fix lockdep warning in ucma_lock_files</title>
<updated>2015-07-14T17:20:12Z</updated>
<author>
<name>Haggai Eran</name>
</author>
<published>2015-07-07T14:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=31b57b87fddf547bf3e98306b41bc82e111396fa'/>
<id>urn:sha1:31b57b87fddf547bf3e98306b41bc82e111396fa</id>
<content type='text'>
The ucma_lock_files() locks the mut mutex on two files, e.g. for migrating
an ID. Use mutex_lock_nested() to prevent the warning below.

 =============================================
 [ INFO: possible recursive locking detected ]
 4.1.0-rc6-hmm+ #40 Tainted: G           O
 ---------------------------------------------
 pingpong_rpc_se/10260 is trying to acquire lock:
  (&amp;file-&gt;mut){+.+.+.}, at: [&lt;ffffffffa047ac55&gt;] ucma_migrate_id+0xc5/0x248 [rdma_ucm]

 but task is already holding lock:
  (&amp;file-&gt;mut){+.+.+.}, at: [&lt;ffffffffa047ac4b&gt;] ucma_migrate_id+0xbb/0x248 [rdma_ucm]

 other info that might help us debug this:
  Possible unsafe locking scenario:

        CPU0
        ----
   lock(&amp;file-&gt;mut);
   lock(&amp;file-&gt;mut);

  *** DEADLOCK ***

  May be due to missing lock nesting notation

 1 lock held by pingpong_rpc_se/10260:
  #0:  (&amp;file-&gt;mut){+.+.+.}, at: [&lt;ffffffffa047ac4b&gt;] ucma_migrate_id+0xbb/0x248 [rdma_ucm]

 stack backtrace:
 CPU: 0 PID: 10260 Comm: pingpong_rpc_se Tainted: G           O    4.1.0-rc6-hmm+ #40
 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007
  ffff8801f85b63d0 ffff880195677b58 ffffffff81668f49 0000000000000001
  ffffffff825cbbe0 ffff880195677c38 ffffffff810bb991 ffff880100000000
  ffff880100000000 ffff880100000001 ffff8801f85b7010 ffffffff8121bee9
 Call Trace:
  [&lt;ffffffff81668f49&gt;] dump_stack+0x4f/0x6e
  [&lt;ffffffff810bb991&gt;] __lock_acquire+0x741/0x1820
  [&lt;ffffffff8121bee9&gt;] ? dput+0x29/0x320
  [&lt;ffffffff810bcb38&gt;] lock_acquire+0xc8/0x240
  [&lt;ffffffffa047ac55&gt;] ? ucma_migrate_id+0xc5/0x248 [rdma_ucm]
  [&lt;ffffffff8166b901&gt;] ? mutex_lock_nested+0x291/0x3e0
  [&lt;ffffffff8166b6d5&gt;] mutex_lock_nested+0x65/0x3e0
  [&lt;ffffffffa047ac55&gt;] ? ucma_migrate_id+0xc5/0x248 [rdma_ucm]
  [&lt;ffffffff810baeed&gt;] ? trace_hardirqs_on+0xd/0x10
  [&lt;ffffffff8166b66e&gt;] ? mutex_unlock+0xe/0x10
  [&lt;ffffffffa047ac55&gt;] ucma_migrate_id+0xc5/0x248 [rdma_ucm]
  [&lt;ffffffffa0478474&gt;] ucma_write+0xa4/0xb0 [rdma_ucm]
  [&lt;ffffffff81200674&gt;] __vfs_write+0x34/0x100
  [&lt;ffffffff8112427c&gt;] ? __audit_syscall_entry+0xac/0x110
  [&lt;ffffffff810ec055&gt;] ? current_kernel_time+0xc5/0xe0
  [&lt;ffffffff812aa4d3&gt;] ? security_file_permission+0x23/0x90
  [&lt;ffffffff8120088d&gt;] ? rw_verify_area+0x5d/0xe0
  [&lt;ffffffff812009bb&gt;] vfs_write+0xab/0x120
  [&lt;ffffffff81201519&gt;] SyS_write+0x59/0xd0
  [&lt;ffffffff8112427c&gt;] ? __audit_syscall_entry+0xac/0x110
  [&lt;ffffffff8166ffee&gt;] system_call_fastpath+0x12/0x76

Signed-off-by: Haggai Eran &lt;haggaie@mellanox.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Change rdma_protocol_iboe to roce</title>
<updated>2015-05-20T19:58:19Z</updated>
<author>
<name>Ira Weiny</name>
</author>
<published>2015-05-14T19:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d9fb0440698a8b9e8595353d60cfac7ab30efae'/>
<id>urn:sha1:5d9fb0440698a8b9e8595353d60cfac7ab30efae</id>
<content type='text'>
After discussion upstream, it was agreed to transition the usage of iboe
in the kernel to roce.  This keeps our terminology consistent with what
was finalized in the IBTA Annex 16 and IBTA Annex 17 publications.

Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/Verbs: Use management helper rdma_cap_ib_sa()</title>
<updated>2015-05-18T17:35:05Z</updated>
<author>
<name>Michael Wang</name>
</author>
<published>2015-05-05T12:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe53ba2f0c3de0416422407bab2c1982a2e85b6a'/>
<id>urn:sha1:fe53ba2f0c3de0416422407bab2c1982a2e85b6a</id>
<content type='text'>
Introduce helper rdma_cap_ib_sa() to help us check if the port of an
IB device support Infiniband Subnet Administration.

Signed-off-by: Michael Wang &lt;yun.wang@profitbricks.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Tested-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Tested-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/Verbs: Reform route related part in IB-core cma</title>
<updated>2015-05-18T17:35:04Z</updated>
<author>
<name>Michael Wang</name>
</author>
<published>2015-05-05T12:50:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c72f21893e125b40daebd55ae9b7084d64600455'/>
<id>urn:sha1:c72f21893e125b40daebd55ae9b7084d64600455</id>
<content type='text'>
Use raw management helpers to reform route related part in IB-core cma.

Signed-off-by: Michael Wang &lt;yun.wang@profitbricks.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Tested-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Reviewed-by: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Tested-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>IB/core: When marshaling ucma path from user-space, clear unused fields</title>
<updated>2015-02-17T20:34:52Z</updated>
<author>
<name>Ilya Nelkenbaum</name>
</author>
<published>2015-02-05T11:53:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2be9dc0e0fa59cc43c2c7084fc42b430809a0fe'/>
<id>urn:sha1:c2be9dc0e0fa59cc43c2c7084fc42b430809a0fe</id>
<content type='text'>
When marshaling a user path to the kernel struct ib_sa_path, we need
to zero smac and dmac and set the vlan id to the "no vlan" value.

This is to ensure that Ethernet attributes are not used with
InfiniBand QPs.

Fixes: dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm structures")
Signed-off-by: Ilya Nelkenbaum &lt;ilyan@mellanox.com&gt;
Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/cma: IBoE (RoCE) IP-based GID addressing</title>
<updated>2014-01-18T22:12:35Z</updated>
<author>
<name>Moni Shoua</name>
</author>
<published>2013-12-12T16:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b85627b9f02f9b0fb2ef5f021807f4251135857'/>
<id>urn:sha1:7b85627b9f02f9b0fb2ef5f021807f4251135857</id>
<content type='text'>
Currently, the IB core and specifically the RDMA-CM assumes that IBoE
(RoCE) gids encode related Ethernet netdevice interface MAC address
and possibly VLAN id.

Change GIDs to be treated as they encode interface IP address.

Since Ethernet layer 2 address parameters are not longer encoded
within gids, we have to extend the Infiniband address structures (e.g.
ib_ah_attr) with layer 2 address parameters, namely mac and vlan.

Signed-off-by: Moni Shoua &lt;monis@mellanox.com&gt;
Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
</feed>
