<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/rdma, branch v3.18.84</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.84</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.84'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-01-15T14:49:52Z</updated>
<entry>
<title>IB/cma: Fix a race condition in iboe_addr_get_sgid()</title>
<updated>2017-01-15T14:49:52Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-12-19T17:00:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=59e6ec3db8530af00d37344114f2f80b5e9a1914'/>
<id>urn:sha1:59e6ec3db8530af00d37344114f2f80b5e9a1914</id>
<content type='text'>
[ Upstream commit fba332b079029c2f4f7e84c1c1cd8e3867310c90 ]

Code that dereferences the struct net_device ip_ptr member must be
protected with an in_dev_get() / in_dev_put() pair. Hence insert
calls to these functions.

Fixes: commit 7b85627b9f02 ("IB/cma: IBoE (RoCE) IP-based GID addressing")
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Moni Shoua &lt;monis@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>IB/security: Restrict use of the write() interface</title>
<updated>2016-05-17T18:51:48Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgunthorpe@obsidianresearch.com</email>
</author>
<published>2016-04-11T01:13:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a34c1651ea7a55f3c0e77c80c3b27605d5a7dfea'/>
<id>urn:sha1:a34c1651ea7a55f3c0e77c80c3b27605d5a7dfea</id>
<content type='text'>
[ Upstream commit e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 ]

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 ]
Cc: stable@vger.kernel.org
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>IB/mlx5, iser, isert: Add Signature API additions</title>
<updated>2014-10-09T07:10:53Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2014-08-13T16:54:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=78eda2bb6542057b214af3bc1cae09c63e65d1d1'/>
<id>urn:sha1:78eda2bb6542057b214af3bc1cae09c63e65d1d1</id>
<content type='text'>
Expose more signature setting parameters. We modify the signature API
to allow usage of some new execution parameters relevant to data
integrity feature.

This patch modifies ib_sig_domain structure by:

- Deprecate DIF type in signature API (operation will
  be determined by the parameters alone, no DIF type awareness)
- Add APPTAG check bitmask (for input domain)
- Add REFTAG remap (increment) flag for each domain
- Add APPTAG/REFTAG escape options for each domain

The mlx5 driver is modified to follow the new parameters in HW
signature setup.

At the moment the callers (iser/isert) hard-code new parameters (by
DIF type). In the future, callers will retrieve them from the scsi
command structure.

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB: ib_umem_release() should decrement mm-&gt;pinned_vm from ib_umem_get</title>
<updated>2014-09-19T16:55:42Z</updated>
<author>
<name>Shawn Bohrer</name>
<email>sbohrer@rgmadvisors.com</email>
</author>
<published>2014-09-03T17:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87773dd56d5405ac28119fcfadacefd35877c18f'/>
<id>urn:sha1:87773dd56d5405ac28119fcfadacefd35877c18f</id>
<content type='text'>
In debugging an application that receives -ENOMEM from ib_reg_mr(), I
found that ib_umem_get() can fail because the pinned_vm count has
wrapped causing it to always be larger than the lock limit even with
RLIMIT_MEMLOCK set to RLIM_INFINITY.

The wrapping of pinned_vm occurs because the process that calls
ib_reg_mr() will have its mm-&gt;pinned_vm count incremented.  Later a
different process with a different mm_struct than the one that
allocated the ib_umem struct ends up releasing it which results in
decrementing the new processes mm-&gt;pinned_vm count past zero and
wrapping.

I'm not entirely sure what circumstances cause a different process to
release the ib_umem than the one that allocated it but the kernel
stack trace of the freeing process from my situation looks like the
following:

    Call Trace:
     [&lt;ffffffff814d64b1&gt;] dump_stack+0x19/0x1b
     [&lt;ffffffffa0b522a5&gt;] ib_umem_release+0x1f5/0x200 [ib_core]
     [&lt;ffffffffa0b90681&gt;] mlx4_ib_destroy_qp+0x241/0x440 [mlx4_ib]
     [&lt;ffffffffa0b4d93c&gt;] ib_destroy_qp+0x12c/0x170 [ib_core]
     [&lt;ffffffffa0cc7129&gt;] ib_uverbs_close+0x259/0x4e0 [ib_uverbs]
     [&lt;ffffffff81141cba&gt;] __fput+0xba/0x240
     [&lt;ffffffff81141e4e&gt;] ____fput+0xe/0x10
     [&lt;ffffffff81060894&gt;] task_work_run+0xc4/0xe0
     [&lt;ffffffff810029e5&gt;] do_notify_resume+0x95/0xa0
     [&lt;ffffffff814e3dd0&gt;] int_signal+0x12/0x17

The following patch fixes the issue by storing the pid struct of the
process that calls ib_umem_get() so that ib_umem_release and/or
ib_umem_account() can properly decrement the pinned_vm count of the
correct mm_struct.

Signed-off-by: Shawn Bohrer &lt;sbohrer@rgmadvisors.com&gt;
Reviewed-by: Shachar Raindel &lt;raindel@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'core', 'cxgb4', 'ipoib', 'iser', 'iwcm', 'mad', 'misc', 'mlx4', 'mlx5', 'ocrdma' and 'srp' into for-next</title>
<updated>2014-08-14T15:58:04Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2014-08-14T15:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d087f6ad724dfbcdc3df8e0191b80d9d8d839e71'/>
<id>urn:sha1:d087f6ad724dfbcdc3df8e0191b80d9d8d839e71</id>
<content type='text'>
</content>
</entry>
<entry>
<title>IB/mad: Add user space RMPP support</title>
<updated>2014-08-11T03:36:00Z</updated>
<author>
<name>Ira Weiny</name>
<email>ira.weiny@intel.com</email>
</author>
<published>2014-08-08T23:00:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1471cb6ca67990a306500e69e52ffb28c93ccbbc'/>
<id>urn:sha1:1471cb6ca67990a306500e69e52ffb28c93ccbbc</id>
<content type='text'>
Using the new registration mechanism, define a flag that indicates the
user wishes to process RMPP messages in user space rather than have
the kernel process them.

Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/mad: add new ioctl to ABI to support new registration options</title>
<updated>2014-08-11T03:36:00Z</updated>
<author>
<name>Ira Weiny</name>
<email>ira.weiny@intel.com</email>
</author>
<published>2014-08-08T23:00:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0f29b46d49b0ca50536632c6a33986c3171f5ea1'/>
<id>urn:sha1:0f29b46d49b0ca50536632c6a33986c3171f5ea1</id>
<content type='text'>
Registrations options are specified through flags.  Definitions of flags will
be in subsequent patches.

Signed-off-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Add user MR re-registration support</title>
<updated>2014-08-01T22:11:13Z</updated>
<author>
<name>Matan Barak</name>
<email>matanb@mellanox.com</email>
</author>
<published>2014-07-31T08:01:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7e6edb9b2e0bcfb2a588db390c44d120213c57ae'/>
<id>urn:sha1:7e6edb9b2e0bcfb2a588db390c44d120213c57ae</id>
<content type='text'>
Memory re-registration is a feature that enables changing the
attributes of a memory region registered by user-space, including PD,
translation (address and length) and access flags.

Add the required support in uverbs and the kernel verbs API.

Signed-off-by: Matan Barak &lt;matanb@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>Merge branches 'core', 'cxgb3', 'cxgb4', 'iser', 'iwpm', 'misc', 'mlx4', 'mlx5', 'noio', 'ocrdma', 'qib', 'srp' and 'usnic' into for-next</title>
<updated>2014-06-10T17:12:14Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2014-06-10T17:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eeaddf3670d4974e17268ec78a576ad397e2dcd9'/>
<id>urn:sha1:eeaddf3670d4974e17268ec78a576ad397e2dcd9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>RDMA/core: Add support for iWARP Port Mapper user space service</title>
<updated>2014-06-10T17:11:45Z</updated>
<author>
<name>Tatyana Nikolova</name>
<email>Tatyana.E.Nikolova@intel.com</email>
</author>
<published>2014-03-26T22:07:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=30dc5e63d6a5ad24894b5512d10b228d73645a44'/>
<id>urn:sha1:30dc5e63d6a5ad24894b5512d10b228d73645a44</id>
<content type='text'>
This patch adds iWARP Port Mapper (IWPM) Version 2 support.  The iWARP
Port Mapper implementation is based on the port mapper specification
section in the Sockets Direct Protocol paper -
http://www.rdmaconsortium.org/home/draft-pinkerton-iwarp-sdp-v1.0.pdf

Existing iWARP RDMA providers use the same IP address as the native
TCP/IP stack when creating RDMA connections.  They need a mechanism to
claim the TCP ports used for RDMA connections to prevent TCP port
collisions when other host applications use TCP ports.  The iWARP Port
Mapper provides a standard mechanism to accomplish this.  Without this
service it is possible for RDMA application to bind/listen on the same
port which is already being used by native TCP host application.  If
that happens the incoming TCP connection data can be passed to the
RDMA stack with error.

The iWARP Port Mapper solution doesn't contain any changes to the
existing network stack in the kernel space.  All the changes are
contained with the infiniband tree and also in user space.

The iWARP Port Mapper service is implemented as a user space daemon
process.  Source for the IWPM service is located at
http://git.openfabrics.org/git?p=~tnikolova/libiwpm-1.0.0/.git;a=summary

The iWARP driver (port mapper client) sends to the IWPM service the
local IP address and TCP port it has received from the RDMA
application, when starting a connection.  The IWPM service performs a
socket bind from user space to get an available TCP port, called a
mapped port, and communicates it back to the client.  In that sense,
the IWPM service is used to map the TCP port, which the RDMA
application uses to any port available from the host TCP port
space. The mapped ports are used in iWARP RDMA connections to avoid
collisions with native TCP stack which is aware that these ports are
taken. When an RDMA connection using a mapped port is terminated, the
client notifies the IWPM service, which then releases the TCP port.

The message exchange between the IWPM service and the iWARP drivers
(between user space and kernel space) is implemented using netlink
sockets.

1) Netlink interface functions are added: ibnl_unicast() and
   ibnl_mulitcast() for sending netlink messages to user space

2) The signature of the existing ibnl_put_msg() is changed to be more
   generic

3) Two netlink clients are added: RDMA_NL_NES, RDMA_NL_C4IW
   corresponding to the two iWarp drivers - nes and cxgb4 which use
   the IWPM service

4) Enums are added to enumerate the attributes in the netlink
   messages, which are exchanged between the user space IWPM service
   and the iWARP drivers

Signed-off-by: Tatyana Nikolova &lt;tatyana.e.nikolova@intel.com&gt;
Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Reviewed-by: PJ Waskiewicz &lt;pj.waskiewicz@solidfire.com&gt;

[ Fold in range checking fixes and nlh_next removal as suggested by Dan
  Carpenter and Steve Wise.  Fix sparse endianness in hash.  - Roland ]

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
</feed>
