lkml.org 
[lkml]   [2008]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Re: Linux 2.6.26-rc2] Write protect on on
Linus Torvalds wrote:
>
> On Mon, 19 May 2008, Boaz Harrosh wrote:
>
>> Alan Stern wrote:
>>> Yes, it never worked properly. But now it fails in a bad way whereas
>>> before it failed in a benign way.
>> You do realize that, that was pure lock to have a zero'ed buffer.
>
> Umm. Maybe it SHOULD NOT HAVE BEEN!
>
> The thing is, if we can get partial results back, we really *should*
> either error out, or we should have at least cleared the buffer (either
> beforehand or when seeing the partial result). Returning a buffer with the
> old random contents is a bug.
>
> And if clearing the buffer not only avoids any security holes and possible
> undefined behavior, but _also_ ends up fixing the write protect sense
> issue, all the better!
>
> Linus
> --

Sure, inspecting other places that emulate MODE_SENSE, (And inspecting the scsi
spec) all zeros is a very good scsi response. Alan do you want to send a fix for all
places that initiate a MODE_SENSE command, specifically at
scsi_scan.c::scsi_unlock_floptical() ? (Some other places do)

Boaz



\
 
 \ /
  Last update: 2008-05-19 19:07    [W:0.132 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site