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: <2924920.AIFmfW74hs@vostro.rjw.lan>
Date:	Tue, 21 Oct 2014 00:14:51 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Grant Likely <grant.likely@...aro.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Arnd Bergmann <arnd@...db.de>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Aaron Lu <aaron.lu@...el.com>, devicetree@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Bryan Wu <cooloney@...il.com>,
	Darren Hart <dvhart@...ux.intel.com>,
	Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH v5 09/12] Driver core: Unified interface for firmware node properties

On Monday, October 20, 2014 04:18:18 PM Grant Likely wrote:
> On Mon, 20 Oct 2014 01:46 +0200
> , "Rafael J. Wysocki" <rjw@...ysocki.net>
>  wrote:
> > On Saturday, October 18, 2014 04:55:20 PM Grant Likely wrote:
> > > On Fri, 17 Oct 2014 14:14:53 +0200

[cut]

> > 
> > No, that wouldn't work for ACPI (if I understand your idea correctly), because
> > acpi_dev_prop_read(adev, propname, DEV_PROP_U8, val) will look for a single-value
> > int property, whereas acpi_dev_prop_read_array(adev, propname, DEV_PROP_U8, val, 1)
> > will look for a list (package) property and will attempt to retrieve the first
> > element of that.
> 
> That's a problem. There are certainly cases of DT code that use the
> non-array version to read something that could also be read as an array
> when the code only want the first value. It is a completely valid thing
> to do. The ACPI accessors should be completely okay with either a single
> value, or the first item(s) in a package when doing either a single read or
> an array read.

Yeah.

So I have a new version of the patchset in which that is implemented as
you are describing.  Fortunately, the differences are limited to patches #2,
#3 (for the "compatible" property to behave this way too) and #9 and are not
too big.

I'd prefer that to pass the Mika's tests before posting it, though, which will
take some time I suppose.

> so, if it is encoded as a singl values, then return that value, and the
> largest size of array it will return is 1 element.
> 
> If it is encoded as a package, then a single read should return the
> first element, and an array read should return up to the number of
> values in the package.

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ