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]
Message-ID: <202204190949.0dYaK59p-lkp@intel.com>
Date:   Tue, 19 Apr 2022 09:11:53 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mingo-tip:sched/headers 2010/2356]
 kernel/trace/trace_hwlat.c:174:6: warning: no previous prototype for
 function 'trace_hwlat_callback'

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head:   af93551cf39027d176f30b9beafc60a4c130998a
commit: 5fee58017c43400c6eb3db270e91501a39fd1a4e [2010/2356] headers/deps: Remove <linux/hardirq.h> inclusions from headers that don't need it anymore
config: x86_64-randconfig-a016-20220418 (https://download.01.org/0day-ci/archive/20220419/202204190949.0dYaK59p-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 429cbac0390654f90bba18a41799464adf31a5ec)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=5fee58017c43400c6eb3db270e91501a39fd1a4e
        git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
        git fetch --no-tags mingo-tip sched/headers
        git checkout 5fee58017c43400c6eb3db270e91501a39fd1a4e
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 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 >>):

>> kernel/trace/trace_hwlat.c:174:6: warning: no previous prototype for function 'trace_hwlat_callback' [-Wmissing-prototypes]
   void trace_hwlat_callback(bool enter)
        ^
   kernel/trace/trace_hwlat.c:174:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void trace_hwlat_callback(bool enter)
   ^
   static 
   1 warning generated.


vim +/trace_hwlat_callback +174 kernel/trace/trace_hwlat.c

e7c15cd8a11333 Steven Rostedt (Red Hat    2016-06-23  173) 
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04 @174) void trace_hwlat_callback(bool enter)
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  175) {
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  176  	struct hwlat_kthread_data *kdata = get_cpu_data();
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  177  
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  178  	if (!kdata->kthread)
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  179) 		return;
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  180) 
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  181) 	/*
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  182) 	 * Currently trace_clock_local() calls sched_clock() and the
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  183) 	 * generic version is not NMI safe.
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  184) 	 */
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  185) 	if (!IS_ENABLED(CONFIG_GENERIC_SCHED_CLOCK)) {
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  186) 		if (enter)
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  187  			kdata->nmi_ts_start = time_get();
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  188) 		else
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  189  			kdata->nmi_total_ts += time_get() - kdata->nmi_ts_start;
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  190) 	}
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  191) 
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  192) 	if (enter)
f46b16520a087e Daniel Bristot de Oliveira 2021-06-22  193  		kdata->nmi_count++;
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  194) }
7b2c86250122de Steven Rostedt (Red Hat    2016-08-04  195) 

:::::: The code at line 174 was first introduced by commit
:::::: 7b2c86250122de316cbab8754050622ead04af39 tracing: Add NMI tracing in hwlat detector

:::::: TO: Steven Rostedt (Red Hat) <rostedt@...dmis.org>
:::::: CC: Steven Rostedt <rostedt@...dmis.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ