[Re: [PATCH] selinux: fix parallel compile error] On 16/09/2010 (Thu 08:24) James Morris wrote: > On Wed, 15 Sep 2010, Paul Gortmaker wrote: > > > Thanks for applying this earlier patch. I found that there still > > is a (now smaller) corner case to trigger this because of the ss subdir, > > which is why I resent a slightly different patch to you last week. > > This updated patch does a better job of showing and fixing the problem. > > > > http://www.spinics.net/linux/fedora/linux-security-module/msg09277.html > > > > Let me know if you would like a delta patch, instead of rewinding > > and replacing the older one with this one. > > Please send a delta patch, otherwise, it will mess up the git history. No problem. Inline below. My patch #2 would have needed to have been updated anyway, since the addition of ss/status.c wasn't in the tree I'd originally created it on. Thanks, Paul. --- >From d617c83c50f99afa4a305856eb581daed8fd6d90 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx> Date: Thu, 9 Sep 2010 10:48:16 -0400 Subject: [PATCH] selinux: really fix dependency causing parallel compile failure. While the previous change to the selinux Makefile reduced the window significantly for this failure, it is still possible to see a compile failure where cpp starts processing selinux files before the auto generated flask.h file is completed. This is easily reproduced by adding the following temporary change to expose the issue everytime: - cmd_flask = scripts/selinux/genheaders/genheaders ... + cmd_flask = sleep 30 ; scripts/selinux/genheaders/genheaders ... This failure happens because the creation of the object files in the ss subdir also depends on flask.h. So simply incorporate them into the parent Makefile, as the ss/Makefile really doesn't do anything unique. With this change, compiling of all selinux files is dependent on completion of the header file generation, and this test case with the "sleep 30" now confirms it is functioning as expected. Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx> --- security/selinux/Makefile | 17 ++++++----------- security/selinux/ss/Makefile | 9 --------- 2 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 security/selinux/ss/Makefile diff --git a/security/selinux/Makefile b/security/selinux/Makefile index c6fa30e..a30f218 100644 --- a/security/selinux/Makefile +++ b/security/selinux/Makefile @@ -2,17 +2,12 @@ # Makefile for building the SELinux module as part of the kernel tree. # -obj-$(CONFIG_SECURITY_SELINUX) := selinux.o ss/ - -selinux-y := avc.o \ - hooks.o \ - selinuxfs.o \ - netlink.o \ - nlmsgtab.o \ - netif.o \ - netnode.o \ - netport.o \ - exports.o +obj-$(CONFIG_SECURITY_SELINUX) := selinux.o + +selinux-y := avc.o hooks.o selinuxfs.o netlink.o nlmsgtab.o netif.o \ + netnode.o netport.o exports.o \ + ss/ebitmap.o ss/hashtab.o ss/symtab.o ss/sidtab.o ss/avtab.o \ + ss/policydb.o ss/services.o ss/conditional.o ss/mls.o ss/status.o selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o diff --git a/security/selinux/ss/Makefile b/security/selinux/ss/Makefile deleted file mode 100644 index 974e11c..0000000 --- a/security/selinux/ss/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# -# Makefile for building the SELinux security server as part of the kernel tree. -# - -EXTRA_CFLAGS += -Isecurity/selinux -Isecurity/selinux/include -obj-y := ss.o - -ss-y := ebitmap.o hashtab.o symtab.o sidtab.o avtab.o policydb.o services.o conditional.o mls.o status.o - -- 1.7.2.1 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with the words "unsubscribe selinux" without quotes as the message.