* Re: [PATCH bpf-next v2 2/5] bpf: implement sleepable uprobes by chaining tasks_trace and normal rcu
[not found] <588dd77e9e7424e0abc0e0e624524ef8a2c7b847.1651532419.git.delyank@fb.com>
@ 2022-05-03 8:48 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-03 8:48 UTC (permalink / raw)
To: Delyan Kratunov, daniel@iogearbox.net, ast@kernel.org,
andrii@kernel.org, bpf@vger.kernel.org
Cc: llvm, kbuild-all
Hi Delyan,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/intel-lab-lkp/linux/commits/Delyan-Kratunov/sleepable-uprobe-support/20220503-071247
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: s390-randconfig-r003-20220501 (https://download.01.org/0day-ci/archive/20220503/202205031643.UGYirnXb-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 363b3a645a1e30011cc8da624f13dac5fd915628)
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
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/cfa0f114829902b579da16d7520a39317905c502
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Delyan-Kratunov/sleepable-uprobe-support/20220503-071247
git checkout cfa0f114829902b579da16d7520a39317905c502
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from kernel/trace/trace_uprobe.c:10:
In file included from include/linux/bpf-cgroup.h:11:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:40:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:37:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from kernel/trace/trace_uprobe.c:10:
In file included from include/linux/bpf-cgroup.h:11:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:40:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:35:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from kernel/trace/trace_uprobe.c:10:
In file included from include/linux/bpf-cgroup.h:11:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:38:
In file included from include/net/net_namespace.h:40:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:75:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> kernel/trace/trace_uprobe.c:1349:9: error: call to undeclared function 'uprobe_call_bpf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
ret = uprobe_call_bpf(call, regs);
^
kernel/trace/trace_uprobe.c:1349:9: note: did you mean 'trace_call_bpf'?
include/linux/trace_events.h:752:28: note: 'trace_call_bpf' declared here
static inline unsigned int trace_call_bpf(struct trace_event_call *call, void *ctx)
^
12 warnings and 1 error generated.
vim +/uprobe_call_bpf +1349 kernel/trace/trace_uprobe.c
1334
1335 static void __uprobe_perf_func(struct trace_uprobe *tu,
1336 unsigned long func, struct pt_regs *regs,
1337 struct uprobe_cpu_buffer *ucb, int dsize)
1338 {
1339 struct trace_event_call *call = trace_probe_event_call(&tu->tp);
1340 struct uprobe_trace_entry_head *entry;
1341 struct hlist_head *head;
1342 void *data;
1343 int size, esize;
1344 int rctx;
1345
1346 if (bpf_prog_array_valid(call)) {
1347 u32 ret;
1348
> 1349 ret = uprobe_call_bpf(call, regs);
1350 if (!ret)
1351 return;
1352 }
1353
1354 esize = SIZEOF_TRACE_ENTRY(is_ret_probe(tu));
1355
1356 size = esize + tu->tp.size + dsize;
1357 size = ALIGN(size + sizeof(u32), sizeof(u64)) - sizeof(u32);
1358 if (WARN_ONCE(size > PERF_MAX_TRACE_SIZE, "profile buffer not large enough"))
1359 return;
1360
1361 preempt_disable();
1362 head = this_cpu_ptr(call->perf_events);
1363 if (hlist_empty(head))
1364 goto out;
1365
1366 entry = perf_trace_buf_alloc(size, NULL, &rctx);
1367 if (!entry)
1368 goto out;
1369
1370 if (is_ret_probe(tu)) {
1371 entry->vaddr[0] = func;
1372 entry->vaddr[1] = instruction_pointer(regs);
1373 data = DATAOF_TRACE_ENTRY(entry, true);
1374 } else {
1375 entry->vaddr[0] = instruction_pointer(regs);
1376 data = DATAOF_TRACE_ENTRY(entry, false);
1377 }
1378
1379 memcpy(data, ucb->buf, tu->tp.size + dsize);
1380
1381 if (size - esize > tu->tp.size + dsize) {
1382 int len = tu->tp.size + dsize;
1383
1384 memset(data + len, 0, size - esize - len);
1385 }
1386
1387 perf_trace_buf_submit(entry, size, rctx, call->event.type, 1, regs,
1388 head, NULL);
1389 out:
1390 preempt_enable();
1391 }
1392
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-03 8:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <588dd77e9e7424e0abc0e0e624524ef8a2c7b847.1651532419.git.delyank@fb.com>
2022-05-03 8:48 ` [PATCH bpf-next v2 2/5] bpf: implement sleepable uprobes by chaining tasks_trace and normal rcu 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;
as well as URLs for NNTP newsgroup(s).