libselinux's __attribute__((constructor)) versus nVidia libGL.so
Hi,
Can someone from the libselinux side comment on this bug?
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
This bug:
https://bugzilla.gnome.org/show_bug.cgi?id=706836
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 3 lines · Colin Walters
This bug:
FWIW, you can define "priority" values on the constructor attributes, to sort out ordering between libraries, but this sucks as a general purpose solution as it requires co-ordination of priorities between different a projects. eg you might fix the selinux vs nvidia problem now, but it can recur with any other library using constructors in the future. IMHO it would be better to use pthread_once to do any one time initialization of library code
Daniel
Signature · 9 lines
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 5 lines · Daniel P. Berrange
Quoted 3 lines · Colin Walters
This bug:
Quoted 7 lines
FWIW, you can define "priority" values on the constructor attributes, to sort out ordering between libraries, but this sucks as a general purpose solution as it requires co-ordination of priorities between different a projects. eg you might fix the selinux vs nvidia problem now, but it can recur with any other library using constructors in the future. IMHO it would be better to use
pthread_onceto do any one time initialization of library code
I think we considered switching that constructor over to using pthread_once (as we already do for many other forms of initialization via the selinux_once macro), but it would require inserting such calls into many/most of the libselinux functions prior to any use of selinux_mnt or selinux_page_size. Certainly doable (and willing to accept such a patch), but I guess the question is whether it is worth it or if nvidia should just fix their library.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.