<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/nvme/target/core.c, branch linux-5.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-02-24T07:38:48Z</updated>
<entry>
<title>nvmet: fix dsm failure when payload does not match sgl descriptor</title>
<updated>2020-02-24T07:38:48Z</updated>
<author>
<name>Sagi Grimberg</name>
</author>
<published>2020-01-27T07:23:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5068f9ec5356d2c637986e3007d9bd9a22eebd04'/>
<id>urn:sha1:5068f9ec5356d2c637986e3007d9bd9a22eebd04</id>
<content type='text'>
[ Upstream commit b716e6889c95f64ba32af492461f6cc9341f3f05 ]

The host is allowed to pass the controller an sgl describing a buffer
that is larger than the dsm payload itself, allow it when executing
dsm.

Reported-by: Dakshaja Uppalapati &lt;dakshaja@chelsio.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;,
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvmet: Pass lockdep expression to RCU lists</title>
<updated>2020-02-24T07:38:48Z</updated>
<author>
<name>Amol Grover</name>
</author>
<published>2020-01-11T07:38:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c817cec3a34f0900a11a421779f37100c6e01ea'/>
<id>urn:sha1:5c817cec3a34f0900a11a421779f37100c6e01ea</id>
<content type='text'>
[ Upstream commit 4ac76436a6d07dec1c3c766f234aa787a16e8f65 ]

ctrl-&gt;subsys-&gt;namespaces and subsys-&gt;namespaces are traversed with
list_for_each_entry_rcu outside an RCU read-side critical section but
under the protection of ctrl-&gt;subsys-&gt;lock and subsys-&gt;lock respectively.

Hence, add the corresponding lockdep expression to the list traversal
primitive to silence false-positive lockdep warnings, and harden RCU
lists.

Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Signed-off-by: Amol Grover &lt;frextrite@gmail.com&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvmet: clean up command parsing a bit</title>
<updated>2019-11-04T17:56:42Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2019-10-25T13:38:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d84dd8cde6742054a2c802df841fa5aab5b99122'/>
<id>urn:sha1:d84dd8cde6742054a2c802df841fa5aab5b99122</id>
<content type='text'>
Move the special cases for fabrics commands and the discovery controller
to nvmet_parse_admin_cmd in preparation for adding passthrough support.

Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet: Open code nvmet_req_execute()</title>
<updated>2019-11-04T17:56:42Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2019-10-23T16:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be3f3114ddd58d12f64b872247bb1bc46df56b36'/>
<id>urn:sha1:be3f3114ddd58d12f64b872247bb1bc46df56b36</id>
<content type='text'>
Now that nvmet_req_execute does nothing, open code it.

Reviewed-by: Chaitanya Kulkarni &lt;chaitanya.kulkarni@wdc.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
[split patch, update changelog]
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet: Remove the data_len field from the nvmet_req struct</title>
<updated>2019-11-04T17:56:42Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2019-10-23T16:35:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9061c397839eea34207668bfedce0a6c18c5015'/>
<id>urn:sha1:e9061c397839eea34207668bfedce0a6c18c5015</id>
<content type='text'>
Instead of storing the expected length and checking it when it's
executed, just check the length inside the command themselves.

A new helper, nvmet_check_data_len() is created to help with this
check.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
[split patch, udpate changelog]
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet: add unlikely check at nvmet_req_alloc_sgl</title>
<updated>2019-11-04T17:56:40Z</updated>
<author>
<name>Israel Rukshin</name>
</author>
<published>2019-10-13T16:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e522f446027845e3c8b563d021f37e8f3d30c9d9'/>
<id>urn:sha1:e522f446027845e3c8b563d021f37e8f3d30c9d9</id>
<content type='text'>
The call to sgl_alloc shouldn't fail so add this simple optimization to
the fast path.

Signed-off-by: Israel Rukshin &lt;israelr@mellanox.com&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvmet-file: fix nvmet_file_flush() always returning an error</title>
<updated>2019-08-01T00:57:21Z</updated>
<author>
<name>Logan Gunthorpe</name>
</author>
<published>2019-07-31T23:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cfc1a1af56200362d1508b82b9a3cc3acb2eae0c'/>
<id>urn:sha1:cfc1a1af56200362d1508b82b9a3cc3acb2eae0c</id>
<content type='text'>
Presently, nvmet_file_flush() always returns a call to
errno_to_nvme_status() but that helper doesn't take into account the
case when errno=0. So nvmet_file_flush() always returns an error code.

All other callers of errno_to_nvme_status() check for success before
calling it.

To fix this, ensure errno_to_nvme_status() returns success if the
errno is zero. This should prevent future mistakes like this from
happening.

Fixes: c6aa3542e010 ("nvmet: add error log support for file backend")
Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: Chaitanya Kulkarni &lt;chaitanya.kulkarni@wdc.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvmet: Fix use-after-free bug when a port is removed</title>
<updated>2019-08-01T00:57:06Z</updated>
<author>
<name>Logan Gunthorpe</name>
</author>
<published>2019-07-31T23:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3aed86731ee2b23e4dc4d2c6d943d33992cd551b'/>
<id>urn:sha1:3aed86731ee2b23e4dc4d2c6d943d33992cd551b</id>
<content type='text'>
When a port is removed through configfs, any connected controllers
are still active and can still send commands. This causes a
use-after-free bug which is detected by KASAN for any admin command
that dereferences req-&gt;port (like in nvmet_execute_identify_ctrl).

To fix this, disconnect all active controllers when a subsystem is
removed from a port. This ensures there are no active controllers
when the port is eventually removed.

Signed-off-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: Max Gurtovoy &lt;maxg@mellanox.com&gt;
Reviewed-by : Chaitanya Kulkarni &lt;chaitanya.kulkarni@wdc.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvmet: introduce target-side trace</title>
<updated>2019-06-21T09:15:46Z</updated>
<author>
<name>Minwoo Im</name>
</author>
<published>2019-06-12T12:45:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5448fdc469d67da99728a132229aba5fce8f67a'/>
<id>urn:sha1:a5448fdc469d67da99728a132229aba5fce8f67a</id>
<content type='text'>
This patch introduces target-side request tracing.  As Christoph
suggested, the trace would not be in a core or module to avoid
disadvantages like cache miss:
  http://lists.infradead.org/pipermail/linux-nvme/2019-June/024721.html

The target-side trace code is entirely based on the Johannes's trace code
from the host side.  It has lots of codes duplicated, but it would be
better than having advantages mentioned above.

It also traces not only fabrics commands, but also nvme normal commands.
Once the codes to be shared gets bigger, then we can make it common as
suggsted.

This also removed the create_sq and create_cq trace parsing functions
because it will be done by the connect fabrics command.

Example:
  echo 1 &gt; /sys/kernel/debug/tracing/event/nvmet/nvmet_req_init/enable
  echo 1 &gt; /sys/kernel/debug/tracing/event/nvmet/nvmet_req_complete/enable
  cat /sys/kernel/debug/tracing/trace

Signed-off-by: Minwoo Im &lt;minwoo.im.dev@gmail.com&gt;
[hch: fixed the symbol namespace and a an endianess conversion]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme: introduce nvme_is_fabrics to check fabrics cmd</title>
<updated>2019-06-21T09:08:38Z</updated>
<author>
<name>Minwoo Im</name>
</author>
<published>2019-06-06T05:30:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a1f46e3f75cff5042dfa1bb80c9929a0e412abc'/>
<id>urn:sha1:7a1f46e3f75cff5042dfa1bb80c9929a0e412abc</id>
<content type='text'>
This patch introduces a nvme_is_fabrics() inline function to check
whether or not the given command structure is for fabrics.

Signed-off-by: Minwoo Im &lt;minwoo.im.dev@gmail.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
