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: <202207060701.G7zn7gft-lkp@intel.com>
Date:   Wed, 6 Jul 2022 07:12:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [jolsa-perf:bpf/tramp_22 21/21] kernel/bpf/trampoline.c:916:15:
 error: implicit declaration of function 'set_ftrace_direct'; did you mean
 'modify_ftrace_direct'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/tramp_22
head:   1d891c46bb689a24985cea58f4eddb053d6b1331
commit: 1d891c46bb689a24985cea58f4eddb053d6b1331 [21/21] bpf: Add support to attach multi trampolines
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20220706/202207060701.G7zn7gft-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.3.0
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/jolsa/perf.git/commit/?id=1d891c46bb689a24985cea58f4eddb053d6b1331
        git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
        git fetch --no-tags jolsa-perf bpf/tramp_22
        git checkout 1d891c46bb689a24985cea58f4eddb053d6b1331
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash kernel/

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

All errors (new ones prefixed by >>):

   kernel/bpf/trampoline.c: In function 'bpf_tramp_update_set':
>> kernel/bpf/trampoline.c:916:15: error: implicit declaration of function 'set_ftrace_direct'; did you mean 'modify_ftrace_direct'? [-Werror=implicit-function-declaration]
     916 |         err = set_ftrace_direct(hash);
         |               ^~~~~~~~~~~~~~~~~
         |               modify_ftrace_direct
   cc1: some warnings being treated as errors


vim +916 kernel/bpf/trampoline.c

   868	
   869	static int bpf_tramp_update_set(struct list_head *upd)
   870	{
   871		struct bpf_trampoline *tr;
   872		struct ftrace_hash *hash;
   873		int i, err;
   874	
   875		hash = ftrace_hash_alloc(FTRACE_HASH_MAX_BITS);
   876		if (!hash)
   877			return -ENOMEM;
   878	
   879		list_for_each_entry(tr, upd, update.list) {
   880			struct ftrace_func_entry *entry;
   881			unsigned long direct;
   882	
   883			switch (tr->update.action) {
   884			case BPF_TRAMP_UPDATE_REG:
   885			case BPF_TRAMP_UPDATE_MODIFY:
   886				direct = (unsigned long) tr->update.im->image;
   887				break;
   888			case BPF_TRAMP_UPDATE_UNREG:
   889				direct = 0;
   890				continue;
   891			}
   892	
   893			if (tr->multi.id_multi) {
   894				for (i = 0; i < tr->multi.id_multi->cnt; i++) {
   895					entry = kmalloc(sizeof(*entry), GFP_KERNEL);
   896					if (!entry) {
   897						err = -ENOMEM;
   898						goto out_free;
   899					}
   900					entry->ip = (unsigned long) tr->multi.id_multi->addr[i];
   901					entry->direct = direct;
   902					ftrace_hash_add_entry(hash, entry);
   903				}
   904			} else {
   905				entry = kmalloc(sizeof(*entry), GFP_KERNEL);
   906				if (!entry) {
   907					err = -ENOMEM;
   908					goto out_free;
   909				}
   910				entry->ip = (unsigned long) tr->func.addr;
   911				entry->direct = direct;
   912				ftrace_hash_add_entry(hash, entry);
   913			}
   914		}
   915	
 > 916		err = set_ftrace_direct(hash);
   917	out_free:
   918		ftrace_hash_free(hash);
   919		return err;
   920	}
   921	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ