mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [peterz-queue:x86/wip.ibt 22/42] kernel/bpf/trampoline.c:154:26: warning: passing argument 1 of 'ftrace_location' makes integer from pointer without a cast
@ 2022-02-24  2:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-02-24  2:49 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip.ibt
head:   27b6438f414b6a37b60dcd90c8980397586d49db
commit: 28a2850ec958722056cb6679cf68567905223971 [22/42] x86/bpf: Add ENDBR instructions to prologue and trampoline
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220224/202202241056.xqhnicOb-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=28a2850ec958722056cb6679cf68567905223971
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue x86/wip.ibt
        git checkout 28a2850ec958722056cb6679cf68567905223971
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/

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

All warnings (new ones prefixed by >>):

   kernel/bpf/trampoline.c: In function 'register_fentry':
>> kernel/bpf/trampoline.c:154:26: warning: passing argument 1 of 'ftrace_location' makes integer from pointer without a cast [-Wint-conversion]
     154 |  faddr = ftrace_location(ip);
         |                          ^~
         |                          |
         |                          void *
   In file included from kernel/bpf/trampoline.c:6:
   include/linux/ftrace.h:792:59: note: expected 'long unsigned int' but argument is of type 'void *'
     792 | static inline unsigned long ftrace_location(unsigned long ip)
         |                                             ~~~~~~~~~~~~~~^~


vim +/ftrace_location +154 kernel/bpf/trampoline.c

   146	
   147	/* first time registering */
   148	static int register_fentry(struct bpf_trampoline *tr, void *new_addr)
   149	{
   150		void *ip = tr->func.addr;
   151		unsigned long faddr;
   152		int ret;
   153	
 > 154		faddr = ftrace_location(ip);
   155		if (faddr)
   156			tr->func.ftrace_managed = true;
   157	
   158		if (bpf_trampoline_module_get(tr))
   159			return -ENOENT;
   160	
   161		if (tr->func.ftrace_managed)
   162			ret = register_ftrace_direct((long)ip, (long)new_addr);
   163		else
   164			ret = bpf_arch_text_poke(ip, BPF_MOD_CALL, NULL, new_addr);
   165	
   166		if (ret)
   167			bpf_trampoline_module_put(tr);
   168		return ret;
   169	}
   170	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-24  2:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24  2:49 [peterz-queue:x86/wip.ibt 22/42] kernel/bpf/trampoline.c:154:26: warning: passing argument 1 of 'ftrace_location' makes integer from pointer without a cast kernel test robot

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®