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: <20140901120602.GT29327@sirena.org.uk>
Date:	Mon, 1 Sep 2014 13:06:02 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Dmitry Eremin-Solenikov <dmitry_eremin@...tor.com>
Cc:	Dirk Behme <dirk.behme@...bosch.com>, linux-kernel@...r.kernel.org,
	Liam Girdwood <lgirdwood@...il.com>,
	Gokulkrishnan Nagarajan <Gokulkrishnan.Nagarajan@...bosch.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] regulator: core: GPIO #0 is a valid GPIO

On Mon, Sep 01, 2014 at 03:59:34PM +0400, Dmitry Eremin-Solenikov wrote:
> On 09/01/2014 02:15 PM, Mark Brown wrote:

> >There's no practical way to deploy that without breaking users - as soon
> >as you treat 0 as a valid GPIO you make all existing users relying on
> >the natural behaviour of treating 0 as default instantly buggy which is
> >not practical.  Really the GPIO API is badly specified here.

> Back in the time before DTS conversion started, the 0 was a correct GPIO
> number. If somebody wanted to specify that no gpio is provided, he provided
> -1 as an invalid number. I have the feeling that allowing users to use 0 as
> 'no gpio' is a mistake. Or the API should be changed
> to disallow GPIO 0 to exist at all.

Please consider my point about making users instantly buggy - it's not
practical to introduce a new field into existing platform data which
needs initialization.  Disallowing the use of 0 as a GPIO seems more
practical here (in that it's something the platform can control with
more reliable coordination).

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ