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: <62f150ba-abc0-8e45-1355-8a61354ee3e1@axentia.se>
Date:   Mon, 7 Nov 2016 12:57:43 +0100
From:   Peter Rosin <peda@...ntia.se>
To:     Daniel Baluta <daniel.baluta@...il.com>
CC:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        Devicetree List <devicetree@...r.kernel.org>
Subject: Re: [PATCH v3 1/8] iio:core: add a callback to allow drivers to
 provide _available attributes

On 2016-11-07 12:37, Daniel Baluta wrote:
> On Mon, Oct 24, 2016 at 1:39 AM, Peter Rosin <peda@...ntia.se> wrote:
>> From: Jonathan Cameron <jic23@...nel.org>
>>
>> A large number of attributes can only take a limited range of values.
>> Currently in IIO this is handled by directly registering additional
>> *_available attributes thus providing this information to userspace.
>>
>> It is desirable to provide this information via the core for much the same
>> reason this was done for the actual channel information attributes in the
>> first place.  If it isn't there, then it can only really be accessed from
>> userspace.  Other in kernel IIO consumers have no access to what valid
>> parameters are.
>>
>> Two forms are currently supported:
>> * list of values in one particular IIO_VAL_* format.
>>         e.g. 1.300000 1.500000 1.730000
>> * range specification with a step size:
>>         e.g. [1.000000 0.500000 2.500000]
>>         equivalent to 1.000000 1.5000000 2.000000 2.500000
> 
> Is there any driver using this format? :)

Yes, soon. Hopefully. See patch 3/8
iio: mcp4531: provide range of available raw values
https://patchwork.kernel.org/patch/9391283/

>>
>> An addition set of masks are used to allow different sharing rules for the
>> *_available attributes generated.
>>
>> This allows for example:
>>
>> in_accel_x_offset
>> in_accel_y_offset
>> in_accel_offset_available.
>>
>> We could have gone with having a specification for each and every
>> info_mask element but that would have meant changing the existing userspace
>> ABI.  This approach does not.
>>
>> Signed-off-by: Jonathan Cameron <jic23@...nel.org>
>> [forward ported, added some docs and fixed buffer overflows /peda]
>> Signed-off-by: Peter Rosin <peda@...ntia.se>
> 
> The patch looks good to me at a first glance.

Thanks, may I add your acked-by if/when I respin?

Cheers,
Peter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ