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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 29 Mar 2021 15:20:07 +0300
From:   Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Joe Perches <joe@...ches.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] gpiolib: Allow drivers to return EOPNOTSUPP from
 config

On Mon, 2021-03-29 at 14:59 +0300, Andy Shevchenko wrote:
> On Mon, Mar 29, 2021 at 2:43 PM Matti Vaittinen
> <matti.vaittinen@...rohmeurope.com> wrote:
> > The checkpacth instructs to switch from ENOSUPP to EOPNOTSUPP.
> > > WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
> > 
> > Make the gpiolib allow drivers to return both so driver developers
> > can avoid one of the checkpatch complaints.
> 
> Internally we are fine to use the ENOTSUPP.
> Checkpatch false positives there.

I agree. OTOH, the checkpatch check makes sense to user-visible stuff.
Yet, the checkpatch has hard time guessing what is user-visible - so it
probably is easiest to nag about all ENOTSUPP uses as it does now.

> I doubt we need this change. Rather checkpatch should rephrase this
> to
> point out that this is only applicable to _user-visible_ error path.
> Cc'ed Joe.

Yes, thanks for pulling Joe in.

Anyways, no matter what the warning says, all false positives are
annoying. I don't see why we should stay with ENOTSUPP in gpiolib?
(other than the burden of changing it).

But I have no strong opinion on this. All options I see have downsides.

Accepting both ENOTSUPP and EOPNOTSUPP is the easy way to avoid
allowing checkpatch warnings - but I admit it isn't stylish. 

Converting all ENOTSUPP cases inside gpiolib to EOPNOTSUPP is teodious
although end result might be nicer.

Leaving it as is gives annoying false-positives to driver developers.

My personal preference was this patch - others can have other view like
Andy does. I'll leave this to community/maintainers to evaluate :)

Best Regards
	Matti Vaittinen


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ