lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 7 Jan 2009 14:23:37 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	Jan Beulich <jbeulich@...ell.com>
Cc:	ccache@...ts.samba.org, Theodore Tso <tytso@....edu>,
	linux-kernel@...r.kernel.org
Subject: Re: [REGRESSION] Recent change to kernel spikes out ccache/distcc

On Wed, Jan 07, 2009 at 12:35:09PM +0000, Jan Beulich wrote:
> >>> Sam Ravnborg <sam@...nborg.org> 07.01.09 12:31 >>>
> >What is the gain/pain ratio here?
> 
> Certainly depends on the pov - it reduces the kernel module (disk) image
> sizes quite a bit, so from a distro perspective its a move against the ever
> growing package sizes (and the disk space) hundreds or even thousands
> of modules require.

The kernel modules seldom export anything so the benefit is minimal here.

I really think we are on a wrong track here.

I did a 15 minutes hack to try ripping the .c -> .s -> .o stuff out.

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5d90030..8c93dc3 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -153,7 +153,7 @@ $(obj)/%.i: $(src)/%.c FORCE
 
 cmd_genksyms =                                                              \
     $(CPP) -D__GENKSYMS__ $(c_flags) $< |                                   \
-    $(GENKSYMS) -T $@ -A -a $(ARCH)                                         \
+    $(GENKSYMS) -T $@ $(if $(CONFIG_KBUILD_STRIP_CRC), -A) -a $(ARCH)       \
      $(if $(KBUILD_PRESERVE),-p)                                            \
      $(if $(1),-r $(firstword $(wildcard $(@:.symtypes=.symref) /dev/null)))
 
@@ -192,6 +192,7 @@ v_file = $(@D)/.tmp_$(@F:.o=.v)
 tmp_o_file = $(@D)/.tmp_$(@F)
 no_g_c_flags = $(filter-out -g%,$(c_flags))
 
+ifdef CONFIG_KBUILD_STRIP_CRC
 cmd_cc_o_c = $(CC) $(c_flags) -S -o $(s_file) $<
 
 cmd_modversions =							\
@@ -208,8 +209,20 @@ cmd_modversions =							\
 		fi;							\
 	else								\
 		rm -f $(v_file);					\
-		$(CC) $(no_g_c_flags) -c -o $@ $(s_file);		\
+		$(CC) $(no_g_c_flags) -c -o $@ $< ;			\
 	fi;
+else
+cmd_cc_o_c = $(CC) $(c_flags) -c -o $(tmp_o_file) $<
+
+cmd_modversions =							\
+	if $(OBJDUMP) -h $(tmp_o_file) | grep -q __ksymtab; then	\
+		$(call cmd_genksyms, $(KBUILD_SYMTYPES)) > $(v_file);	\
+		$(LD) $(LDFLAGS) -r -o $@ $(tmp_o_file)	-T $(v_file);	\
+	else								\
+		rm -f $(v_file);					\
+	fi;
+
+endif
 endif
 
 ifdef CONFIG_FTRACE_MCOUNT_RECORD


Jan - I need some hard numbers to convince me that stripping the
__crc symbols is worth it.

We can make it a configuration option as I showed above but we should
at least know what we are gaining for this.

I am very positive about stripping of the modules in general,
but the __crc_ symbols seems to trigger a few things:
1) ccahce, distcc issues in the MODVERSION case (that is allmodconfig builds)
2) It does not increase readability of the Makefile machinery and I like more
   people to be able to hack on this - not less.

Thanks,
	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ