* libselinux's __attribute__((constructor)) versus nVidia libGL.so
@ 2013-08-27 17:40 Colin Walters
2013-08-27 17:47 ` Colin Walters
0 siblings, 1 reply; 4+ messages in thread
From: Colin Walters @ 2013-08-27 17:40 UTC (permalink / raw)
To: SELinux List
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libselinux's __attribute__((constructor)) versus nVidia libGL.so
2013-08-27 17:40 libselinux's __attribute__((constructor)) versus nVidia libGL.so Colin Walters
@ 2013-08-27 17:47 ` Colin Walters
2013-08-28 10:06 ` Daniel P. Berrange
0 siblings, 1 reply; 4+ messages in thread
From: Colin Walters @ 2013-08-27 17:47 UTC (permalink / raw)
To: SELinux List; +Cc: dwalsh, eparis
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libselinux's __attribute__((constructor)) versus nVidia libGL.so
2013-08-27 17:47 ` Colin Walters
@ 2013-08-28 10:06 ` Daniel P. Berrange
2013-08-29 12:51 ` Stephen Smalley
0 siblings, 1 reply; 4+ messages in thread
From: Daniel P. Berrange @ 2013-08-28 10:06 UTC (permalink / raw)
To: Colin Walters; +Cc: SELinux List, dwalsh, eparis
On Tue, Aug 27, 2013 at 01:47:54PM -0400, Colin Walters wrote:
> This bug:
>
> https://bugzilla.gnome.org/show_bug.cgi?id=706836
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
--
|: 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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: libselinux's __attribute__((constructor)) versus nVidia libGL.so
2013-08-28 10:06 ` Daniel P. Berrange
@ 2013-08-29 12:51 ` Stephen Smalley
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Smalley @ 2013-08-29 12:51 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: Colin Walters, SELinux List, dwalsh, eparis
On 08/28/2013 06:06 AM, Daniel P. Berrange wrote:
> On Tue, Aug 27, 2013 at 01:47:54PM -0400, Colin Walters wrote:
>> This bug:
>>
>> https://bugzilla.gnome.org/show_bug.cgi?id=706836
>
> 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
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-29 12:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 17:40 libselinux's __attribute__((constructor)) versus nVidia libGL.so Colin Walters
2013-08-27 17:47 ` Colin Walters
2013-08-28 10:06 ` Daniel P. Berrange
2013-08-29 12:51 ` Stephen Smalley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.