All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>,
	Laurent Bigonville <bigon@debian.org>
Cc: SELinux <selinux@tycho.nsa.gov>
Subject: Re: [PATCH 1/2] Explicitly link libselinux against -lpthread
Date: Mon, 04 Nov 2013 08:59:17 -0500	[thread overview]
Message-ID: <5277A835.9000804@redhat.com> (raw)
In-Reply-To: <52779EB0.1020700@tycho.nsa.gov>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/04/2013 08:18 AM, Stephen Smalley wrote:
> On 11/04/2013 08:09 AM, Stephen Smalley wrote:
>> On 11/02/2013 07:13 PM, Laurent Bigonville wrote:
>>> From: Laurent Bigonville <bigon@bigon.be>
>>> 
>>> libselinux is using pthread functions internally without explicitly 
>>> linking against it.
>>> 
>>> If the executable is itself not linked against libpthread, this could 
>>> lead to some weird ld.so assertions, see: 
>>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728529
>> 
>> This seems to effectively revert a portion of: commit
>> c32da69e016061c1a06ec08298aae8c995fbea31 Author: Dan Walsh
>> <dwalsh@redhat.com> Date:   Wed Oct 9 16:27:43 2013 -0400
>> 
>> Fixes for procattr calls to handle cache properly.
>> 
>> We were asked not to link to libpthread but to use gcc internals. We were
>> not handling properly the fact that a cache was UNSET, and this patch
>> fixes this.
>> 
>> Can the two of you work out a proper fix that works for you both?
> 
> Also, at least in the original of pthread_once, it was made a weak binding
> on purpose to avoid requiring use of libpthread, switching the 
> implementation between a pthread-based one and a non-thread-safe 
> implementation depending on whether the caller links with libpthread. So
> having libselinux link directly to libpthread seems to defeat the purpose
> of that approach.
> 
> 
> 
> -- 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.
> 
Yes we originally added the link for pthread_atfork, but have replaced that
with a GCC Equivalebt __selinux_atfork.

Laurent, does debian not work without -lpthread?  Gcc guys did  not want to
require all apps that use libselinux to compile against lpthread.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEUEARECAAYFAlJ3qDUACgkQrlYvE4MpobNPtgCcDKOA5WLeF9oV0oAP7uun5Mpo
rh8AmIn8pgwqO4bV0J7ooxXRllpBdaI=
=3Ljj
-----END PGP SIGNATURE-----

--
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.

  reply	other threads:[~2013-11-04 13:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-02 23:13 [PATCH 1/2] Explicitly link libselinux against -lpthread Laurent Bigonville
2013-11-02 23:13 ` [PATCH 2/2] src/libselinux.pc.in: Move -lpthread to Libs.private Laurent Bigonville
2013-11-04 13:09 ` [PATCH 1/2] Explicitly link libselinux against -lpthread Stephen Smalley
2013-11-04 13:18   ` Stephen Smalley
2013-11-04 13:59     ` Daniel J Walsh [this message]
2013-11-04 14:16       ` Laurent Bigonville
2013-11-06 15:40         ` Sven Vermeulen
2013-11-06 17:09           ` Stephen Smalley
2013-11-06 17:19             ` Laurent Bigonville
2013-11-06 17:35               ` Stephen Smalley
2013-11-06 20:00                 ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5277A835.9000804@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=bigon@debian.org \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.