mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pu Lehui <pulehui@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'?
Date: Mon, 27 Feb 2023 10:17:48 +0800	[thread overview]
Message-ID: <202302271000.Aj4nMXbZ-lkp@intel.com> (raw)

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@intel.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

                 reply	other threads:[~2023-02-27  2:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202302271000.Aj4nMXbZ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pulehui@huawei.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®