<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/ciss, branch stable/10</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>MFC r311305 (by asomers):</title>
<updated>2017-03-23T06:41:13+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2017-03-23T06:41:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=63a2397e28702b82eca0410a0a7db8f60fc51215'/>
<id>63a2397e28702b82eca0410a0a7db8f60fc51215</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 r300551</title>
<updated>2016-07-22T03:21:47+00:00</updated>
<author>
<name>Sean Bruno</name>
<email>sbruno@FreeBSD.org</email>
</author>
<published>2016-07-22T03:21:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1b4f6d7c67b543244d65a40315f03f2f8471a681'/>
<id>1b4f6d7c67b543244d65a40315f03f2f8471a681</id>
<content type='text'>
Update some of the TBD entries in ciss(4) to match what's in the pci
IDS data.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update some of the TBD entries in ciss(4) to match what's in the pci
IDS data.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r298931, r298981, r299375:</title>
<updated>2016-05-17T15:18:01+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-05-17T15:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c1a6abb1b96d93651c6e0b18b1243dfdd5c9b8e5'/>
<id>c1a6abb1b96d93651c6e0b18b1243dfdd5c9b8e5</id>
<content type='text'>
Minor spelling fixes in:
sys/dev, sys/sys

Many of these have user-visible strings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Minor spelling fixes in:
sys/dev, sys/sys

Many of these have user-visible strings.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r298670:</title>
<updated>2016-05-13T09:05:29+00:00</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2016-05-13T09:05:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7d07d547a016a605df40becaabdb8f6c0513971e'/>
<id>7d07d547a016a605df40becaabdb8f6c0513971e</id>
<content type='text'>
r298670 (by cem):

ciss(4): Fix overrun of array

The softc member 'ciss_logical' is an array of 'ciss_max_logical_bus' members.
Most of the time it is iterated correctly.  This patch fixes the two instances
where the driver iterated off the end of the array.

CID:		1305492
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
r298670 (by cem):

ciss(4): Fix overrun of array

The softc member 'ciss_logical' is an array of 'ciss_max_logical_bus' members.
Most of the time it is iterated correctly.  This patch fixes the two instances
where the driver iterated off the end of the array.

CID:		1305492
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r287437</title>
<updated>2015-09-08T17:20:12+00:00</updated>
<author>
<name>Sean Bruno</name>
<email>sbruno@FreeBSD.org</email>
</author>
<published>2015-09-08T17:20:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=81d9d8ec2fab161e7ec51efba8652a48909bbcc5'/>
<id>81d9d8ec2fab161e7ec51efba8652a48909bbcc5</id>
<content type='text'>
r249170 was just plain wrong.  The effect of the change is to always
delete a logic volume on status change which is NOT what we want here.

The original code is correct in that when the volume changes status
the driver will only delete the volume if the status is one of the
fatal errors.  A drive failure in a mirrored volume is NOT a situtation
where the volume should dissapear.

Reported on freebsd-scsi@:
https://lists.freebsd.org/pipermail/freebsd-scsi/2015-September/006800.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
r249170 was just plain wrong.  The effect of the change is to always
delete a logic volume on status change which is NOT what we want here.

The original code is correct in that when the volume changes status
the driver will only delete the volume if the status is one of the
fatal errors.  A drive failure in a mirrored volume is NOT a situtation
where the volume should dissapear.

Reported on freebsd-scsi@:
https://lists.freebsd.org/pipermail/freebsd-scsi/2015-September/006800.html
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r280347: Remove MAXBSIZE use from drivers where it has nothing to do.</title>
<updated>2015-04-21T11:27:50+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2015-04-21T11:27:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2fb2f78d1822d940204c90ed29b4834443cd3cb1'/>
<id>2fb2f78d1822d940204c90ed29b4834443cd3cb1</id>
<content type='text'>
In some cases limits are just not needed, in others -- DFLTPHYS is the
right constant to use instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some cases limits are just not needed, in others -- DFLTPHYS is the
right constant to use instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r274819:</title>
<updated>2014-12-21T03:06:11+00:00</updated>
<author>
<name>Steven Hartland</name>
<email>smh@FreeBSD.org</email>
</author>
<published>2014-12-21T03:06:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=117c93e53f1784aedab7d9942d1fb8e00c8b1618'/>
<id>117c93e53f1784aedab7d9942d1fb8e00c8b1618</id>
<content type='text'>
Prevent overflow issues in timeout processing

MFC r274852:
Fix build with asr driver

Sponsored by:	Multiplay
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent overflow issues in timeout processing

MFC r274852:
Fix build with asr driver

Sponsored by:	Multiplay
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r268017 and r268018</title>
<updated>2014-07-21T20:08:53+00:00</updated>
<author>
<name>Sean Bruno</name>
<email>sbruno@FreeBSD.org</email>
</author>
<published>2014-07-21T20:08:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8fc6a8d962bc7f58a4aea5ce0afe5a1bdc20c269'/>
<id>8fc6a8d962bc7f58a4aea5ce0afe5a1bdc20c269</id>
<content type='text'>
268017:
Check return of cam_periph_find() before using it in a printf.

268018:
Add detection for ciss(4)  controllers that are set to non-raid JBOD mode.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
268017:
Check return of cam_periph_find() before using it in a printf.

268018:
Add detection for ciss(4)  controllers that are set to non-raid JBOD mode.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r264127</title>
<updated>2014-04-21T16:54:38+00:00</updated>
<author>
<name>Sean Bruno</name>
<email>sbruno@FreeBSD.org</email>
</author>
<published>2014-04-21T16:54:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9a4ec519bbd3d4ef265b572b0bd52f1da191a0a8'/>
<id>9a4ec519bbd3d4ef265b572b0bd52f1da191a0a8</id>
<content type='text'>
Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)

Submitted by:	Benesh, Scott &lt;scott.benesh@hp.com&gt;
Sponsored by:	Yahoo! Inc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)

Submitted by:	Benesh, Scott &lt;scott.benesh@hp.com&gt;
Sponsored by:	Yahoo! Inc.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r264354</title>
<updated>2014-04-15T17:49:47+00:00</updated>
<author>
<name>Sean Bruno</name>
<email>sbruno@FreeBSD.org</email>
</author>
<published>2014-04-15T17:49:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a0039c823f0141e69c7d6ec2a4c78b29a392042c'/>
<id>a0039c823f0141e69c7d6ec2a4c78b29a392042c</id>
<content type='text'>
Fix insta-panic on assert of unlocked periph mtx in ciss(4) when
logical volume state changes.

Sponsored by:	Yahoo! Inc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix insta-panic on assert of unlocked periph mtx in ciss(4) when
logical volume state changes.

Sponsored by:	Yahoo! Inc.
</pre>
</div>
</content>
</entry>
</feed>
