<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/rdma, branch v4.16</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v4.16</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v4.16'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2018-03-28T22:13:36Z</updated>
<entry>
<title>RDMA/ucma: Introduce safer rdma_addr_size() variants</title>
<updated>2018-03-28T22:13:36Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2018-03-28T18:27:22Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=84652aefb347297aa08e91e283adf7b18f77c2d5'/>
<id>urn:sha1:84652aefb347297aa08e91e283adf7b18f77c2d5</id>
<content type='text'>
There are several places in the ucma ABI where userspace can pass in a
sockaddr but set the address family to AF_IB.  When that happens,
rdma_addr_size() will return a size bigger than sizeof struct sockaddr_in6,
and the ucma kernel code might end up copying past the end of a buffer
not sized for a struct sockaddr_ib.

Fix this by introducing new variants

    int rdma_addr_size_in6(struct sockaddr_in6 *addr);
    int rdma_addr_size_kss(struct __kernel_sockaddr_storage *addr);

that are type-safe for the types used in the ucma ABI and return 0 if the
size computed is bigger than the size of the type passed in.  We can use
these new variants to check what size userspace has passed in before
copying any addresses.

Reported-by: &lt;syzbot+6800425d54ed3ed8135d@syzkaller.appspotmail.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/verbs: Remove restrack entry from XRCD structure</title>
<updated>2018-03-19T20:10:30Z</updated>
<author>
<name>Leon Romanovsky</name>
<email>leonro@mellanox.com</email>
</author>
<published>2018-03-19T10:21:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=80cf79ae4f688ead1dca8878990709c0446c3992'/>
<id>urn:sha1:80cf79ae4f688ead1dca8878990709c0446c3992</id>
<content type='text'>
XRCD object is not implemented in the restrack, so lets remove it.

Fixes: 02d8883f520e ("RDMA/restrack: Add general infrastructure to track RDMA resources")
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/uverbs: Use u64_to_user_ptr() not a union</title>
<updated>2018-02-15T21:59:45Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@mellanox.com</email>
</author>
<published>2018-02-13T10:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2f36028ce98ef8e9c04809cc20b9dc498cc1a508'/>
<id>urn:sha1:2f36028ce98ef8e9c04809cc20b9dc498cc1a508</id>
<content type='text'>
The union approach will get the endianness wrong sometimes if the kernel's
pointer size is 32 bits resulting in EFAULTs when trying to copy to/from
user.

Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/uverbs: Always use the attribute size provided by the user</title>
<updated>2018-02-15T21:59:44Z</updated>
<author>
<name>Matan Barak</name>
<email>matanb@mellanox.com</email>
</author>
<published>2018-02-13T10:18:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=89d9e8d3f14d807bbd7725f8f6f5eeb7f6f5c42f'/>
<id>urn:sha1:89d9e8d3f14d807bbd7725f8f6f5eeb7f6f5c42f</id>
<content type='text'>
This fixes several bugs around the copy_to/from user path:
 - copy_to used the user provided size of the attribute
   and could copy data beyond the end of the kernel buffer into
   userspace.
 - copy_from didn't know the size of the kernel buffer and
   could have left kernel memory unexpectedly un-initialized.
 - copy_from did not use the user length to determine if the
   attribute data is inlined or not.

Signed-off-by: Matan Barak &lt;matanb@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/restrack: Remove unimplemented XRCD object</title>
<updated>2018-02-15T21:59:44Z</updated>
<author>
<name>Leon Romanovsky</name>
<email>leonro@mellanox.com</email>
</author>
<published>2018-02-13T10:18:28Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=415bb699d793f7ad9c67c04a766d1e655fa6b203'/>
<id>urn:sha1:415bb699d793f7ad9c67c04a766d1e655fa6b203</id>
<content type='text'>
Resource tracking of XRCD objects is not implemented in current
version of restrack and hence can be removed.

Fixes: 02d8883f520e ("RDMA/restrack: Add general infrastructure to track RDMA resources")
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/core: Map iWarp AH type to undefined in rdma_ah_find_type</title>
<updated>2018-02-01T22:43:31Z</updated>
<author>
<name>Don Hiatt</name>
<email>don.hiatt@intel.com</email>
</author>
<published>2018-02-01T18:57:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=87daac68f77a3e21a1113f816e6a7be0b38bdde8'/>
<id>urn:sha1:87daac68f77a3e21a1113f816e6a7be0b38bdde8</id>
<content type='text'>
iWarp devices do not support the creation of address handles
so return AH_ATTR_TYPE_UNDEFINED for all iWarp devices.

While we are here reduce the size of port_num to u8 and add
a comment.

Fixes: 44c58487d51a ("IB/core: Define 'ib' and 'roce' rdma_ah_attr types")
Reported-by: Parav Pandit &lt;parav@mellanox.com&gt;
CC: Sean Hefty &lt;sean.hefty@intel.com&gt;
Reviewed-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Reviewed-by: Shiraz Saleem &lt;shiraz.saleem@intel.com&gt;
Signed-off-by: Don Hiatt &lt;don.hiatt@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/hfi1: Remove unnecessary fecn and becn fields</title>
<updated>2018-02-01T22:43:29Z</updated>
<author>
<name>Sebastian Sanchez</name>
<email>sebastian.sanchez@intel.com</email>
</author>
<published>2018-02-01T18:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ca85bb1ca9948899682fe7170636e465599ea8e7'/>
<id>urn:sha1:ca85bb1ca9948899682fe7170636e465599ea8e7</id>
<content type='text'>
packet-&gt;fecn and packet-&gt;becn are calculated in the hot path
and are never used. Remove these fields as they show to be
costly in a profile. Also, remove initialization for
becn and fecn in process_ecn() as they're unconditionally
assigned in the function and ensure fecn and becn variables
use a boolean type.

Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Sebastian Sanchez &lt;sebastian.sanchez@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/hfi1: Optimize packet type comparison using 9B and bypass code paths</title>
<updated>2018-02-01T22:43:28Z</updated>
<author>
<name>Sebastian Sanchez</name>
<email>sebastian.sanchez@intel.com</email>
</author>
<published>2018-02-01T18:46:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6d6b8848c882b22e3170cc9f217101773e8bd8d2'/>
<id>urn:sha1:6d6b8848c882b22e3170cc9f217101773e8bd8d2</id>
<content type='text'>
The packet type comparison used to find out if a packet is a bypass
packet in the hot path is an expensive operation as seen in a profile.

Determine packet's pkey and migration bit through the bypass and 9B
code paths instead.

Reviewed-by: Don Hiatt &lt;don.hiatt@intel.com&gt;
Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Sebastian Sanchez &lt;sebastian.sanchez@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>IB/hfi1: Compute BTH only for RDMA_WRITE_LAST/SEND_LAST packet</title>
<updated>2018-02-01T22:43:28Z</updated>
<author>
<name>Sebastian Sanchez</name>
<email>sebastian.sanchez@intel.com</email>
</author>
<published>2018-02-01T18:46:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=f150e2736f346a3171f002e660c3dfc653cc11cd'/>
<id>urn:sha1:f150e2736f346a3171f002e660c3dfc653cc11cd</id>
<content type='text'>
In hfi1_rc_rcv(), BTH is computed for all packets received.
However, it's only used for packets received with opcodes
RDMA_WRITE_LAST and SEND_LAST, and it is a costly operation.

Compute BTH only in the RDMA_WRITE_LAST/SEND_LAST code path
and let the compiler handle endianness conversion for bitwise
operations.

Reviewed-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Sebastian Sanchez &lt;sebastian.sanchez@intel.com&gt;
Signed-off-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>RDMA/restrack: Add general infrastructure to track RDMA resources</title>
<updated>2018-01-30T03:21:39Z</updated>
<author>
<name>Leon Romanovsky</name>
<email>leonro@mellanox.com</email>
</author>
<published>2018-01-28T09:17:20Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=02d8883f520ee91c4c40c0a31892eb25ea2df2c9'/>
<id>urn:sha1:02d8883f520ee91c4c40c0a31892eb25ea2df2c9</id>
<content type='text'>
The RDMA subsystem has very strict set of objects to work with, but it
completely lacks tracking facilities and has no visibility of resource
utilization.

The following patch adds such infrastructure to keep track of RDMA
resources to help with debugging of user space applications. The primary
user of this infrastructure is RDMA nldev netlink (following patches), to
be exposed to userspace via rdmatool, but it is not limited too that.

At this stage, the main three objects (PD, CQ and QP) are added, and more
will be added later.

Reviewed-by: Mark Bloch &lt;markb@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leonro@mellanox.com&gt;
Reviewed-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
</feed>
