Hi all, I'd like to add the following patch to the 2.5 branch. It cleans up the Makefile rules a bit, and prevents the dte and lids modules from being relinked every time the subdirectory is entered, even if the .o file does not need to be relinked. I also fixed the rules for when LIDS or DTE is selected to be compiled into the kernel. It doesn't look like anyone has tried that before :) I'd also like to remove those rules altogether, and could do so for the lids rule, but for the dte subdirectory, it would involve renaming the dte.c file to something else. If the subdirectory name is the same name as the compiled object, then we could get rid of the check all together and replace it with a simple rule at the end of the file that looks like: obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o)) See the drivers/usb/Makefile and drivers/usb/core/Makefile for an example of how this all could work. As for the selinux module, I could not figure out how to keep that object from being relinked every time. It has to do with the object file in the selinux/ss subdirectory. This isn't a big deal, just a minor nusance. Comments? thanks, greg k-h # This is a BitKeeper generated patch for the following project: # Project Name: Linux Security Module # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.418 -> 1.419 # security/dte/Makefile 1.4 -> 1.5 # security/lids/Makefile 1.3 -> 1.4 # security/Makefile 1.19 -> 1.20 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/05/10 gregat_private 1.419 # simplified the security makefiles a bit. # Now prevents relinking some objects when it isn't necessary. # -------------------------------------------- # diff -Nru a/security/Makefile b/security/Makefile --- a/security/Makefile Fri May 10 10:09:13 2002 +++ b/security/Makefile Fri May 10 10:09:13 2002 @@ -9,7 +9,7 @@ subdir-$(CONFIG_SECURITY_SELINUX) += selinux subdir-$(CONFIG_SECURITY_SELINUX_SELOPT)+= selinux/selopt subdir-$(CONFIG_SECURITY_DTE) += dte -subdir-$(CONFIG_LIDS) += lids +subdir-$(CONFIG_LIDS) += lids # Objects that export symbols export-objs := security.o @@ -25,10 +25,10 @@ obj-$(CONFIG_SECURITY_IP) += lsm_ip_glue.o obj-$(CONFIG_SECURITY_OWLSM) += owlsm.o ifeq ($(CONFIG_SECURITY_DTE),y) - obj-y += dte/dte_plug.o + obj-y += dte/vmlinux-obj.o endif ifeq ($(CONFIG_LIDS),y) - obj-y += lids/lids.o + obj-y += lids/vmlinux-obj.o endif include $(TOPDIR)/Rules.make diff -Nru a/security/dte/Makefile b/security/dte/Makefile --- a/security/dte/Makefile Fri May 10 10:09:13 2002 +++ b/security/dte/Makefile Fri May 10 10:09:13 2002 @@ -2,14 +2,11 @@ # Makefile for the DTE code # -O_TARGET := vmlinux-obj.o +O_TARGET := vmlinux-obj.o obj-$(CONFIG_SECURITY_DTE) := dte_plug.o -dte-objs := dte.o inode.o mount.o read_policy.o task.o \ +dte_plug-objs := dte.o inode.o mount.o read_policy.o task.o \ module.o path.o syscall.o include $(TOPDIR)/Rules.make - -dte_plug.o: $(dte-objs) - $(LD) -r -o $@ $(dte-objs) diff -Nru a/security/lids/Makefile b/security/lids/Makefile --- a/security/lids/Makefile Fri May 10 10:09:13 2002 +++ b/security/lids/Makefile Fri May 10 10:09:13 2002 @@ -21,6 +21,3 @@ endif include $(TOPDIR)/Rules.make - -lids.o: $(lids-objs) - $(LD) -r -o $@ $(lids-objs) _______________________________________________ linux-security-module mailing list linux-security-moduleat_private http://mail.wirex.com/mailman/listinfo/linux-security-module
This archive was generated by hypermail 2b30 : Fri May 10 2002 - 10:22:52 PDT