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, 4 Feb 2009 05:26:04 -0500 (EST)
From:	Anders Kaseorg <andersk@....EDU>
To:	Rusty Russell <rusty@...tcorp.com.au>
cc:	Jeff Arnold <jbarnold@....edu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Denys Vlasenko <vda.linux@...glemail.com>,
	Tim Abbott <tabbott@....edu>, Waseem Daher <wdaher@....edu>,
	Nikanth Karthikesan <knikanth@...e.de>
Subject: Re: [PATCH 2/7] x86: Add an option to compile with -ffunction-sections
 -fdata-sections

On Wed, 4 Feb 2009, Rusty Russell wrote:
> You need to make this depend on X86, otherwise allmodconfig will turn it on
> and break other archs.

Okay.

> What's the conflict with FTRACE?

This actually should have changed from FTRACE to FUNCTION_TRACER as of 
commit 606576ce816603d9fe1fb453a88bc6eea16ca709 in v2.6.28-rc3.

The conflict is that FUNCTION_TRACER enables KBUILD_CFLAGS += -pg, and 
passing -pg to current gcc causes it to emit a warning and disable 
-ffunction-sections:
  <http://gcc.gnu.org/ml/gcc-help/2008-11/msg00128.html>

(If this gcc problem is resolved in the future, the code should work fine 
with FUNCTION_TRACER.  A small amount of extra matching code is needed to 
handle DYNAMIC_FTRACE.)

Patch for these two issues:

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6e23e10..1d63b5f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -29,6 +29,7 @@ config X86
 	select HAVE_KSPLICE
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARCH_WANT_FRAME_POINTERS
+	select HAVE_FUNCTION_DATA_SECTIONS
 	select HAVE_KRETPROBES
 	select HAVE_FTRACE_MCOUNT_RECORD
 	select HAVE_DYNAMIC_FTRACE
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6d64083..c6a2674 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -591,9 +591,13 @@ config FRAME_POINTER
 	  larger and slower, but it gives very useful debugging information
 	  in case of kernel bugs. (precise oopses/stacktraces/warnings)

+config HAVE_FUNCTION_DATA_SECTIONS
+	bool
+
 config FUNCTION_DATA_SECTIONS
 	bool "Compile with -ffunction-sections -fdata-sections"
-	depends on !FTRACE
+	depends on HAVE_FUNCTION_DATA_SECTIONS
+	depends on !FUNCTION_TRACER
 	help
 	  If you say Y here the compiler will give each function
 	  and data structure its own ELF section.
--
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