<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/message/fusion/mptctl.c, branch v5.0.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.0.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.0.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-07-31T03:17:53+00:00</updated>
<entry>
<title>scsi: mptctl: change strncpy+truncation to strlcpy</title>
<updated>2018-07-31T03:17:53+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2018-07-13T01:25:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7bd1d615a57f3356f41b0079a3fb9ee77ae00a82'/>
<id>urn:sha1:7bd1d615a57f3356f41b0079a3fb9ee77ae00a82</id>
<content type='text'>
Generated by scripts/coccinelle/misc/strncpy_truncation.cocci

Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo()</title>
<updated>2018-01-31T02:32:06+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-01-25T14:27:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a7043e9529f3c367cc4d82997e00be034cbe57ca'/>
<id>urn:sha1:a7043e9529f3c367cc4d82997e00be034cbe57ca</id>
<content type='text'>
My static checker complains about an out of bounds read:

    drivers/message/fusion/mptctl.c:2786 mptctl_hp_targetinfo()
    error: buffer overflow 'hd-&gt;sel_timeout' 255 &lt;= u32max.

It's true that we probably should have a bounds check here.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mptfusion: Use snprintf() instead of open coded divisions</title>
<updated>2018-01-17T06:12:20+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2018-01-15T17:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=332b4b2a6f380e07ccdd72da7f42f11f6b333784'/>
<id>urn:sha1:332b4b2a6f380e07ccdd72da7f42f11f6b333784</id>
<content type='text'>
Numbers up to 100 snprintf() prints without using a division.  Besides
that the code looks more readable.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2016-12-24T19:46:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba'/>
<id>urn:sha1:7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mptfusion: don't allow negative bytes in kbuf_alloc_2_sgl()</title>
<updated>2015-11-12T01:58:06+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-11-10T22:15:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=491212014ec3ab6c477e7368405c5ae028b05ceb'/>
<id>urn:sha1:491212014ec3ab6c477e7368405c5ae028b05ceb</id>
<content type='text'>
There is a static checker warning here because "bytes" is controlled by
the user and we cap the upper bound with min() but allow negatives.
Negative bytes will result in some nasty warning messages but are not
super harmful.  Anyway, no one needs negative bytes so let's just check
for it and return NULL.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>mptfusion: prevent some memory corruption</title>
<updated>2015-08-26T14:11:45+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-07-03T08:53:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e819cdb198319cccf4af4fc12ac4d796109d8c23'/>
<id>urn:sha1:e819cdb198319cccf4af4fc12ac4d796109d8c23</id>
<content type='text'>
These are signed values the come from the user, we put a cap on the
upper bounds but not on the lower bounds.

We use "karg.dataSgeOffset" to calculate "sz".  We verify "sz" and
proceed as if that means that "karg.dataSgeOffset" is correct but this
fails to consider that the "sz" calculations can have integer overflows.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>mptfusion: simplify rounding</title>
<updated>2014-09-16T16:09:43+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2014-07-01T12:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f6e495a2b317fd7f3693d7c9217abfe943cbb3c6'/>
<id>urn:sha1:f6e495a2b317fd7f3693d7c9217abfe943cbb3c6</id>
<content type='text'>
Rounding up to a multiple of 4 should be done using the ALIGN
macro. As a bonus, this also makes the generated code smaller.

In GetIocFacts(), sz is assigned to a few lines below without being
read in the meantime, so it is ok that it doesn't end up with the same
value as facts-&gt;FWImageSize.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Reviewed-by: Joe Lawrence &lt;joe.lawrence@stratus.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>mptfusion: use memdup_user</title>
<updated>2014-07-25T21:16:57+00:00</updated>
<author>
<name>Joe Lawrence</name>
<email>joe.lawrence@stratus.com</email>
</author>
<published>2014-06-25T21:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e67c459d0ac945ac09639d85de299e65317aefe'/>
<id>urn:sha1:3e67c459d0ac945ac09639d85de299e65317aefe</id>
<content type='text'>
Let memdup_user handle the kmalloc, copy_from_user and error checking
kfree code.

Spotted by the following smatch (false positive) warning:

  drivers/message/fusion/mptctl.c:1369 mptctl_getiocinfo() warn:
    possible info leak 'karg'

Signed-off-by: Joe Lawrence &lt;joe.lawrence@stratus.com&gt;
Acked-by: Sreekanth Reddy &lt;Sreekanth.Reddy@avagotech.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>mptfusion: fix msgContext in mptctl_hp_hostinfo</title>
<updated>2014-05-28T16:14:16+00:00</updated>
<author>
<name>Tomas Henzl</name>
<email>thenzl@redhat.com</email>
</author>
<published>2014-05-28T16:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73d02c200b0e43762eae7a81e7f36d14adb26a37'/>
<id>urn:sha1:73d02c200b0e43762eae7a81e7f36d14adb26a37</id>
<content type='text'>
Hi,

without this patch the istwiRWRequest-&gt;MsgContext is always set to zero,
this patch saves the MsgContext in a msgcontext variable and then restores
the value.
Thanks to  David Jeffery who found the issue and did the analysis.

Signed-off-by: Tomas Henzl &lt;thenzl@redhat.com&gt;
Acked-by: Desai, Kashyap &lt;Kashyap.Desai@lsi.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>mptctl: don't wank with fasync in -&gt;release()</title>
<updated>2013-04-29T19:41:44+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-04-15T14:28:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f0689f05371c6a7a33b4a4b85ecb6d1c79e2a371'/>
<id>urn:sha1:f0689f05371c6a7a33b4a4b85ecb6d1c79e2a371</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
