From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v4 4/5] tracing: Add a backward-compatibility check for synthetic event creation
Date: Fri, 18 Dec 2020 14:39:52 +0800 [thread overview]
Message-ID: <202012181422.fcWUCC5H-lkp@intel.com> (raw)
In-Reply-To: <10708db9327a6db3e8cdd9639504923e6629ae85.1608238451.git.zanussi@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 13420 bytes --]
Hi Tom,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on trace/for-next]
[also build test WARNING on linux/master linus/master v5.10 next-20201217]
[cannot apply to tip/perf/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Tom-Zanussi/tracing-More-synthetic-event-error-fixes/20201218-052110
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: riscv-randconfig-r014-20201217 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project cee1e7d14f4628d6174b33640d502bff3b54ae45)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/aa73dabdbd071e2cb537b974c0b4308d24f8d4ef
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tom-Zanussi/tracing-More-synthetic-event-error-fixes/20201218-052110
git checkout aa73dabdbd071e2cb537b974c0b4308d24f8d4ef
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:564:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inw(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:56:76: note: expanded from macro 'inw'
#define inw(c) ({ u16 __v; __io_pbr(); __v = readw_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:88:76: note: expanded from macro 'readw_cpu'
#define readw_cpu(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from kernel/trace/trace_events_synth.c:18:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:572:9: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return inl(addr);
^~~~~~~~~
arch/riscv/include/asm/io.h:57:76: note: expanded from macro 'inl'
#define inl(c) ({ u32 __v; __io_pbr(); __v = readl_cpu((void*)(PCI_IOBASE + (c))); __io_par(__v); __v; })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:89:76: note: expanded from macro 'readl_cpu'
#define readl_cpu(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from kernel/trace/trace_events_synth.c:18:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:580:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outb(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:59:68: note: expanded from macro 'outb'
#define outb(v,c) ({ __io_pbw(); writeb_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:91:52: note: expanded from macro 'writeb_cpu'
#define writeb_cpu(v, c) ((void)__raw_writeb((v), (c)))
^
In file included from kernel/trace/trace_events_synth.c:18:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:588:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outw(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:60:68: note: expanded from macro 'outw'
#define outw(v,c) ({ __io_pbw(); writew_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:92:76: note: expanded from macro 'writew_cpu'
#define writew_cpu(v, c) ((void)__raw_writew((__force u16)cpu_to_le16(v), (c)))
^
In file included from kernel/trace/trace_events_synth.c:18:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:596:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
outl(value, addr);
^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/io.h:61:68: note: expanded from macro 'outl'
#define outl(v,c) ({ __io_pbw(); writel_cpu((v),(void*)(PCI_IOBASE + (c))); __io_paw(); })
~~~~~~~~~~ ^
arch/riscv/include/asm/mmio.h:93:76: note: expanded from macro 'writel_cpu'
#define writel_cpu(v, c) ((void)__raw_writel((__force u32)cpu_to_le32(v), (c)))
^
In file included from kernel/trace/trace_events_synth.c:18:
In file included from include/linux/trace_events.h:9:
In file included from include/linux/hardirq.h:10:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:149:
include/asm-generic/io.h:1005:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> kernel/trace/trace_events_synth.c:1508:6: warning: variable 'save_argv' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!argc)
^~~~~
kernel/trace/trace_events_synth.c:1564:12: note: uninitialized use occurs here
argv_free(save_argv);
^~~~~~~~~
kernel/trace/trace_events_synth.c:1508:2: note: remove the 'if' if its condition is always false
if (!argc)
^~~~~~~~~~
kernel/trace/trace_events_synth.c:1496:33: note: initialize the variable 'save_argv' to silence this warning
char *name, **argv, **save_argv;
^
= NULL
>> kernel/trace/trace_events_synth.c:1508:6: warning: variable 'buf' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (!argc)
^~~~~
kernel/trace/trace_events_synth.c:1566:9: note: uninitialized use occurs here
return buf;
^~~
kernel/trace/trace_events_synth.c:1508:2: note: remove the 'if' if its condition is always false
if (!argc)
^~~~~~~~~~
kernel/trace/trace_events_synth.c:1500:11: note: initialize the variable 'buf' to silence this warning
char *buf;
^
= NULL
9 warnings generated.
/tmp/trace_events_synth-97fa74.s: Assembler messages:
/tmp/trace_events_synth-97fa74.s:3701: Error: unrecognized opcode `zext.b a2,a2'
/tmp/trace_events_synth-97fa74.s:4380: Error: unrecognized opcode `zext.b s1,s1'
/tmp/trace_events_synth-97fa74.s:4474: Error: unrecognized opcode `zext.b a5,a0'
/tmp/trace_events_synth-97fa74.s:4705: Error: unrecognized opcode `zext.b a1,a1'
/tmp/trace_events_synth-97fa74.s:5065: Error: unrecognized opcode `zext.b a5,a0'
/tmp/trace_events_synth-97fa74.s:5399: Error: unrecognized opcode `zext.b a5,a0'
/tmp/trace_events_synth-97fa74.s:5459: Error: unrecognized opcode `zext.b a5,a0'
/tmp/trace_events_synth-97fa74.s:5516: Error: unrecognized opcode `zext.b a5,a0'
/tmp/trace_events_synth-97fa74.s:5571: Error: unrecognized opcode `zext.b a5,a0'
/tmp/trace_events_synth-97fa74.s:5648: Error: unrecognized opcode `zext.b a5,a0'
/tmp/trace_events_synth-97fa74.s:5682: Error: unrecognized opcode `zext.b a5,a0'
/tmp/trace_events_synth-97fa74.s:7129: Error: unrecognized opcode `zext.b a3,a3'
clang-12: error: assembler command failed with exit code 1 (use -v to see invocation)
vim +1508 kernel/trace/trace_events_synth.c
1492
1493 static char *insert_semicolons(const char *raw_command)
1494 {
1495 int i, argc, consumed = 0, n_fields = 0, semis_added = 0;
1496 char *name, **argv, **save_argv;
1497 int ret = -EINVAL;
1498 struct seq_buf s;
1499 bool added_semi;
1500 char *buf;
1501
1502 argc = 0;
1503
1504 argv = argv_split(GFP_KERNEL, raw_command, &argc);
1505 if (!argv)
1506 return NULL;
1507
> 1508 if (!argc)
1509 goto out;
1510
1511 name = argv[0];
1512 save_argv = argv;
1513 argv++;
1514 argc--;
1515
1516 buf = kzalloc(MAX_DYNEVENT_CMD_LEN, GFP_KERNEL);
1517 if (!buf) {
1518 ret = -ENOMEM;
1519 goto err;
1520 }
1521
1522 seq_buf_init(&s, buf, MAX_DYNEVENT_CMD_LEN);
1523
1524 seq_buf_puts(&s, name);
1525 seq_buf_putc(&s, ' ');
1526
1527 if (name[0] == '\0' || argc < 1)
1528 goto err;
1529
1530 for (i = 0; i < argc - 1; i++) {
1531 if (strcmp(argv[i], ";") == 0) {
1532 seq_buf_puts(&s, " ; ");
1533 continue;
1534 }
1535
1536 if (n_fields == SYNTH_FIELDS_MAX)
1537 goto err;
1538
1539 ret = save_synth_field(argc - i, &argv[i], &consumed,
1540 &s, &added_semi);
1541 if (ret)
1542 goto err;
1543
1544 if (added_semi)
1545 semis_added++;
1546
1547 i += consumed - 1;
1548 }
1549
1550 if (i < argc && strcmp(argv[i], ";") != 0)
1551 goto err;
1552
1553 if (!semis_added) {
1554 kfree(buf);
1555 buf = NULL;
1556 goto out;
1557 }
1558
1559 if (WARN_ON_ONCE(!seq_buf_buffer_left(&s)))
1560 goto err;
1561
1562 buf[s.len] = '\0';
1563 out:
1564 argv_free(save_argv);
1565
1566 return buf;
1567 err:
1568 kfree(buf);
1569 buf = ERR_PTR(ret);
1570
1571 goto out;
1572 }
1573
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 19162 bytes --]
next prev parent reply other threads:[~2020-12-18 6:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 21:14 [PATCH v4 0/5] tracing: More synthetic event error fixes Tom Zanussi
2020-12-17 21:14 ` [PATCH v4 1/5] tracing/dynevent: Delegate parsing to create function Tom Zanussi
2020-12-17 21:14 ` [PATCH v4 2/5] tracing: Rework synthetic event command parsing Tom Zanussi
2020-12-17 21:14 ` [PATCH v4 3/5] tracing: Update synth command errors Tom Zanussi
2020-12-17 21:14 ` [PATCH v4 4/5] tracing: Add a backward-compatibility check for synthetic event creation Tom Zanussi
2020-12-18 6:39 ` kernel test robot [this message]
2020-12-17 21:14 ` [PATCH v4 5/5] selftests/ftrace: Update synthetic event syntax errors Tom Zanussi
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=202012181422.fcWUCC5H-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.