Skip to contentSkip to conversation

Patch to fix segfault in libselinux

PATCH Daniel J Walsh 2 participants 3 messages Aug 2, 2006 – Aug 3, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

* Tue Aug 1 2006 Jeremy Katz <[email protected]> - 1.30.19-5
- only build non-fpic objects with -mno-tls-direct-seg-refs

* Tue Aug 1 2006 Jeremy Katz <[email protected]> - 1.30.19-4
- build with -mno-tls-direct-seg-refs on x86 to avoid triggering segfaults with xen (#200783)

src/Makefile renamed from src/Makefile.notls +6 -1
@@ -24,6 +24,11 @@
 override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
 RANLIB=ranlib
 
+ARCH := $(patsubst i%86,i386,$(shell uname -m))
+ifneq (,$(filter i386,$(ARCH)))
+TLSFLAGS += -mno-tls-direct-seg-refs
+endif
+
 SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
 
 all: $(LIBA) $(LIBSO) 
@@ -45,7 +50,7 @@
 	ln -sf $@ $(TARGET) 
 
 %.o:  %.c policy.h
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(CFLAGS) $(TLSFLAGS) -c -o $@ $<
 
 %.lo:  %.c policy.h
 	$(CC) $(CFLAGS) -fpic -DSHARED -c -o $@ $<
#1 lore raw
Quoted 6 lines · Daniel J Walsh

* Tue Aug 1 2006 Jeremy Katz <[email protected]> - 1.30.19-5
- only build non-fpic objects with -mno-tls-direct-seg-refs

* Tue Aug 1 2006 Jeremy Katz <[email protected]> - 1.30.19-4
- build with -mno-tls-direct-seg-refs on x86 to avoid triggering segfaults with xen (#200783)

What's really at fault here, libselinux or xen?

Signature · 8 lines
Stephen Smalley
National Security Agency


--
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.
#2 lore raw
Quoted 5 lines · Stephen Smalley
Quoted 3 lines · Daniel J Walsh

* Tue Aug 1 2006 Jeremy Katz <[email protected]> - 1.30.19-5
- only build non-fpic objects with -mno-tls-direct-seg-refs

Quoted 8 lines
Quoted 4 lines

* Tue Aug 1 2006 Jeremy Katz <[email protected]> - 1.30.19-4
- build with -mno-tls-direct-seg-refs on x86 to avoid triggering segfaults with xen (#200783)

What's really at fault here, libselinux or xen?

libselinux in a threaded environment.

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