From: Douglas Gilbert <dougg@torque.net>
To: Meelis Roos <mroos@ut.ee>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
Andrew Morton <akpm@osdl.org>,
linux-scsi@vger.kernel.org
Subject: Re: Fw: 2.6.14: aic7xxx broken with blktool
Date: Sat, 29 Oct 2005 10:44:01 +1000 [thread overview]
Message-ID: <4362C5D1.80308@torque.net> (raw)
In-Reply-To: <Pine.SOC.4.61.0510282124200.16664@math.ut.ee>
Meelis Roos wrote:
>>> It outputs random data from memory as a response to the scsi command,
>>> different recent strings different times.
>>
>>
>> This is a bug in blktool, so please refile appropriately.
>
>
> Yes, I see. blktools seems to buggy, yes.
May I suggest that you try sdparm for SCSI devices until
blktool is fixed.
> But blktool outputs memory fragments that seems to come from other
> processes. I saw string "bash", "lled with unallocated bl" and other
> strings that do not appear in blktools image. Without further
> investigation it seems that in case of the error, soma data ise leaked
> from kernel to the buggy program in userspace (blktool in this case).
After analysing the blktool code (4.2), and having
a similar worrying report concerning sdparm, what you
may have seen was the uninitialized contents of a
auto variable (buf[128]) in blktool. As James B. pointed
out, the failure in the aic7xxx driver was due to an
INQUIRY command issued with a cdb length set to 12 bytes
(it should be 6). Given that failure there should have
been no DMA from the device back to the kernel memory.
If kernel memory was still moved back to the user space
then that is an issue.
The sg driver zeroes its kernel buffers for all non-root
users before data is moved through them as a safeguard.
There can also be "short" DMA transfer back from a
device, indicated by resid>0 that should be
considered in this context.
Doug Gilbert
next prev parent reply other threads:[~2005-10-29 0:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 11:02 Fw: 2.6.14: aic7xxx broken with blktool Andrew Morton
2005-10-28 13:23 ` Douglas Gilbert
2005-10-28 15:21 ` James Bottomley
2005-10-28 18:52 ` Meelis Roos
2005-10-29 0:44 ` Douglas Gilbert [this message]
2005-10-29 10:17 ` Meelis Roos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4362C5D1.80308@torque.net \
--to=dougg@torque.net \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@osdl.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mroos@ut.ee \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox