<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/block/sed-opal.c, branch v4.11</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>block/sed: Fix opal user range check and unused variables</title>
<updated>2017-03-08T16:56:12+00:00</updated>
<author>
<name>Jon Derrick</name>
<email>jonathan.derrick@intel.com</email>
</author>
<published>2017-03-06T15:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b0bfdfc2bf7fa85317824c6a389fc373dfcef5bc'/>
<id>b0bfdfc2bf7fa85317824c6a389fc373dfcef5bc</id>
<content type='text'>
Fixes check that the opal user is within the range, and cleans up unused
method variables.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes check that the opal user is within the range, and cleans up unused
method variables.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block/sed-opal: Propagate original error message to userland.</title>
<updated>2017-02-23T18:55:44+00:00</updated>
<author>
<name>Scott Bauer</name>
<email>scott.bauer@intel.com</email>
</author>
<published>2017-02-22T17:15:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d19020b085eaf61d24377db27e8630cd9cff7ce'/>
<id>2d19020b085eaf61d24377db27e8630cd9cff7ce</id>
<content type='text'>
During an error on a comannd, ex: user provides wrong pw to unlock
range, we will gracefully terminate the opal session. We want to
propagate the original error to userland instead of the result of
the session termination, which is almost always a success.

Signed-off-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During an error on a comannd, ex: user provides wrong pw to unlock
range, we will gracefully terminate the opal session. We want to
propagate the original error to userland instead of the result of
the session termination, which is almost always a success.

Signed-off-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block/sed-opal: Introduce free_opal_dev to free the structure and clean up state</title>
<updated>2017-02-23T18:55:41+00:00</updated>
<author>
<name>Scott Bauer</name>
<email>scott.bauer@intel.com</email>
</author>
<published>2017-02-22T17:15:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d6d15789d69856f1c5405e106a773c87277eb8c'/>
<id>7d6d15789d69856f1c5405e106a773c87277eb8c</id>
<content type='text'>
Before we free the opal structure we need to clean up any saved
locking ranges that the user had told us to unlock from a suspend.

Signed-off-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before we free the opal structure we need to clean up any saved
locking ranges that the user had told us to unlock from a suspend.

Signed-off-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block/sed: Embed function data into the function sequence</title>
<updated>2017-02-22T18:54:49+00:00</updated>
<author>
<name>Jon Derrick</name>
<email>jonathan.derrick@intel.com</email>
</author>
<published>2017-02-22T14:55:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eed64951f15d63beac75e0f848ac03c14f8a4a6c'/>
<id>eed64951f15d63beac75e0f848ac03c14f8a4a6c</id>
<content type='text'>
By embedding the function data with the function sequence, we can
eliminate the external function data and state variable code. It also
made obvious some other small cleanups.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By embedding the function data with the function sequence, we can
eliminate the external function data and state variable code. It also
made obvious some other small cleanups.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block/sed: Check received header lengths</title>
<updated>2017-02-22T18:54:49+00:00</updated>
<author>
<name>Jon Derrick</name>
<email>jonathan.derrick@intel.com</email>
</author>
<published>2017-02-21T18:59:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=77039b96316d119cea23f48b617103d50e78b840'/>
<id>77039b96316d119cea23f48b617103d50e78b840</id>
<content type='text'>
Add a buffer size check against discovery and response header lengths
before we loop over their buffers.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a buffer size check against discovery and response header lengths
before we loop over their buffers.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block/sed: Add helper to qualify response tokens</title>
<updated>2017-02-22T18:54:49+00:00</updated>
<author>
<name>Jon Derrick</name>
<email>jonathan.derrick@intel.com</email>
</author>
<published>2017-02-21T18:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cccb92417d447172c4653876f6cd4b04c29d7905'/>
<id>cccb92417d447172c4653876f6cd4b04c29d7905</id>
<content type='text'>
Add helper which verifies the response token is valid and matches the
expected value. Merges token_type and response_get_token.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add helper which verifies the response token is valid and matches the
expected value. Merges token_type and response_get_token.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block/sed: Use ssize_t on atom parsers to return errors</title>
<updated>2017-02-22T18:54:49+00:00</updated>
<author>
<name>Jon Derrick</name>
<email>jonathan.derrick@intel.com</email>
</author>
<published>2017-02-21T18:59:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aedb6e2411baf242fd0faf95bd3ff0dc62ee1fa5'/>
<id>aedb6e2411baf242fd0faf95bd3ff0dc62ee1fa5</id>
<content type='text'>
The short atom parser can return an errno from decoding but does not
currently return the error as a signed value. Convert all of the parsers
to ssize_t.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The short atom parser can return an errno from decoding but does not
currently return the error as a signed value. Convert all of the parsers
to ssize_t.

Signed-off-by: Jon Derrick &lt;jonathan.derrick@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block/sed-opal: allocate struct opal_dev dynamically</title>
<updated>2017-02-17T19:41:47+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-02-17T12:59:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f1244c8298606b8fae64b4d78b820ae6b896e3c'/>
<id>4f1244c8298606b8fae64b4d78b820ae6b896e3c</id>
<content type='text'>
Insted of bloating the containing structure with it all the time this
allocates struct opal_dev dynamically.  Additionally this allows moving
the definition of struct opal_dev into sed-opal.c.  For this a new
private data field is added to it that is passed to the send/receive
callback.  After that a lot of internals can be made private as well.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Insted of bloating the containing structure with it all the time this
allocates struct opal_dev dynamically.  Additionally this allows moving
the definition of struct opal_dev into sed-opal.c.  For this a new
private data field is added to it that is passed to the send/receive
callback.  After that a lot of internals can be made private as well.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block/sed-opal: tone down not supported warnings</title>
<updated>2017-02-17T19:41:44+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2017-02-17T12:59:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f5b37b7c23915af93081a8711e0a0f0219063756'/>
<id>f5b37b7c23915af93081a8711e0a0f0219063756</id>
<content type='text'>
Not having OPAL or a sub-feature supported is an entirely normal
condition for many drives, so don't warn about it.  Keep the messages,
but tone them down to debug only.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not having OPAL or a sub-feature supported is an entirely normal
condition for many drives, so don't warn about it.  Keep the messages,
but tone them down to debug only.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN</title>
<updated>2017-02-15T02:47:18+00:00</updated>
<author>
<name>Scott Bauer</name>
<email>scott.bauer@intel.com</email>
</author>
<published>2017-02-15T00:29:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e225c20eb0fd0b6657e640408f11ee392dc82b5b'/>
<id>e225c20eb0fd0b6657e640408f11ee392dc82b5b</id>
<content type='text'>
When CONFIG_KASAN is enabled, compilation fails:

block/sed-opal.c: In function 'sed_ioctl':
block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Moved all the ioctl structures off the stack and dynamically allocate
using _IOC_SIZE()

Fixes: 455a7b238cd6 ("block: Add Sed-opal library")

Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When CONFIG_KASAN is enabled, compilation fails:

block/sed-opal.c: In function 'sed_ioctl':
block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Moved all the ioctl structures off the stack and dynamically allocate
using _IOC_SIZE()

Fixes: 455a7b238cd6 ("block: Add Sed-opal library")

Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
