[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202103051251.3Cwt3EZX-lkp@intel.com>
Date: Fri, 5 Mar 2021 12:44:53 +0800
From: kernel test robot <lkp@...el.com>
To: Tom Zanussi <zanussi@...nel.org>
Cc: kbuild-all@...org, clang-built-linux@...glegroups.com,
linux-kernel@...r.kernel.org,
"Steven Rostedt (VMware)" <rostedt@...dmis.org>
Subject: kernel/trace/trace_events_hist.c:3495:12: warning: stack frame size
of 2112 bytes in function 'action_create'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3cb60ee6323968b694208c4cbd56a7176396e931
commit: bd82631d7ccdc894af2738e47abcba2cb6e7dea9 tracing: Add support for dynamic strings to synthetic events
date: 5 months ago
config: powerpc-randconfig-r035-20210305 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4d90e460bcc7b3e5ff6c7e2e05e974772489c4b8)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bd82631d7ccdc894af2738e47abcba2cb6e7dea9
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bd82631d7ccdc894af2738e47abcba2cb6e7dea9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/trace_events_hist.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/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:213:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/trace_events_hist.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/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:215:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/trace_events_hist.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/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:217:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/trace_events_hist.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/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:219:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/trace/trace_events_hist.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/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:221:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
kernel/trace/trace_events_hist.c:4729:12: warning: stack frame size of 2592 bytes in function 'hist_show' [-Wframe-larger-than=]
static int hist_show(struct seq_file *m, void *v)
^
>> kernel/trace/trace_events_hist.c:3495:12: warning: stack frame size of 2112 bytes in function 'action_create' [-Wframe-larger-than=]
static int action_create(struct hist_trigger_data *hist_data,
^
14 warnings generated.
vim +/action_create +3495 kernel/trace/trace_events_hist.c
c282a386a39771 Tom Zanussi 2018-01-15 3494
7d18a10c316783 Tom Zanussi 2019-02-13 @3495 static int action_create(struct hist_trigger_data *hist_data,
7d18a10c316783 Tom Zanussi 2019-02-13 3496 struct action_data *data)
7d18a10c316783 Tom Zanussi 2019-02-13 3497 {
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3498 struct trace_event_file *file = hist_data->event_file;
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3499) struct trace_array *tr = file->tr;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3500 struct track_data *track_data;
7d18a10c316783 Tom Zanussi 2019-02-13 3501 struct field_var *field_var;
7d18a10c316783 Tom Zanussi 2019-02-13 3502 unsigned int i;
7d18a10c316783 Tom Zanussi 2019-02-13 3503 char *param;
7d18a10c316783 Tom Zanussi 2019-02-13 3504 int ret = 0;
7d18a10c316783 Tom Zanussi 2019-02-13 3505
7d18a10c316783 Tom Zanussi 2019-02-13 3506 if (data->action == ACTION_TRACE)
7d18a10c316783 Tom Zanussi 2019-02-13 3507 return trace_action_create(hist_data, data);
7d18a10c316783 Tom Zanussi 2019-02-13 3508
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3509 if (data->action == ACTION_SNAPSHOT) {
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3510 track_data = track_data_alloc(hist_data->key_size, data, hist_data);
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3511 if (IS_ERR(track_data)) {
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3512 ret = PTR_ERR(track_data);
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3513 goto out;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3514 }
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3515
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3516 ret = tracing_snapshot_cond_enable(file->tr, track_data,
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3517 cond_snapshot_update);
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3518 if (ret)
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3519 track_data_free(track_data);
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3520
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3521 goto out;
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3522 }
a3785b7eca8fd4 Tom Zanussi 2019-02-13 3523
7d18a10c316783 Tom Zanussi 2019-02-13 3524 if (data->action == ACTION_SAVE) {
7d18a10c316783 Tom Zanussi 2019-02-13 3525 if (hist_data->n_save_vars) {
7d18a10c316783 Tom Zanussi 2019-02-13 3526 ret = -EEXIST;
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3527) hist_err(tr, HIST_ERR_TOO_MANY_SAVE_ACTIONS, 0);
7d18a10c316783 Tom Zanussi 2019-02-13 3528 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3529 }
7d18a10c316783 Tom Zanussi 2019-02-13 3530
7d18a10c316783 Tom Zanussi 2019-02-13 3531 for (i = 0; i < data->n_params; i++) {
7d18a10c316783 Tom Zanussi 2019-02-13 3532 param = kstrdup(data->params[i], GFP_KERNEL);
7d18a10c316783 Tom Zanussi 2019-02-13 3533 if (!param) {
7d18a10c316783 Tom Zanussi 2019-02-13 3534 ret = -ENOMEM;
7d18a10c316783 Tom Zanussi 2019-02-13 3535 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3536 }
7d18a10c316783 Tom Zanussi 2019-02-13 3537
7d18a10c316783 Tom Zanussi 2019-02-13 3538 field_var = create_target_field_var(hist_data, NULL, NULL, param);
7d18a10c316783 Tom Zanussi 2019-02-13 3539 if (IS_ERR(field_var)) {
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3540) hist_err(tr, HIST_ERR_FIELD_VAR_CREATE_FAIL,
d0cd871ba0d613 Steven Rostedt (VMware 2019-04-01 3541) errpos(param));
7d18a10c316783 Tom Zanussi 2019-02-13 3542 ret = PTR_ERR(field_var);
7d18a10c316783 Tom Zanussi 2019-02-13 3543 kfree(param);
7d18a10c316783 Tom Zanussi 2019-02-13 3544 goto out;
7d18a10c316783 Tom Zanussi 2019-02-13 3545 }
7d18a10c316783 Tom Zanussi 2019-02-13 3546
7d18a10c316783 Tom Zanussi 2019-02-13 3547 hist_data->save_vars[hist_data->n_save_vars++] = field_var;
7d18a10c316783 Tom Zanussi 2019-02-13 3548 if (field_var->val->flags & HIST_FIELD_FL_STRING)
7d18a10c316783 Tom Zanussi 2019-02-13 3549 hist_data->n_save_var_str++;
7d18a10c316783 Tom Zanussi 2019-02-13 3550 kfree(param);
7d18a10c316783 Tom Zanussi 2019-02-13 3551 }
7d18a10c316783 Tom Zanussi 2019-02-13 3552 }
7d18a10c316783 Tom Zanussi 2019-02-13 3553 out:
7d18a10c316783 Tom Zanussi 2019-02-13 3554 return ret;
7d18a10c316783 Tom Zanussi 2019-02-13 3555 }
7d18a10c316783 Tom Zanussi 2019-02-13 3556
:::::: The code at line 3495 was first introduced by commit
:::::: 7d18a10c316783357fb1b2b649cfcf97c70a7bee tracing: Refactor hist trigger action code
:::::: TO: Tom Zanussi <tom.zanussi@...ux.intel.com>
:::::: CC: Steven Rostedt (VMware) <rostedt@...dmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (19724 bytes)
Powered by blists - more mailing lists