Re: [PATCH] Fix build break around __atomic_*() with GCC<4.7

2018-08-13 Thread Tom Cherry via Selinux
On Mon, Aug 13, 2018 at 1:49 PM Hollis Blanchard wrote: > > On 08/13/2018 01:45 PM, Tom Cherry wrote: > > On Mon, Aug 13, 2018 at 12:43 PM Hollis Blanchard > > wrote: > >> The __atomic_* GCC primitives were introduced in GCC 4.7, but Red Hat > >> Enterprise Linux 6.x (for example) provides GCC

Re: [PATCH] Fix build break around __atomic_*() with GCC<4.7

2018-08-13 Thread Tom Cherry via Selinux
On Mon, Aug 13, 2018 at 12:43 PM Hollis Blanchard wrote: > > The __atomic_* GCC primitives were introduced in GCC 4.7, but Red Hat > Enterprise Linux 6.x (for example) provides GCC 4.4. Tweak the current code to > use the (most conservative) __sync_synchronize() primitive provided by those >

[PATCH] libselinux: fix thread safety issues with lookup_common()

2017-07-26 Thread Tom Cherry via Selinux
There are two problems with lookup_common() and therefore selabel_lookup() and related functions that this patch fixes: 1) A race with the lazy compilation of regexes. Since the struct regex_data is allocated and assigned immediately to the parent struct spec, it's possible for a second thread

[PATCH] libselinux: fix thread safety issues with lookup_common()

2017-07-25 Thread Tom Cherry via Selinux
There are two problems with lookup_common() and therefore selabel_lookup() and related functions that this patch fixes: 1) A race with the lazy compilation of regexes. Since the struct regex_data is allocated and assigned immediately to the parent struct spec, it's possible for a second thread

Re: [PATCH] procattr.c: Use __BIONIC__ instead of __ANDROID__

2017-05-12 Thread Tom Cherry via Selinux
On Fri, May 12, 2017 at 6:22 AM, Stephen Smalley <s...@tycho.nsa.gov> wrote: > On Thu, 2017-05-11 at 16:50 -0700, Tom Cherry via Selinux wrote: >> This check is not specific to Android devices. If libselinux were >> used >> with Bionic on a normal Linux system this che

[PATCH] procattr.c: Use __BIONIC__ instead of __ANDROID__

2017-05-11 Thread Tom Cherry via Selinux
This check is not specific to Android devices. If libselinux were used with Bionic on a normal Linux system this check would still be needed. Signed-off-by: Tom Cherry --- libselinux/src/procattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git