From: kernel test robot <lkp@intel.com> To: Steven Rostedt <rostedt@goodmis.org>, LKML <linux-kernel@vger.kernel.org> Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Ingo Molnar <mingo@kernel.org>, Kees Cook <keescook@chromium.org>, kernel-hardening@lists.openwall.com, Oscar Carter <oscar.carter@gmx.com>, Andrew Morton <akpm@linux-foundation.org>, Linux Memory Management List <linux-mm@kvack.org> Subject: Re: [PATCH] tracing: Use linker magic instead of recasting ftrace_ops_list_func() Date: Thu, 18 Jun 2020 18:06:40 +0800 [thread overview] Message-ID: <202006181813.IktfZVbj%lkp@intel.com> (raw) In-Reply-To: <20200617165616.52241bde@oasis.local.home> [-- Attachment #1: Type: text/plain, Size: 4946 bytes --] Hi Steven, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on tip/perf/core linus/master v5.8-rc1 next-20200618] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Steven-Rostedt/tracing-Use-linker-magic-instead-of-recasting-ftrace_ops_list_func/20200618-045733 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a5dc8300df75e8b8384b4c82225f1e4a0b4d9b55 config: x86_64-randconfig-a015-20200618 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>, old ones prefixed by <<): kernel/trace/ftrace.c:300:5: warning: no previous prototype for function '__register_ftrace_function' [-Wmissing-prototypes] int __register_ftrace_function(struct ftrace_ops *ops) ^ kernel/trace/ftrace.c:300:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __register_ftrace_function(struct ftrace_ops *ops) ^ static kernel/trace/ftrace.c:343:5: warning: no previous prototype for function '__unregister_ftrace_function' [-Wmissing-prototypes] int __unregister_ftrace_function(struct ftrace_ops *ops) ^ kernel/trace/ftrace.c:343:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __unregister_ftrace_function(struct ftrace_ops *ops) ^ static kernel/trace/ftrace.c:582:5: warning: no previous prototype for function 'ftrace_profile_pages_init' [-Wmissing-prototypes] int ftrace_profile_pages_init(struct ftrace_profile_stat *stat) ^ kernel/trace/ftrace.c:582:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int ftrace_profile_pages_init(struct ftrace_profile_stat *stat) ^ static kernel/trace/ftrace.c:3796:15: warning: no previous prototype for function 'arch_ftrace_match_adjust' [-Wmissing-prototypes] char * __weak arch_ftrace_match_adjust(char *str, const char *search) ^ kernel/trace/ftrace.c:3796:1: note: declare 'static' if the function is not intended to be used outside of this translation unit char * __weak arch_ftrace_match_adjust(char *str, const char *search) ^ static >> kernel/trace/ftrace.c:6854:6: warning: no previous prototype for function 'arch_ftrace_ops_list_func' [-Wmissing-prototypes] void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, ^ kernel/trace/ftrace.c:6854:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, ^ static 5 warnings generated. vim +/arch_ftrace_ops_list_func +6854 kernel/trace/ftrace.c 6836 6837 /* 6838 * Some archs only support passing ip and parent_ip. Even though 6839 * the list function ignores the op parameter, we do not want any 6840 * C side effects, where a function is called without the caller 6841 * sending a third parameter. 6842 * Archs are to support both the regs and ftrace_ops at the same time. 6843 * If they support ftrace_ops, it is assumed they support regs. 6844 * If call backs want to use regs, they must either check for regs 6845 * being NULL, or CONFIG_DYNAMIC_FTRACE_WITH_REGS. 6846 * Note, CONFIG_DYNAMIC_FTRACE_WITH_REGS expects a full regs to be saved. 6847 * An architecture can pass partial regs with ftrace_ops and still 6848 * set the ARCH_SUPPORTS_FTRACE_OPS. 6849 * 6850 * In vmlinux.lds.h, ftrace_ops_list_func() is defined to be 6851 * arch_ftrace_ops_list_func. 6852 */ 6853 #if ARCH_SUPPORTS_FTRACE_OPS > 6854 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, 6855 struct ftrace_ops *op, struct pt_regs *regs) 6856 { 6857 __ftrace_ops_list_func(ip, parent_ip, NULL, regs); 6858 } 6859 #else 6860 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip) 6861 { 6862 __ftrace_ops_list_func(ip, parent_ip, NULL, NULL); 6863 } 6864 #endif 6865 NOKPROBE_SYMBOL(arch_ftrace_ops_list_func); 6866 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 31280 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH] tracing: Use linker magic instead of recasting ftrace_ops_list_func() Date: Thu, 18 Jun 2020 18:06:40 +0800 [thread overview] Message-ID: <202006181813.IktfZVbj%lkp@intel.com> (raw) In-Reply-To: <20200617165616.52241bde@oasis.local.home> [-- Attachment #1: Type: text/plain, Size: 5049 bytes --] Hi Steven, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on tip/perf/core linus/master v5.8-rc1 next-20200618] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Steven-Rostedt/tracing-Use-linker-magic-instead-of-recasting-ftrace_ops_list_func/20200618-045733 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a5dc8300df75e8b8384b4c82225f1e4a0b4d9b55 config: x86_64-randconfig-a015-20200618 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All warnings (new ones prefixed by >>, old ones prefixed by <<): kernel/trace/ftrace.c:300:5: warning: no previous prototype for function '__register_ftrace_function' [-Wmissing-prototypes] int __register_ftrace_function(struct ftrace_ops *ops) ^ kernel/trace/ftrace.c:300:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __register_ftrace_function(struct ftrace_ops *ops) ^ static kernel/trace/ftrace.c:343:5: warning: no previous prototype for function '__unregister_ftrace_function' [-Wmissing-prototypes] int __unregister_ftrace_function(struct ftrace_ops *ops) ^ kernel/trace/ftrace.c:343:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __unregister_ftrace_function(struct ftrace_ops *ops) ^ static kernel/trace/ftrace.c:582:5: warning: no previous prototype for function 'ftrace_profile_pages_init' [-Wmissing-prototypes] int ftrace_profile_pages_init(struct ftrace_profile_stat *stat) ^ kernel/trace/ftrace.c:582:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int ftrace_profile_pages_init(struct ftrace_profile_stat *stat) ^ static kernel/trace/ftrace.c:3796:15: warning: no previous prototype for function 'arch_ftrace_match_adjust' [-Wmissing-prototypes] char * __weak arch_ftrace_match_adjust(char *str, const char *search) ^ kernel/trace/ftrace.c:3796:1: note: declare 'static' if the function is not intended to be used outside of this translation unit char * __weak arch_ftrace_match_adjust(char *str, const char *search) ^ static >> kernel/trace/ftrace.c:6854:6: warning: no previous prototype for function 'arch_ftrace_ops_list_func' [-Wmissing-prototypes] void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, ^ kernel/trace/ftrace.c:6854:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, ^ static 5 warnings generated. vim +/arch_ftrace_ops_list_func +6854 kernel/trace/ftrace.c 6836 6837 /* 6838 * Some archs only support passing ip and parent_ip. Even though 6839 * the list function ignores the op parameter, we do not want any 6840 * C side effects, where a function is called without the caller 6841 * sending a third parameter. 6842 * Archs are to support both the regs and ftrace_ops at the same time. 6843 * If they support ftrace_ops, it is assumed they support regs. 6844 * If call backs want to use regs, they must either check for regs 6845 * being NULL, or CONFIG_DYNAMIC_FTRACE_WITH_REGS. 6846 * Note, CONFIG_DYNAMIC_FTRACE_WITH_REGS expects a full regs to be saved. 6847 * An architecture can pass partial regs with ftrace_ops and still 6848 * set the ARCH_SUPPORTS_FTRACE_OPS. 6849 * 6850 * In vmlinux.lds.h, ftrace_ops_list_func() is defined to be 6851 * arch_ftrace_ops_list_func. 6852 */ 6853 #if ARCH_SUPPORTS_FTRACE_OPS > 6854 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, 6855 struct ftrace_ops *op, struct pt_regs *regs) 6856 { 6857 __ftrace_ops_list_func(ip, parent_ip, NULL, regs); 6858 } 6859 #else 6860 void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip) 6861 { 6862 __ftrace_ops_list_func(ip, parent_ip, NULL, NULL); 6863 } 6864 #endif 6865 NOKPROBE_SYMBOL(arch_ftrace_ops_list_func); 6866 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org [-- Attachment #2: config.gz --] [-- Type: application/gzip, Size: 31280 bytes --]
next prev parent reply other threads:[~2020-06-18 10:19 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-17 20:56 [PATCH] tracing: Use linker magic instead of recasting ftrace_ops_list_func() Steven Rostedt 2020-06-17 21:30 ` Jann Horn 2020-06-17 21:30 ` Jann Horn 2020-06-17 22:36 ` Steven Rostedt 2020-06-17 23:12 ` Jann Horn 2020-06-17 23:12 ` Jann Horn 2020-06-18 16:41 ` Steven Rostedt 2020-06-18 17:58 ` Jann Horn 2020-06-18 17:58 ` Jann Horn 2020-06-18 9:13 ` kernel test robot 2020-06-18 9:13 ` kernel test robot 2020-06-18 10:06 ` kernel test robot [this message] 2020-06-18 10:06 ` kernel test robot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=202006181813.IktfZVbj%lkp@intel.com \ --to=lkp@intel.com \ --cc=akpm@linux-foundation.org \ --cc=clang-built-linux@googlegroups.com \ --cc=kbuild-all@lists.01.org \ --cc=keescook@chromium.org \ --cc=kernel-hardening@lists.openwall.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=mingo@kernel.org \ --cc=oscar.carter@gmx.com \ --cc=rostedt@goodmis.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.