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: <202302271000.Aj4nMXbZ-lkp@intel.com>
Date:   Mon, 27 Feb 2023 10:17:48 +0800
From:   kernel test robot <lkp@...el.com>
To:     Pu Lehui <pulehui@...wei.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Daniel Borkmann <daniel@...earbox.net>
Subject: arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration
 of function 'patch_text'; did you mean 'path_get'?

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f3a2439f20d918930cc4ae8f76fe1c1afd26958f
commit: 596f2e6f9cf41436a5512a3f278c86da5c5598fb riscv, bpf: Add bpf_arch_text_poke support for RV64
date:   9 days ago
config: riscv-buildonly-randconfig-r002-20230227 (https://download.01.org/0day-ci/archive/20230227/202302271000.Aj4nMXbZ-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 12.1.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/torvalds/linux.git/commit/?id=596f2e6f9cf41436a5512a3f278c86da5c5598fb
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 596f2e6f9cf41436a5512a3f278c86da5c5598fb
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302271000.Aj4nMXbZ-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/riscv/net/bpf_jit_comp64.c: In function 'bpf_arch_text_poke':
>> arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration]
     691 |                 ret = patch_text(ip, new_insns, ninsns);
         |                       ^~~~~~~~~~
         |                       path_get
   cc1: some warnings being treated as errors


vim +691 arch/riscv/net/bpf_jit_comp64.c

   662	
   663	int bpf_arch_text_poke(void *ip, enum bpf_text_poke_type poke_type,
   664			       void *old_addr, void *new_addr)
   665	{
   666		u32 old_insns[4], new_insns[4];
   667		bool is_call = poke_type == BPF_MOD_CALL;
   668		int (*gen_insns)(void *target, void *ip, u32 *insns);
   669		int ninsns = is_call ? 4 : 2;
   670		int ret;
   671	
   672		if (!is_bpf_text_address((unsigned long)ip))
   673			return -ENOTSUPP;
   674	
   675		gen_insns = is_call ? gen_call_or_nops : gen_jump_or_nops;
   676	
   677		ret = gen_insns(old_addr, ip, old_insns);
   678		if (ret)
   679			return ret;
   680	
   681		if (memcmp(ip, old_insns, ninsns * 4))
   682			return -EFAULT;
   683	
   684		ret = gen_insns(new_addr, ip, new_insns);
   685		if (ret)
   686			return ret;
   687	
   688		cpus_read_lock();
   689		mutex_lock(&text_mutex);
   690		if (memcmp(ip, new_insns, ninsns * 4))
 > 691			ret = patch_text(ip, new_insns, ninsns);
   692		mutex_unlock(&text_mutex);
   693		cpus_read_unlock();
   694	
   695		return ret;
   696	}
   697	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ