lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a964f3b-ed7a-d6d8-690e-7595b448039e@iki.fi>
Date:   Mon, 13 Mar 2023 17:53:21 +0200
From:   Jarkko Sonninen <kasper@....fi>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Johan Hovold <johan@...nel.org>, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: serial: xr: Add TIOCGRS485 and TIOCSRS485 ioctls

On 3/13/23 17:50, Greg Kroah-Hartman wrote:
> On Mon, Mar 13, 2023 at 05:07:59PM +0200, Jarkko Sonninen wrote:
>> On 3/13/23 09:53, Greg Kroah-Hartman wrote:
>>> On Mon, Mar 13, 2023 at 09:49:26AM +0200, Jarkko Sonninen wrote:
>>>>>> +{
>>>>>> +	void __user *argp = (void __user *)arg;
>>>>>> +
>>>>>> +	switch (cmd) {
>>>>>> +	case TIOCGRS485:
>>>>>> +		return xr_get_rs485_config(tty, argp);
>>>>>> +	case TIOCSRS485:
>>>>>> +		return xr_set_rs485_config(tty, argp);
>>>>>> +	}
>>>>>> +	return -ENOIOCTLCMD;
>>>>> Wrong ioctl return value :(
>>>> What is the correct ioctl error return value ?
>>>> ENOIOCTLCMD was used in most places in usb serial as an error return.
>>> ENOTTY is the correct one for when an ioctl is not handled by the ioctl
>>> call.
>>>
>>> thanks,
>>>
>>> greg k-h
>> Using ENOTTY breaks all other tty ioctls.
> What other tty ioctls?
>
> confused,
>
> greg k-h

For example TCGETS and TCFLSH

     - Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ