<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/test_firmware.c, branch v4.11</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2017-01-25T10:52:34Z</updated>
<entry>
<title>test_firmware: add test custom fallback trigger</title>
<updated>2017-01-25T10:52:34Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2017-01-23T16:11:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=061132d2b9c9504a9f314dcd73f6483a7d8cd1e8'/>
<id>urn:sha1:061132d2b9c9504a9f314dcd73f6483a7d8cd1e8</id>
<content type='text'>
We have no custom fallback mechanism test interface. Provide one.
This tests both the custom fallback mechanism and cancelling the
it.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test_firmware: use device attribute groups</title>
<updated>2017-01-25T10:52:34Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2017-01-23T16:11:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=083a93b0c1f2eff2561305d0b95ac238fbfd100b'/>
<id>urn:sha1:083a93b0c1f2eff2561305d0b95ac238fbfd100b</id>
<content type='text'>
This simplifies init and exit.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test_firmware: move misc_device down</title>
<updated>2017-01-25T10:52:34Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@kernel.org</email>
</author>
<published>2017-01-23T16:11:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=67fd553ce0e55a468ee24f61ddf6b40ba610bbb5'/>
<id>urn:sha1:67fd553ce0e55a468ee24f61ddf6b40ba610bbb5</id>
<content type='text'>
This will make further changes easier to review.

Signed-off-by: Luis R. Rodriguez &lt;mcgrof@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>test: firmware_class: add asynchronous request trigger</title>
<updated>2016-01-07T20:44:22Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-09T22:50:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb910947c82f93cee6ee00a59a4ed86f12cf6e7f'/>
<id>urn:sha1:eb910947c82f93cee6ee00a59a4ed86f12cf6e7f</id>
<content type='text'>
We might want to test for bugs like that found in commit f9692b2699bd
("firmware: fix possible use after free on name on asynchronous
request"), where the asynchronous request API had race conditions.

Let's add a simple file that will launch the async request, then wait
until it's complete and report the status. It's not a true async test
(we're using a mutex + wait_for_completion(), so we can't get more than
one going at the same time), but it does help make sure the basic API is
sane, and it can catch some class of bugs.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Luis R. Rodriguez &lt;mcgrof@suse.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>test: firmware_class: use kstrndup() where appropriate</title>
<updated>2016-01-07T20:43:28Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-09T22:50:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be4a1326d12cce8df1f57017bf4112eaab437a38'/>
<id>urn:sha1:be4a1326d12cce8df1f57017bf4112eaab437a38</id>
<content type='text'>
We're essentially just doing an open-coded kstrndup(). The only
differences are with what happens after the first '\0' character, but
request_firmware() doesn't care about that.

Suggested-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>test: firmware_class: report errors properly on failure</title>
<updated>2016-01-07T20:41:22Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-12-09T22:50:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47e0bbb7fa985a0f1b5794a8653fae4f8f49de77'/>
<id>urn:sha1:47e0bbb7fa985a0f1b5794a8653fae4f8f49de77</id>
<content type='text'>
request_firmware() failures currently won't get reported at all (the
error code is discarded). What's more, we get confusing messages, like:

    # echo -n notafile &gt; /sys/devices/virtual/misc/test_firmware/trigger_request
    [ 8280.311856] test_firmware: loading 'notafile'
    [ 8280.317042] test_firmware: load of 'notafile' failed: -2
    [ 8280.322445] test_firmware: loaded: 0
    # echo $?
    0

Report the failures via write() errors, and don't say we "loaded"
anything.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>test: add firmware_class loader test</title>
<updated>2014-07-18T01:44:19Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2014-07-14T21:38:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a8adf584759cbcbce5d88d419db01a8d0373abf'/>
<id>urn:sha1:0a8adf584759cbcbce5d88d419db01a8d0373abf</id>
<content type='text'>
This provides a simple interface to trigger the firmware_class loader
to test built-in, filesystem, and user helper modes. Additionally adds
tests via the new interface to the selftests tree.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
