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] [day] [month] [year] [list]
Date:   Fri, 22 Apr 2022 18:59:07 +0100
From:   Sudeep Holla <sudeep.holla@....com>
To:     Oleksii Moisieiev <Oleksii_Moisieiev@...m.com>
Cc:     Rob Herring <robh@...nel.org>,
        Stefano Stabellini <sstabellini@...nel.org>,
        Sudeep Holla <sudeep.holla@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        Souvik Chakravarty <Souvik.Chakravarty@....com>,
        Cristian Marussi <cristian.marussi@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/2] dt-bindings: xen: Add xen,scmi-devid property
 description for SCMI

On Mon, Mar 28, 2022 at 08:52:04AM +0000, Oleksii Moisieiev wrote:

[...]

>
> Based on what Sudeep have suggested, I think we may think about the approach
> of the Generic Linux device-id, which can be used for SCMI needs as the
> device id.
>
> I have some ideas, how the generic device_id can be implemented.
> From my understanding - the Generic Device Id is the unique identifier, which
> can be set for the Device node in the Device-tree. This identifier is
> already set for each node by DTC and called phandle.
>

IIUC phandle is used as reference to the device node in the device tree
and it is generated by DTC. I assume we can't use that for the "device ID"
being discussed under the $subject.

> I've tried setting phandle for the device-nodes, such as:
>
> &usb0 {
>     /* .... */
> 	phandle = <0x10>;
> }
>
> DTC seems to work properly with this constant phandle. All links works
> for usb0 and all nodes, which doesn't have constant phandle receives
> calculated phandle during device-tree compilation.
>

Indeed.

> Also DTC will fail if I set 2 same phandle values in different
> device nodes. So we can rely on phandle as on the unique device id.
>
> What do you think about using phandle to set the device_id?
>
> The alternative way I see for now is to itroduce additional property to SCMI
> node, which includes list of the device-ids, such as:
>

I don't like this idea as this means every user of the "device ID" property
will now have to add such a list which sounds like a duplication to me.

> scmi {
> 	compatible = "arm,scmi-smc";
> 	/* ... */
> 	device-ids = <&usb0 17,
> 				  &usb1 42,
> 				  ....
> 				>;
> }
>
> Looking forward for your opinion.
> Maybe you can share some ideas about how the device-id can be
> implemented?

--
Regards,
Sudeep

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ