Messages in this thread |  | | | Date | Thu, 05 Jan 2012 18:26:22 +0100 | | From | Paolo Bonzini <> | | Subject | Re: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices |
| |
On 01/05/2012 06:04 PM, Linus Torvalds wrote: > >> > Foolish me who found a bug, and an exploitable one for that matter, and even >> > tried to fix it. Looks like security by obscurity would have served users better. > Umm. I just sent out what I think is what we*should* be doing. > > You are the one who seems to just want to add hack upon hack to > things. THAT is what I really hate. It's not only in bad taste, it > *will* come back and bite us some day.
I could have just written
+ ret = scsi_verify_blk_ioctl(bdev, cmd); + if (ret < 0) + return -ENOIOCTLCMD; It wouldn't have been any less hacky, but it would have looked quite normal and perhaps it would have escaped review. I knew I was working around messy code, and I made that clear. In that, I succeeded. :)
> If you think that "security" is about adding new special cases and > hacks, you're so out to lunch that it isn't even funny. It is > absolutely the*last* thing you want.
Thanks for the tip, :) and thanks for picking up the cleanup. I'll keep an eye and resubmit when the dust settles.
Paolo
|  |