<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/tools/spi, branch linux-4.8.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>spi: spidev_test: fix build with musl libc</title>
<updated>2016-11-21T09:11:37+00:00</updated>
<author>
<name>Baruch Siach</name>
<email>baruch@tkos.co.il</email>
</author>
<published>2016-08-12T13:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=da6fe239ceffd8bbe1463c361283f0c4c756c983'/>
<id>da6fe239ceffd8bbe1463c361283f0c4c756c983</id>
<content type='text'>
commit 8736f8022e532a3c1d8873aac78e1113c6ffc3b9 upstream.

spidev.h uses _IOC_SIZEBITS directly. musl libc does not provide this macro
unless linux/ioctl.h is included explicitly. Fixes build failures like:

In file included from .../host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/sys/ioctl.h:7:0,
                 from .../build/spidev_test-v3.15/spidev_test.c:20:
.../build/spidev_test-v3.15/spidev_test.c: In function ‘transfer’:
.../build/spidev_test-v3.15/spidev_test.c:75:18: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function)
  ret = ioctl(fd, SPI_IOC_MESSAGE(1), &amp;tr);
                  ^

Signed-off-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Ralph Sennhauser &lt;ralph.sennhauser@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8736f8022e532a3c1d8873aac78e1113c6ffc3b9 upstream.

spidev.h uses _IOC_SIZEBITS directly. musl libc does not provide this macro
unless linux/ioctl.h is included explicitly. Fixes build failures like:

In file included from .../host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/sys/ioctl.h:7:0,
                 from .../build/spidev_test-v3.15/spidev_test.c:20:
.../build/spidev_test-v3.15/spidev_test.c: In function ‘transfer’:
.../build/spidev_test-v3.15/spidev_test.c:75:18: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function)
  ret = ioctl(fd, SPI_IOC_MESSAGE(1), &amp;tr);
                  ^

Signed-off-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Ralph Sennhauser &lt;ralph.sennhauser@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spidev_test: Fix buffer overflow in unescape()</title>
<updated>2016-10-28T07:45:18+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2016-09-09T07:02:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=19db6eeffcb6784a24374e410c64188a21455ec2'/>
<id>19db6eeffcb6784a24374e410c64188a21455ec2</id>
<content type='text'>
commit 0278b34bf15f8d8a609595b15909cd8622dd64ca upstream.

Sometimes spidev_test crashes with:

    *** Error in `spidev_test': munmap_chunk(): invalid pointer: 0x00022020 ***
    Aborted

or just

    Segmentation fault

This is due to transfer_escaped_string() miscalculating the required
size of the buffer by one byte, causing a buffer overflow in unescape().

Drop the bogus "+ 1" in the strlen() parameter to fix this.

Note that unescape() never copies the zero-terminator of the source
string, so it writes at most as many bytes as the length of the source
string.

Fixes: 30061915be6e3a2c (spi: spidev_test: Added input buffer from the terminal)
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0278b34bf15f8d8a609595b15909cd8622dd64ca upstream.

Sometimes spidev_test crashes with:

    *** Error in `spidev_test': munmap_chunk(): invalid pointer: 0x00022020 ***
    Aborted

or just

    Segmentation fault

This is due to transfer_escaped_string() miscalculating the required
size of the buffer by one byte, causing a buffer overflow in unescape().

Drop the bogus "+ 1" in the strlen() parameter to fix this.

Note that unescape() never copies the zero-terminator of the source
string, so it writes at most as many bytes as the length of the source
string.

Fixes: 30061915be6e3a2c (spi: spidev_test: Added input buffer from the terminal)
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spidev_test: Fix typo in error message</title>
<updated>2015-12-08T17:58:56+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@freescale.com</email>
</author>
<published>2015-12-04T12:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=edd3899c8cd2a7f11d23686e375359f8ab1f818a'/>
<id>edd3899c8cd2a7f11d23686e375359f8ab1f818a</id>
<content type='text'>
Fix the spelling of 'output' in the error message.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the spelling of 'output' in the error message.

Signed-off-by: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: tools: move spidev_test metadata</title>
<updated>2015-11-30T12:14:12+00:00</updated>
<author>
<name>Joshua Clayton</name>
<email>stillcompiling@gmail.com</email>
</author>
<published>2015-11-28T21:28:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=de2c6e58554c7df3db70c68e52f982e558895ecf'/>
<id>de2c6e58554c7df3db70c68e52f982e558895ecf</id>
<content type='text'>
Now that spidev_test and spidev_fdx have been moved, remove them
from the Documentation index and move their .gitignore file.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that spidev_test and spidev_fdx have been moved, remove them
from the Documentation index and move their .gitignore file.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spidev_test: fix whitespace</title>
<updated>2015-11-23T14:54:01+00:00</updated>
<author>
<name>Joshua Clayton</name>
<email>stillcompiling@gmail.com</email>
</author>
<published>2015-11-18T22:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b2cfc90428f1c24ce4920f06b584bd05c62741e6'/>
<id>b2cfc90428f1c24ce4920f06b584bd05c62741e6</id>
<content type='text'>
Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spidev_test: check error</title>
<updated>2015-11-23T14:54:01+00:00</updated>
<author>
<name>Joshua Clayton</name>
<email>stillcompiling@gmail.com</email>
</author>
<published>2015-11-18T22:30:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a20874f78be633b9e3a505d5f191735188b110a5'/>
<id>a20874f78be633b9e3a505d5f191735188b110a5</id>
<content type='text'>
Check the result of sscanf to verify a result was found.
report and error and abort if pattern was not found.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check the result of sscanf to verify a result was found.
report and error and abort if pattern was not found.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spidev_test: output to a file</title>
<updated>2015-11-23T14:54:01+00:00</updated>
<author>
<name>Joshua Clayton</name>
<email>stillcompiling@gmail.com</email>
</author>
<published>2015-11-18T22:30:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=983b27886a3c7f6eff4e987ddba932da74703f4e'/>
<id>983b27886a3c7f6eff4e987ddba932da74703f4e</id>
<content type='text'>
For testing of larger data transfers, output unmodified data
directly to a file.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For testing of larger data transfers, output unmodified data
directly to a file.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spidev_test: accept input from a file</title>
<updated>2015-11-23T14:54:01+00:00</updated>
<author>
<name>Joshua Clayton</name>
<email>stillcompiling@gmail.com</email>
</author>
<published>2015-11-18T22:30:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7af475a5b55e8e47327818e8133fe22204c1fc4d'/>
<id>7af475a5b55e8e47327818e8133fe22204c1fc4d</id>
<content type='text'>
Add input file support to facilitate testing larger data.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add input file support to facilitate testing larger data.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spidev_test: transfer_escaped_string function</title>
<updated>2015-11-23T14:54:01+00:00</updated>
<author>
<name>Joshua Clayton</name>
<email>stillcompiling@gmail.com</email>
</author>
<published>2015-11-18T22:30:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5c437a401b824399b6fa7342c66b675ebb7af43e'/>
<id>5c437a401b824399b6fa7342c66b675ebb7af43e</id>
<content type='text'>
Move the input_tx code into its own small function.
This cleans up some variables from main() that are used only here.
While we are at it, check malloc calls instead of assuming they succeed.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the input_tx code into its own small function.
This cleans up some variables from main() that are used only here.
While we are at it, check malloc calls instead of assuming they succeed.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: Move spi code from Documentation to tools</title>
<updated>2015-11-23T14:54:01+00:00</updated>
<author>
<name>Joshua Clayton</name>
<email>stillcompiling@gmail.com</email>
</author>
<published>2015-11-18T22:30:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5eca4d843f9f0c3140a8657ba2f8217ee6c08c11'/>
<id>5eca4d843f9f0c3140a8657ba2f8217ee6c08c11</id>
<content type='text'>
Jon Corbet requested this code moved with the last changeset,
https://lkml.org/lkml/2015/3/1/144,
but the patch was not applied because it missed the Makefile.
Moved spidev_test, spidev_fdx and their Makefile infrastructure.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Jon Corbet requested this code moved with the last changeset,
https://lkml.org/lkml/2015/3/1/144,
but the patch was not applied because it missed the Makefile.
Moved spidev_test, spidev_fdx and their Makefile infrastructure.

Signed-off-by: Joshua Clayton &lt;stillcompiling@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
