<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/firewire, branch upstream/11.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>MFC r314864: firewire/sbp: try to improve locking, plus a few style nits</title>
<updated>2017-03-23T07:56:07+00:00</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2017-03-23T07:56:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e5c2fb49849f466d5af30fc444af51cff36ee3b6'/>
<id>e5c2fb49849f466d5af30fc444af51cff36ee3b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r311305 (by asomers):</title>
<updated>2017-03-23T06:40:20+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2017-03-23T06:40:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6352900b3df2d8e5409dbf52d6b3d6c494817605'/>
<id>6352900b3df2d8e5409dbf52d6b3d6c494817605</id>
<content type='text'>
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)

The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are
fixed-length strings. AFAICT the only place they're read is in
sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.
However, the kernel doesn't null-terminate them. A bunch of copy-pasted code
uses strncpy to write them, and doesn't guarantee null-termination. For at
least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually
overflows. You can see the result by doing "camcontrol negotiate da0 -v".

This change null-terminates those fields everywhere they're set in the
kernel. It also shortens a few strings to ensure they'll fit within the
16-character field.

PR:		215474
Reported by:    Coverity
CID:            1009997 1010000 1010001 1010002 1010003 1010004 1010005
CID:            1331519 1010006 1215097 1010007 1288967 1010008 1306000
CID:            1211924 1010009 1010010 1010011 1010012 1010013 1010014
CID:            1147190 1010017 1010016 1010018 1216435 1010020 1010021
CID:            1010022 1009666 1018185 1010023 1010025 1010026 1010027
CID:            1010028 1010029 1010030 1010031 1010033 1018186 1018187
CID:            1010035 1010036 1010042 1010041 1010040 1010039
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)

The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are
fixed-length strings. AFAICT the only place they're read is in
sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.
However, the kernel doesn't null-terminate them. A bunch of copy-pasted code
uses strncpy to write them, and doesn't guarantee null-termination. For at
least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually
overflows. You can see the result by doing "camcontrol negotiate da0 -v".

This change null-terminates those fields everywhere they're set in the
kernel. It also shortens a few strings to ensure they'll fit within the
16-character field.

PR:		215474
Reported by:    Coverity
CID:            1009997 1010000 1010001 1010002 1010003 1010004 1010005
CID:            1331519 1010006 1215097 1010007 1288967 1010008 1306000
CID:            1211924 1010009 1010010 1010011 1010012 1010013 1010014
CID:            1147190 1010017 1010016 1010018 1216435 1010020 1010021
CID:            1010022 1009666 1018185 1010023 1010025 1010026 1010027
CID:            1010028 1010029 1010030 1010031 1010033 1018186 1018187
CID:            1010035 1010036 1010042 1010041 1010040 1010039
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r314375: Remove some locking not needed for modern CAM.</title>
<updated>2017-03-14T07:06:05+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2017-03-14T07:06:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=55284fee1c088f41583d522d74fbbe0bb5b0134b'/>
<id>55284fee1c088f41583d522d74fbbe0bb5b0134b</id>
<content type='text'>
This driver is full of LORs.  This change allows to reduce deadlock chance
from 100% to level that allows some tests to be done.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This driver is full of LORs.  This change allows to reduce deadlock chance
from 100% to level that allows some tests to be done.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r313982, r314068:</title>
<updated>2017-03-14T02:06:03+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-03-14T02:06:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bd0faecc931277934a72772a410ede5663969cdb'/>
<id>bd0faecc931277934a72772a410ede5663969cdb</id>
<content type='text'>
sys: Replace zero with NULL for pointers.

Found with:	devel/coccinelle
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sys: Replace zero with NULL for pointers.

Found with:	devel/coccinelle
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r314374: Add safety check against too long CDB.</title>
<updated>2017-03-07T05:56:48+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2017-03-07T05:56:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=025d0b3dbe1e26528d7107e5737f80e9b08cb1a2'/>
<id>025d0b3dbe1e26528d7107e5737f80e9b08cb1a2</id>
<content type='text'>
SBP-2 specification defined maximum CDB length as 12 bytes.  Newer SBP-3
specification allows CDB of any size, but this driver is too old.  Proper
solution would be to look on maximal ORB size supported by the target.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SBP-2 specification defined maximum CDB length as 12 bytes.  Newer SBP-3
specification allows CDB of any size, but this driver is too old.  Proper
solution would be to look on maximal ORB size supported by the target.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r314358: Announce that sbp_targ(4) does not support initiator mode.</title>
<updated>2017-03-06T06:08:17+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2017-03-06T06:08:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5197eb237437ffe27c2fe7793cdd2d6f50927270'/>
<id>5197eb237437ffe27c2fe7793cdd2d6f50927270</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r309093: firewire: initialize tag label to -1 in fw_xfer_alloc()</title>
<updated>2016-12-14T16:43:04+00:00</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2016-12-14T16:43:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=25eb52814726aba49f5092b80b563d6e5f555b2c'/>
<id>25eb52814726aba49f5092b80b563d6e5f555b2c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r309092: fwohci: report whether PhysicalUpperBound register is implemented</title>
<updated>2016-12-14T16:30:47+00:00</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2016-12-14T16:30:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cb8b62149f044cab15a721d4c12441fdf7b6cd0a'/>
<id>cb8b62149f044cab15a721d4c12441fdf7b6cd0a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove NULL checks after M_WAITOK allocations from firewire.</title>
<updated>2016-05-10T10:21:03+00:00</updated>
<author>
<name>Edward Tomasz Napierala</name>
<email>trasz@FreeBSD.org</email>
</author>
<published>2016-05-10T10:21:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=256a4cb9d72ef8d36489447d2543a3a73a6fad68'/>
<id>256a4cb9d72ef8d36489447d2543a3a73a6fad68</id>
<content type='text'>
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/dev: minor spelling fixes.</title>
<updated>2016-05-03T03:41:25+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-05-03T03:41:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=453130d9bfc1c6d68b366dfcb041689d69f81295'/>
<id>453130d9bfc1c6d68b366dfcb041689d69f81295</id>
<content type='text'>
Most affect comments, very few have user-visible effects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most affect comments, very few have user-visible effects.
</pre>
</div>
</content>
</entry>
</feed>
