RE: [PATCH] vsock: ratelimit unknown ioctl error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Stefano Garzarella
> Sent: 26 October 2020 08:43
...
> >Isn't the canonical error for unknown ioctl codes -ENOTTY?
> >
> 
> Oh, thanks for pointing that out!
> 
> I had not paid attention to the error returned, but looking at it I
> noticed that perhaps the most appropriate would be -ENOIOCTLCMD.
> In the ioctl syscall we return -ENOTTY, if the callback returns
> -ENOIOCTLCMD.
> 
> What do you think?

It is 729 v 443 in favour of ENOTTY (based on grep).

No idea where ENOIOCTLCMD comes from, but ENOTTY probably
goes back to the early 1970s.

The fact that the ioctl wrapper converts the value is a good
hint that userspace expects ENOTTY.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux