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]
Message-ID: <1373561279.17876.45.camel@gandalf.local.home>
Date:	Thu, 11 Jul 2013 12:47:59 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Chen Gang <gang.chen@...anux.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kernel: trace: remove __init from
 race_selftest_startup_function() and trace_selftest_startup_function_graph()

On Thu, 2013-07-11 at 08:31 +0800, Chen Gang wrote:
> Like other trace_selftest_startup_*, trace_selftest_startup_function()
> and trace_selftest_startup_function_graph() need in normal section, or
> may cause section mismatch.
> 
> The related warnings:
> 
>     LD      kernel/trace/built-in.o
>   WARNING: kernel/trace/built-in.o(.data+0x154c): Section mismatch in reference from the variable function_trace to the function .init.text:trace_selftest_startup_function()
>   The variable function_trace references
>   the function __init trace_selftest_startup_function()
>   If the reference is valid then annotate the
>   variable with __init* or __refdata (see linux/init.h) or name the variable:
>   *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
> 

No the fix is to add ref_data to the user. The selftest are only called
at boot up. No need to waste memory keeping them around.

-- Steve

> 
> Signed-off-by: Chen Gang <gang.chen@...anux.com>
> ---
>  kernel/trace/trace_selftest.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
> index a7329b7..e341b9d 100644
> --- a/kernel/trace/trace_selftest.c
> +++ b/kernel/trace/trace_selftest.c
> @@ -640,7 +640,7 @@ out:
>   * Enable ftrace, sleep 1/10 second, and then read the trace
>   * buffer to see if all is in order.
>   */
> -__init int
> +int
>  trace_selftest_startup_function(struct tracer *trace, struct trace_array *tr)
>  {
>  	int save_ftrace_enabled = ftrace_enabled;
> @@ -734,7 +734,7 @@ static int trace_graph_entry_watchdog(struct ftrace_graph_ent *trace)
>   * Pretty much the same than for the function tracer from which the selftest
>   * has been borrowed.
>   */
> -__init int
> +int
>  trace_selftest_startup_function_graph(struct tracer *trace,
>  					struct trace_array *tr)
>  {


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