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: <202204161223.q212wtZL-lkp@intel.com>
Date:   Sat, 16 Apr 2022 12:49:31 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luis Chamberlain <mcgrof@...nel.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [mcgrof:sysctl-testing 21/24] kernel/trace/ftrace.c:7884:2: error:
 use of undeclared identifier 'saved_ftrace_func'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-testing
head:   f219482651c5469dd3a6fab22c7be9fb763c26ef
commit: ae3e836e7177c547d2ae3f51d20208462e623c57 [21/24] ftrace: fix building with SYSCTL=n but DYNAMIC_FTRACE=y
config: x86_64-randconfig-a001 (https://download.01.org/0day-ci/archive/20220416/202204161223.q212wtZL-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 8e43cbab33765c476337571e5ed11b005199dd0d)
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/mcgrof/linux.git/commit/?id=ae3e836e7177c547d2ae3f51d20208462e623c57
        git remote add mcgrof https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
        git fetch --no-tags mcgrof sysctl-testing
        git checkout ae3e836e7177c547d2ae3f51d20208462e623c57
        # 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

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

All errors (new ones prefixed by >>):

>> kernel/trace/ftrace.c:7884:2: error: use of undeclared identifier 'saved_ftrace_func'
           saved_ftrace_func = NULL;
           ^
>> kernel/trace/ftrace.c:7886:6: error: use of undeclared identifier 'ftrace_start_up'
           if (ftrace_start_up) {
               ^
>> kernel/trace/ftrace.c:7887:13: error: use of undeclared identifier 'FTRACE_UPDATE_CALLS'
                   command = FTRACE_UPDATE_CALLS;
                             ^
>> kernel/trace/ftrace.c:7889:15: error: use of undeclared identifier 'FTRACE_START_FUNC_RET'
                           command |= FTRACE_START_FUNC_RET;
                                      ^
>> kernel/trace/ftrace.c:7890:3: error: implicit declaration of function 'ftrace_startup_enable' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   ftrace_startup_enable(command);
                   ^
   kernel/trace/ftrace.c:7890:3: note: did you mean 'ftrace_startup_all'?
   kernel/trace/ftrace.c:7234:20: note: 'ftrace_startup_all' declared here
   static inline void ftrace_startup_all(int command) { }
                      ^
   kernel/trace/ftrace.c:7902:6: error: use of undeclared identifier 'ftrace_start_up'
           if (ftrace_start_up) {
               ^
>> kernel/trace/ftrace.c:7903:13: error: use of undeclared identifier 'FTRACE_DISABLE_CALLS'
                   command = FTRACE_DISABLE_CALLS;
                             ^
>> kernel/trace/ftrace.c:7905:15: error: use of undeclared identifier 'FTRACE_STOP_FUNC_RET'
                           command |= FTRACE_STOP_FUNC_RET;
                                      ^
>> kernel/trace/ftrace.c:7906:3: error: implicit declaration of function 'ftrace_run_update_code' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   ftrace_run_update_code(command);
                   ^
   9 errors generated.


vim +/saved_ftrace_func +7884 kernel/trace/ftrace.c

  7874	
  7875	#ifdef CONFIG_SYSCTL
  7876	static void ftrace_startup_sysctl(void)
  7877	{
  7878		int command;
  7879	
  7880		if (unlikely(ftrace_disabled))
  7881			return;
  7882	
  7883		/* Force update next time */
> 7884		saved_ftrace_func = NULL;
  7885		/* ftrace_start_up is true if we want ftrace running */
> 7886		if (ftrace_start_up) {
> 7887			command = FTRACE_UPDATE_CALLS;
  7888			if (ftrace_graph_active)
> 7889				command |= FTRACE_START_FUNC_RET;
> 7890			ftrace_startup_enable(command);
  7891		}
  7892	}
  7893	
  7894	static void ftrace_shutdown_sysctl(void)
  7895	{
  7896		int command;
  7897	
  7898		if (unlikely(ftrace_disabled))
  7899			return;
  7900	
  7901		/* ftrace_start_up is true if ftrace is running */
  7902		if (ftrace_start_up) {
> 7903			command = FTRACE_DISABLE_CALLS;
  7904			if (ftrace_graph_active)
> 7905				command |= FTRACE_STOP_FUNC_RET;
> 7906			ftrace_run_update_code(command);
  7907		}
  7908	}
  7909	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ