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]
Message-ID: <ZhAhpMNv8Agl4vCZ@bogus>
Date: Fri, 5 Apr 2024 17:07:00 +0100
From: Sudeep Holla <sudeep.holla@....com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Peng Fan <peng.fan@....com>, Linus Walleij <linus.walleij@...aro.org>,
	"Peng Fan (OSS)" <peng.fan@....nxp.com>,
	Sudeep Holla <sudeep.holla@....com>,
	"brgl@...ev.pl" <brgl@...ev.pl>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"cristian.marussi@....com" <cristian.marussi@....com>
Subject: Re: [PATCH] pinctrl: pinconf-generic: check error value EOPNOTSUPP

On Fri, Apr 05, 2024 at 06:55:34PM +0300, Andy Shevchenko wrote:
> On Fri, Apr 05, 2024 at 04:47:19PM +0100, Sudeep Holla wrote:
> >
> > Well, I don't agree with that 100% now since this is GPIO/pinmux sub-system
> > practice only.
>
> 	git grep -lw ENOTSUPP
>
> utterly disagrees with you.
>

/me more confused. Though I haven't dig deeper to chech how many of these
EOPNOTSUPP uses are intended for userspace.

$git grep -lw ENOTSUPP | wc -l
713
git grep -lw EOPNOTSUPP | wc -l
2946

> > What if we change the source/root error cause(SCMI) in this
> > case and keep GPIO/pinmux happy today but tomorrow when this needs to be
> > used in some other subsystem which uses EOPNOTSUPP by default/consistently.
>
> This is different case. For that we may shadow error codes with explicit
> comments.
>

Sure as along as that is acceptable.

> > Now how do we address that then, hence I mentioned I am not 100% in agreement
> > now while I was before knowing that this is GPIO/pinmux strategy.
> >
> > I don't know how to proceed now 🙁.
>
> KISS principle? There are only 10+ drivers to fix (I showed a rough list)
> to use ENOTSUPP instead of 100s+ otherwise.
>

Again I assume you are referring to just GPIO/pinmux subsystem right.
As the number of occurrence of EOPNOTSUPP in the kernel overall is quite
large.

I was thinking of changing the SCMI error map from EOPNOTSUPP to ENOTSUPP,
but for now I think it is better to just handle the mapping in the pinmux
part of SCMI that pinmux subsystem interacts with. In future if more
subsystem expect ENOTSUPP, then we can change it. I hope this aligns with
KISS principle as we are just fixing for the case that is know to cause
issue rather than changing all probably regressing and then having to
fix them all.

Thanks for the time and explanation.

--
Regards,
Sudeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ