On Mon, 25 May 2020 at 15:47, Greg KH gregkh@linuxfoundation.org wrote:
On Mon, May 25, 2020 at 02:52:34PM +0300, Maxim Uvarov wrote:
Optee device names for sysfs needed to be unique and it's better if they will mean something. UUID for name looks like good solution: /sys/bus/tee/devices/optee-clnt-<uuid>
Can you document that in Documentation/ABI/ ?
yes, sure if we agree to go with uuid.
And why UUID? Those are usually huge, is that easier than just a unique number?
UUID here is connected to Trusted Application (TA) in a secure world. If you need to 'find' sysfs entry for the corresponding driver becomes very easy. Also UUID here are not really huge, like: /sys/bus/tee/devices/optee-clnt-71d950bc-c9d4-c442-82cb-343fb7f37896 /sys/bus/tee/devices/optee-clnt-ba3ac5b6-6996-6846-a7f2-205629d00f86
I think that is better then optee-clnt-0, optee-clnt-1.. which can be reordered on each boot and does not carry any information. And on module unload there will be missing numbers.
Regards, Maxim.
thanks,
greg k-h