lkml.org 
[lkml]   [2011]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] block: fail SCSI passthrough ioctls on partition devices
On 12/22/2011 09:52 PM, Linus Torvalds wrote:
> On Thu, Dec 22, 2011 at 12:23 PM, Paolo Bonzini<pbonzini@redhat.com> wrote:
>>
>> I disagree. ENOTTY is perfect in all cases except the compat_ioctl (which
>> I'm not denying is ugly, but beautifying it would make everything else
>> ugly).
>
> No it's not.
>
> ENOTTTY isn't ever perfect. We should never have used it to begin with
> inside the kernel.
>
> Why would it make *anything* else uglier? Just return it, don't try to
> change it anywhere. Does it break anything?

I don't know. But given the ways in which earlier versions broke during
testing, I wouldn't be able to tell before running many tests. Which
with the Christmas break would easily mean a little less than 2 weeks.

>> Secondarily, ENOIOCTLCMD is ultimately turned into EINVAL when the system
>> call returns (not ENOTTY).
>
> That's a completely independent bug that has been discussed several
> times. We probably should just bite the bullet and fix it. EINVAL is
> never the right return value (unless the per-ioctl arguments
> themselves are invalid, not for bad ioctls).

Makes a lot of sense and I was wondering about it myself, but I'm not
sure stable would accept that.

I understand that it's kind of backwards to commit as is and cleanup
later, but it's also backwards to force all distros and stable to
deviate from upstream for the sake of cleaning up.

> The EINVAL return comes from some people who didn't understand that
> ENOTTY means "no such ioctl" despite the name.

I did. :)

Paolo


\
 
 \ /
  Last update: 2011-12-22 23:11    [W:0.251 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site