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>] [day] [month] [year] [list]
Date:   Fri, 15 Oct 2021 09:28:51 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc:     kbuild-all@...ts.01.org,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: [gustavoars:for-next/cast-function 3/4]
 include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside
 parameter list will not be visible outside of this definition or declaration

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/cast-function
head:   21078041965eb5a2e83d296690a93243611a3c27
commit: c45ede6c27819bb038af313b475fdf50ce755dd6 [3/4] ftrace: Fix -Wmissing-prototypes errors
config: i386-randconfig-r001-20211014 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/commit/?id=c45ede6c27819bb038af313b475fdf50ce755dd6
        git remote add gustavoars https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
        git fetch --no-tags gustavoars for-next/cast-function
        git checkout c45ede6c27819bb038af313b475fdf50ce755dd6
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/trace/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/perf_event.h:49,
                    from include/linux/trace_events.h:10,
                    from kernel/trace/synth_event_gen_test.c:9:
>> include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration
      49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
         |                                         ^~~~~~~~~~~
--
   In file included from kernel/trace/ftrace.c:29:
>> include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration
      49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
         |                                         ^~~~~~~~~~~
   kernel/trace/ftrace.c:297:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
     297 | int __register_ftrace_function(struct ftrace_ops *ops)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:340:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
     340 | int __unregister_ftrace_function(struct ftrace_ops *ops)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:579:5: warning: no previous prototype for 'ftrace_profile_pages_init' [-Wmissing-prototypes]
     579 | int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:3871:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
    3871 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
         |               ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:7029:6: error: conflicting types for 'arch_ftrace_ops_list_func'
    7029 | void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from kernel/trace/ftrace.c:29:
   include/linux/ftrace.h:48:6: note: previous declaration of 'arch_ftrace_ops_list_func' was here
      48 | void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from kernel/trace/trace.c:31:
>> include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration
      49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
         |                                         ^~~~~~~~~~~
   kernel/trace/trace.c: In function 'trace_check_vprintf':
   kernel/trace/trace.c:3837:3: warning: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    3837 |   trace_seq_vprintf(&iter->seq, iter->fmt, ap);
         |   ^~~~~~~~~~~~~~~~~
   kernel/trace/trace.c:3892:3: warning: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    3892 |   trace_seq_vprintf(&iter->seq, p, ap);
         |   ^~~~~~~~~~~~~~~~~
--
   In file included from kernel/trace/trace_output.c:10:
>> include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration
      49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
         |                                         ^~~~~~~~~~~
   kernel/trace/trace_output.c: In function 'trace_output_raw':
   kernel/trace/trace_output.c:331:2: warning: function 'trace_output_raw' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     331 |  trace_seq_vprintf(s, trace_event_format(iter, fmt), ap);
         |  ^~~~~~~~~~~~~~~~~
--
   In file included from kernel/trace/trace_preemptirq.c:11:
>> include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration
      49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
         |                                         ^~~~~~~~~~~
   kernel/trace/trace_preemptirq.c:88:16: warning: no previous prototype for 'trace_hardirqs_on_caller' [-Wmissing-prototypes]
      88 | __visible void trace_hardirqs_on_caller(unsigned long caller_addr)
         |                ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/trace_preemptirq.c:103:16: warning: no previous prototype for 'trace_hardirqs_off_caller' [-Wmissing-prototypes]
     103 | __visible void trace_hardirqs_off_caller(unsigned long caller_addr)
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from kernel/trace/fgraph.c:11:
>> include/linux/ftrace.h:49:41: warning: 'struct ftrace_regs' declared inside parameter list will not be visible outside of this definition or declaration
      49 |           struct ftrace_ops *op, struct ftrace_regs *fregs);
         |                                         ^~~~~~~~~~~
   kernel/trace/fgraph.c:232:15: warning: no previous prototype for 'ftrace_return_to_handler' [-Wmissing-prototypes]
     232 | unsigned long ftrace_return_to_handler(unsigned long frame_pointer)
         |               ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/fgraph.c:347:6: warning: no previous prototype for 'ftrace_graph_sleep_time_control' [-Wmissing-prototypes]
     347 | void ftrace_graph_sleep_time_control(bool enable)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +49 include/linux/ftrace.h

    32	
    33	#ifdef CONFIG_FUNCTION_TRACER
    34	struct ftrace_ops;
    35	/*
    36	 * If the arch's mcount caller does not support all of ftrace's
    37	 * features, then it must call an indirect function that
    38	 * does. Or at least does enough to prevent any unwelcome side effects.
    39	 *
    40	 * Also define the function prototype that these architectures use
    41	 * to call the ftrace_ops_list_func().
    42	 */
    43	#if !ARCH_SUPPORTS_FTRACE_OPS
    44	# define FTRACE_FORCE_LIST_FUNC 1
    45	void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip);
    46	#else
    47	# define FTRACE_FORCE_LIST_FUNC 0
    48	void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
  > 49				       struct ftrace_ops *op, struct ftrace_regs *fregs);
    50	#endif
    51	#endif /* CONFIG_FUNCTION_TRACER */
    52	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (42199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ