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: <0a606181-b51b-526a-7166-2f2a362dc8d6@metafoo.de>
Date:   Sun, 20 Feb 2022 14:50:17 +0100
From:   Lars-Peter Clausen <lars@...afoo.de>
To:     Jonathan Cameron <jic23@...nel.org>,
        Nandor Han <nandor.han@...sala.com>
Cc:     linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] iio: core: provide a default value `label` property

On 2/20/22 14:18, Jonathan Cameron wrote:
> On Wed, 16 Feb 2022 15:56:04 +0200
> Nandor Han <nandor.han@...sala.com> wrote:
>
>> The label property is used to correctly identify the same IIO device
>> over reboots. The implementation requires that a value will be provided
>> through device-tree. This sometime could requires many changes to
>> device-trees when multiple devices want to use the label property.
>> In order to prevent this, we could use the device-tree node
>> name as default value. The device-tree node name is unique and
>> also reflects the device which makes it a good choice as default value.
>> This change is backward compatible since doesn't affect the users that
>> do configure a label using the device-tree or the ones that are not
>> using the labels at all.
>>
>> Use the device-tree node name as a default value for `label` property,
>> in case there isn't one configured through device-tree.
> Interesting idea.  However a few concerns come to mind.
> 1) If we start having a default for this, then it will get used as ABI
>     and if a label is applied later to the DT then we will end up breaking
>     userspace scripts.
> 2) If we do this it should be firmware agnostics (we need to fix
>     the existing code to be such as well).
> 3) Is the node name always unique (think multiple accelerometers on
>     different i2c masters)?
> 3) I'm fairly sure this information is readily available anyway.
>     either via the of_node link for the iio\:deviceX
>     So why not have your usespace use that instead of label?
>     I'm not a fan of duplicating information that is readily available
>     anyway - be it as name and reg in the of_node directory.

I'm not a big fan of this either for the above reasons.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ