Skip to contentSkip to conversation

selinux: fix parallel compile error

PATCH James Morris 2 participants 4 messages Sep 14, 2010 – Sep 16, 2010 2 messages not in the archive SELinux security module

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 10 lines · Paul Gortmaker

Selinux has an autogenerated file, "flask.h" which is included by two other selinux files. The current makefile has a single dependency on the first object file in the selinux-y list, assuming that will get flask.h generated before anyone looks for it, but that assumption breaks down in a "make -jN" situation and you get:

selinux/selinuxfs.c:35: fatal error: flask.h: No such file or directory compilation terminated.
remake[9]: *** [security/selinux/selinuxfs.o] Error 1

Quoted 5 lines

Since flask.h is included by security.h which in turn is included nearly everywhere, make the dependency apply to all of the selinux-y list of objs.

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

Signature · 7 lines
James Morris
<[email protected]>

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 9 lines · Paul Gortmaker

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.

Signature · 7 lines
James Morris
<[email protected]>

--
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.
#4 lore raw
Quoted 7 lines · [Re: [PATCH] selinux: fix parallel compile error] On 16/09/2010 (Thu 08:24)…
Quoted 5 lines · Paul Gortmaker

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.

Quoted 6 lines
Quoted 4 lines

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

#5 lore raw
Quoted 10 lines · Paul Gortmaker

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.

---
 security/selinux/Makefile    |   17 ++++++-----------
 security/selinux/ss/Makefile |    9 ---------
 2 files changed, 6 insertions(+), 20 deletions(-)
 delete mode 100644 security/selinux/ss/Makefile

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

Signature · 7 lines
James Morris
<[email protected]>

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