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]
Date: Thu, 18 Jan 2024 10:59:34 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Hugo Villeneuve <hugo@...ovil.com>, Kent Gibson <warthog618@...il.com>, 
	Bartosz Golaszewski <brgl@...ev.pl>
Cc: gregkh@...uxfoundation.org, jirislaby@...nel.org, 
	cosmin.tanislav@...log.com, shc_work@...l.ru, linux-kernel@...r.kernel.org, 
	linux-serial@...r.kernel.org, Hugo Villeneuve <hvilleneuve@...onoff.com>
Subject: Re: [PATCH 15/18] serial: max310x: replace ENOTSUPP with preferred
 EOPNOTSUPP (checkpatch)

On Thu, Jan 18, 2024 at 1:59 AM Hugo Villeneuve <hugo@...ovil.com> wrote:
> On Thu, 18 Jan 2024 01:24:11 +0200
> Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> > On Thu, Jan 18, 2024 at 12:39 AM Hugo Villeneuve <hugo@...ovil.com> wrote:

..

> > > Fixes the following checkpatch warning:
> > >
> > >     WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
> >
> > NAK.
> > It's a false positive.
> >
> > > According to include/linux/errno.h, ENOTSUPP is
> > > "Defined for the NFSv3 protocol", so replace it with preferred EOPNOTSUPP.
> >
> > The GPIO subsystem uses this internal error code internally. User
> > space won't get it, so users may not see this one.
>
> Hi Andy,
> I will drop the patch then.
>
> What about adding a comment to prevent future fixes?
>
> -               return -ENOTSUPP;
> +               return -ENOTSUPP; /*
> +                                  * ENOTSUPP is used for backward compatibility
> +                                  * with GPIO subsystem.
> +                                  */

It's kinda useless to add it to a single (GPIO) driver.
Rather it needs to be mentioned somewhere between
https://www.kernel.org/doc/html/latest/driver-api/gpio/index.html.

+Cc: Kent, Bart. It seems we have a handful of drivers violating this
(basically following what checkpatch says) and GPIO not documenting
this specific error code and its scope. Did I miss anything?


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ