<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/scsi/aacraid/commctrl.c, branch v2.6.31</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[SCSI] Clean up my email address and use a single standard address for everything</title>
<updated>2008-12-29T17:24:12+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alan@lxorguk.ukuu.org.uk</email>
</author>
<published>2008-10-27T15:16:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fa195afe4ad3f6d85a9b7cc236ae85c05ca8db03'/>
<id>fa195afe4ad3f6d85a9b7cc236ae85c05ca8db03</id>
<content type='text'>
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Alan Cox &lt;alan@redhat.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] aacraid: check pci_alloc_consistent errors</title>
<updated>2008-12-29T17:24:11+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-10-23T08:36:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e98991130df36bc429f341a2f21519c39c52afe3'/>
<id>e98991130df36bc429f341a2f21519c39c52afe3</id>
<content type='text'>
We need to check the address that pci_alloc_consistent() returns since
it might fail.

When pci_alloc_consistent() fails, some IOMMUs set the dma_handle
argument to zero. So we can't use fibptr-&gt;hw_fib_pa directly here.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: Aacraid List &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to check the address that pci_alloc_consistent() returns since
it might fail.

When pci_alloc_consistent() fails, some IOMMUs set the dma_handle
argument to zero. So we can't use fibptr-&gt;hw_fib_pa directly here.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: Aacraid List &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] aacraid: prevent copy_from_user() BUG!</title>
<updated>2008-07-12T13:22:24+00:00</updated>
<author>
<name>Mark Salyzyn</name>
<email>Mark_Salyzyn@adaptec.com</email>
</author>
<published>2008-05-28T19:32:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=090507157f3bc43dd925fda50f8aca7d03b616b6'/>
<id>090507157f3bc43dd925fda50f8aca7d03b616b6</id>
<content type='text'>
Seen:

	kernel BUG at arch/i386/lib/usercopy.c:872

under a 2.6.18-8.el5 kernel. Traced it to a garbage-in/garbage-out
ioctl condition in the aacraid driver.

Adaptec's special ioctl scb passthrough needs to check the validity of
the individual scatter gather count fields to the maximum the adapter
supports. Doing so will have the side effect of preventing
copy_from_user() from bugging out while populating the dma buffers.
This is a hardening effort, issue was triggered by an errant version
of the management tools and thus the BUG should not be seen in the
field.

[jejb: fixed up compile failure]
Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Seen:

	kernel BUG at arch/i386/lib/usercopy.c:872

under a 2.6.18-8.el5 kernel. Traced it to a garbage-in/garbage-out
ioctl condition in the aacraid driver.

Adaptec's special ioctl scb passthrough needs to check the validity of
the individual scatter gather count fields to the maximum the adapter
supports. Doing so will have the side effect of preventing
copy_from_user() from bugging out while populating the dma buffers.
This is a hardening effort, issue was triggered by an errant version
of the management tools and thus the BUG should not be seen in the
field.

[jejb: fixed up compile failure]
Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert asm/semaphore.h users to linux/semaphore.h</title>
<updated>2008-04-19T02:22:54+00:00</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2008-04-19T02:21:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6188e10d38b8d7244ee7776d5f1f88c837b4b93f'/>
<id>6188e10d38b8d7244ee7776d5f1f88c837b4b93f</id>
<content type='text'>
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] aacraid: fib context lock for management ioctls (take 2)</title>
<updated>2008-02-08T00:02:33+00:00</updated>
<author>
<name>Salyzyn, Mark</name>
<email>Mark_Salyzyn@adaptec.com</email>
</author>
<published>2008-01-28T20:16:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5234e25c35a708708559727b1e3e04de3a538828'/>
<id>5234e25c35a708708559727b1e3e04de3a538828</id>
<content type='text'>
The first patch (a119ee8ee3045bf559d4cf02d72b112f3de2a15b) was a bit
too aggressive and nested the locks (!) unit testing was in
error. This patch was reverted by
203a512f0976e8ba85df36d76b40af6c80239121.

This new patch should fix the locks correctly.

Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The first patch (a119ee8ee3045bf559d4cf02d72b112f3de2a15b) was a bit
too aggressive and nested the locks (!) unit testing was in
error. This patch was reverted by
203a512f0976e8ba85df36d76b40af6c80239121.

This new patch should fix the locks correctly.

Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] Revert "[SCSI] aacraid: fib context lock for management ioctls"</title>
<updated>2008-01-30T19:14:26+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2008-01-29T21:17:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=203a512f0976e8ba85df36d76b40af6c80239121'/>
<id>203a512f0976e8ba85df36d76b40af6c80239121</id>
<content type='text'>
This reverts commit a119ee8ee3045bf559d4cf02d72b112f3de2a15b.

Adaptec found this was causing system lockups.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit a119ee8ee3045bf559d4cf02d72b112f3de2a15b.

Adaptec found this was causing system lockups.

Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] aacraid: fib context lock for management ioctls</title>
<updated>2008-01-25T15:25:22+00:00</updated>
<author>
<name>Salyzyn, Mark</name>
<email>Mark_Salyzyn@adaptec.com</email>
</author>
<published>2008-01-24T15:40:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a119ee8ee3045bf559d4cf02d72b112f3de2a15b'/>
<id>a119ee8ee3045bf559d4cf02d72b112f3de2a15b</id>
<content type='text'>
Alan noticed the lack of locking surrounding the driver's dealings
with the fib context managed by the trio of ioctls that are used by
the RAID management applications to retrieve Adapter Initiated FIBs. I
merely expanded the fib lock to include the fib context. There have
been no field reports of any issues generally because the applications
are relatively static and do not come and go often enough to stress
this area. I bloated this patch a little with some space junk.

Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Alan noticed the lack of locking surrounding the driver's dealings
with the fib context managed by the trio of ioctls that are used by
the RAID management applications to retrieve Adapter Initiated FIBs. I
merely expanded the fib lock to include the fib context. There have
been no field reports of any issues generally because the applications
are relatively static and do not come and go often enough to stress
this area. I bloated this patch a little with some space junk.

Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] aacraid: remove pigs in space</title>
<updated>2008-01-23T17:29:28+00:00</updated>
<author>
<name>Salyzyn, Mark</name>
<email>Mark_Salyzyn@adaptec.com</email>
</author>
<published>2008-01-16T15:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8ce3eca4dc8161e030a055bde94cde28476e0894'/>
<id>8ce3eca4dc8161e030a055bde94cde28476e0894</id>
<content type='text'>
I was amazed at how much embedded space was present in the aacraid
driver source files. Just selected five files from the set to clean up
for now and the attached patch swelled to 73K in size!

- Removed trailing space or tabs
- Removed spaces embedded within tabs
- Replaced leading 8 spaces with tabs
- Removed spaces before )
- Removed ClusterCommand as it was unused (noticed it as one triggered by above)
- Replaced scsi_status comparison with 0x02, to compare against SAM_STATUS_CHECK_CONDITION.
- Replaced a long series of spaces with tabs
- Replaced some simple if...defined() with ifdef/ifndef

Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I was amazed at how much embedded space was present in the aacraid
driver source files. Just selected five files from the set to clean up
for now and the attached patch swelled to 73K in size!

- Removed trailing space or tabs
- Removed spaces embedded within tabs
- Replaced leading 8 spaces with tabs
- Removed spaces before )
- Removed ClusterCommand as it was unused (noticed it as one triggered by above)
- Replaced scsi_status comparison with 0x02, to compare against SAM_STATUS_CHECK_CONDITION.
- Replaced a long series of spaces with tabs
- Replaced some simple if...defined() with ifdef/ifndef

Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] aacraid: fix multiple definition of automatic variable warning.</title>
<updated>2008-01-23T17:29:20+00:00</updated>
<author>
<name>Salyzyn, Mark</name>
<email>Mark_Salyzyn@adaptec.com</email>
</author>
<published>2008-01-08T21:08:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6dcd4a7fe5dfaace2763187d6941e700a8bc6f27'/>
<id>6dcd4a7fe5dfaace2763187d6941e700a8bc6f27</id>
<content type='text'>
The 'entry' automatic variable was defined at the top and within a
block that uses it, removed the definition from the block that uses
it. Some cosmetic changes were made while in the same file. This patch
should be inert.

Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'entry' automatic variable was defined at the top and within a
block that uses it, removed the definition from the block that uses
it. Some cosmetic changes were made while in the same file. This patch
should be inert.

Signed-off-by: Mark Salyzyn &lt;aacraid@adaptec.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix abuses of ptrdiff_t</title>
<updated>2007-10-29T14:41:33+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2007-10-29T05:11:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=142956af525002c5378e7d91d81a01189841a785'/>
<id>142956af525002c5378e7d91d81a01189841a785</id>
<content type='text'>
Use of ptrdiff_t in places like

-                       if (!access_ok(VERIFY_WRITE, u_tmp-&gt;rx_buf, u_tmp-&gt;len))
+                       if (!access_ok(VERIFY_WRITE, (u8 __user *)
+                                               (ptrdiff_t) u_tmp-&gt;rx_buf,
+                                               u_tmp-&gt;len))

is wrong; for one thing, it's a bad C (it's what uintptr_t is for; in general
we are not even promised that ptrdiff_t is large enough to hold a pointer,
just enough to hold a difference between two pointers within the same object).
For another, it confuses the fsck out of sparse.

Use unsigned long or uintptr_t instead.  There are several places misusing
ptrdiff_t; fixed.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use of ptrdiff_t in places like

-                       if (!access_ok(VERIFY_WRITE, u_tmp-&gt;rx_buf, u_tmp-&gt;len))
+                       if (!access_ok(VERIFY_WRITE, (u8 __user *)
+                                               (ptrdiff_t) u_tmp-&gt;rx_buf,
+                                               u_tmp-&gt;len))

is wrong; for one thing, it's a bad C (it's what uintptr_t is for; in general
we are not even promised that ptrdiff_t is large enough to hold a pointer,
just enough to hold a difference between two pointers within the same object).
For another, it confuses the fsck out of sparse.

Use unsigned long or uintptr_t instead.  There are several places misusing
ptrdiff_t; fixed.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
