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:   Fri, 6 May 2022 11:33:26 +0800
From:   Chengming Zhou <zhouchengming@...edance.com>
To:     rostedt@...dmis.org, mark.rutland@....com, catalin.marinas@....com
Cc:     linux-kernel@...r.kernel.org, kbuild-all@...ts.01.org,
        lkp@...el.com
Subject: Re: [PATCH] ftrace/fgraph: fix increased missing-prototypes warnings

On 2022/5/6 11:27, Chengming Zhou wrote:
> After commit e999995c84c3 ("ftrace: cleanup ftrace_graph_caller enable
> and disable") merged into the linux-next tree, the kernel test robot
> (lkp@...el.com) has send out report that there are increased missing-prototypes
> warnings caused by that commit.
> 
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 \
> 	O=build_dir ARCH=sh SHELL=/bin/bash kernel/trace/
> warning: no previous prototype for 'ftrace_enable_ftrace_graph_caller' [-Wmissing-prototypes]
> warning: no previous prototype for 'ftrace_disable_ftrace_graph_caller' [-Wmissing-prototypes]
> warning: no previous prototype for 'ftrace_return_to_handler' [-Wmissing-prototypes]
> warning: no previous prototype for 'ftrace_graph_sleep_time_control' [-Wmissing-prototypes]
> 
> BTW there are so many missing-prototypes warnings if build kernel with "W=1".
> 
> The increased warnings for 'ftrace_[enable,disable]_ftrace_graph_caller'
> is caused by CONFIG_FUNCTION_GRAPH_TRACER && !CONFIG_DYNAMIC_FTRACE,
> so the declarations in <linux/ftrace.h> can't be seen in fgraph.c.
> 
> And this warning can't reproduce on x86_64 since x86_64 select
> HAVE_FUNCTION_GRAPH_TRACER only when DYNAMIC_FTRACE, so fgraph.c will
> always see the declarations in <linux/ftrace.h>.
> 
> This patch fix the increased warnings by put the definitions in
> CONFIG_DYNAMIC_FTRACE although there are no real problems exist.
> 

Sorry, forget to add:
Reported-by: kernel test robot <lkp@...el.com>

> Signed-off-by: Chengming Zhou <zhouchengming@...edance.com>
> ---
>  kernel/trace/fgraph.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c
> index 289311680c29..2cd374294be7 100644
> --- a/kernel/trace/fgraph.c
> +++ b/kernel/trace/fgraph.c
> @@ -30,6 +30,7 @@ int ftrace_graph_active;
>  /* Both enabled by default (can be cleared by function_graph tracer flags */
>  static bool fgraph_sleep_time = true;
>  
> +#ifdef CONFIG_DYNAMIC_FTRACE
>  /*
>   * archs can override this function if they must do something
>   * to enable hook for graph tracer.
> @@ -47,6 +48,7 @@ int __weak ftrace_disable_ftrace_graph_caller(void)
>  {
>  	return 0;
>  }
> +#endif
>  
>  /**
>   * ftrace_graph_stop - set to permanently disable function graph tracing

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ