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]
Date:	Mon, 20 Nov 2006 22:41:22 -0800
From:	Greg KH <greg@...ah.com>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc:	Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: Re: bus_id collisions

On Tue, Nov 21, 2006 at 03:02:16PM +1100, Benjamin Herrenschmidt wrote:
> Hi Greg !
> 
> It occurs to me (after some trouble I had with custom bus types) that
> this comment is incorrect in device.h, in the definition of struct
> device :
> 
>         char    bus_id[BUS_ID_SIZE];    /* position on parent bus */
> 
> As the bus_id needs to be unique for a given bus_type, not only under a
> given parent, due to the symlinks in /sys/bus/<bus_type>/.

Yes, sorry, that comment is _very_ old...

> This has caused me some trouble with of_platform devices, which are
> sort-of platform devices but linked to the Open Firmware device-tree, as
> I generate their names based on the nodes in the tree which need not be
> unique as long as they are unique under a given parent.
> 
> I've worked around it, but I though the comment might need to be
> clarified.

Ok.

> Also, I don't suppose you have any plan to move away from the bus_id
> being a fixed size array inside struct device ?

No, I had not heard of anyone having any problems with the size of it.
We could just do it like the kobject does, and have a function to set it
and handle the pointer vs. array issue there if you _really_ need a
bigger size.

> I would very much like to be able to have larger names ... Among
> others, in order to handle the above problem, I tend to include the
> fully translated 64 bits address of the device in the name :-)
> (Hopefully, it's generally smaller and I don't have leading zero's but
> still, I have little room left for the device name which is annoying).

Oh, that's a very annoying bus id, but I guess it's legal.

I'll poke around and see if I can make it bigger.  You don't want it
bigger for static 'struct device' types, right?

thanks,

greg k-h
-
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