netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: kbuild-all@lists.01.org, netdev <netdev@vger.kernel.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next 02/19] lib: add tests for reference tracker
Date: Thu, 2 Dec 2021 17:03:42 +0800	[thread overview]
Message-ID: <202112021600.8HBrwOX4-lkp@intel.com> (raw)
In-Reply-To: <20211202032139.3156411-3-eric.dumazet@gmail.com>

Hi Eric,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Eric-Dumazet/net-add-preliminary-netdev-refcount-tracking/20211202-112353
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8057cbb8335cf6d419866737504473833e1d128a
config: sparc-buildonly-randconfig-r005-20211202 (https://download.01.org/0day-ci/archive/20211202/202112021600.8HBrwOX4-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 11.2.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://github.com/0day-ci/linux/commit/5da0cdb1848fae9fb2d9d749bb94e568e2493df8
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Eric-Dumazet/net-add-preliminary-netdev-refcount-tracking/20211202-112353
        git checkout 5da0cdb1848fae9fb2d9d749bb94e568e2493df8
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sparc SHELL=/bin/bash arch/sparc/

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 arch/sparc/kernel/stacktrace.c:11:
   arch/sparc/kernel/kstack.h: In function 'kstack_valid':
>> arch/sparc/kernel/kstack.h:23:13: error: 'hardirq_stack' undeclared (first use in this function)
      23 |         if (hardirq_stack[tp->cpu]) {
         |             ^~~~~~~~~~~~~
   arch/sparc/kernel/kstack.h:23:13: note: each undeclared identifier is reported only once for each function it appears in
>> arch/sparc/kernel/kstack.h:28:40: error: 'softirq_stack' undeclared (first use in this function)
      28 |                 base = (unsigned long) softirq_stack[tp->cpu];
         |                                        ^~~~~~~~~~~~~
   arch/sparc/kernel/kstack.h: In function 'kstack_is_trap_frame':
   arch/sparc/kernel/kstack.h:46:13: error: 'hardirq_stack' undeclared (first use in this function)
      46 |         if (hardirq_stack[tp->cpu]) {
         |             ^~~~~~~~~~~~~
   arch/sparc/kernel/kstack.h:51:40: error: 'softirq_stack' undeclared (first use in this function)
      51 |                 base = (unsigned long) softirq_stack[tp->cpu];
         |                                        ^~~~~~~~~~~~~
>> arch/sparc/kernel/kstack.h:59:18: error: 'struct pt_regs' has no member named 'magic'
      59 |         if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC)
         |                  ^~
>> arch/sparc/kernel/kstack.h:59:39: error: 'PT_REGS_MAGIC' undeclared (first use in this function); did you mean 'PT_V9_MAGIC'?
      59 |         if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC)
         |                                       ^~~~~~~~~~~~~
         |                                       PT_V9_MAGIC
   arch/sparc/kernel/kstack.h: In function 'set_hardirq_stack':
   arch/sparc/kernel/kstack.h:67:30: error: 'hardirq_stack' undeclared (first use in this function); did you mean 'set_hardirq_stack'?
      67 |         void *orig_sp, *sp = hardirq_stack[smp_processor_id()];
         |                              ^~~~~~~~~~~~~
         |                              set_hardirq_stack
   arch/sparc/kernel/stacktrace.c: In function '__save_stack_trace':
>> arch/sparc/kernel/stacktrace.c:46:35: error: 'struct pt_regs' has no member named 'tstate'
      46 |                         if (!(regs->tstate & TSTATE_PRIV))
         |                                   ^~
>> arch/sparc/kernel/stacktrace.c:46:46: error: 'TSTATE_PRIV' undeclared (first use in this function)
      46 |                         if (!(regs->tstate & TSTATE_PRIV))
         |                                              ^~~~~~~~~~~
>> arch/sparc/kernel/stacktrace.c:48:36: error: 'struct pt_regs' has no member named 'tpc'; did you mean 'pc'?
      48 |                         pc = regs->tpc;
         |                                    ^~~
         |                                    pc

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for STACKTRACE
   Depends on STACKTRACE_SUPPORT
   Selected by
   - STACKDEPOT


vim +/hardirq_stack +23 arch/sparc/kernel/kstack.h

4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12   9  
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  10  /* SP must be STACK_BIAS adjusted already.  */
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  11  static inline bool kstack_valid(struct thread_info *tp, unsigned long sp)
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  12  {
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  13  	unsigned long base = (unsigned long) tp;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  14  
232486e1e9f348 arch/sparc/kernel/kstack.h   David S. Miller 2010-02-12  15  	/* Stack pointer must be 16-byte aligned.  */
232486e1e9f348 arch/sparc/kernel/kstack.h   David S. Miller 2010-02-12  16  	if (sp & (16UL - 1))
232486e1e9f348 arch/sparc/kernel/kstack.h   David S. Miller 2010-02-12  17  		return false;
232486e1e9f348 arch/sparc/kernel/kstack.h   David S. Miller 2010-02-12  18  
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  19  	if (sp >= (base + sizeof(struct thread_info)) &&
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  20  	    sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  21  		return true;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  22  
6f63e781eaf6a7 arch/sparc64/kernel/kstack.h David S. Miller 2008-08-13 @23  	if (hardirq_stack[tp->cpu]) {
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  24  		base = (unsigned long) hardirq_stack[tp->cpu];
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  25  		if (sp >= base &&
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  26  		    sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  27  			return true;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12 @28  		base = (unsigned long) softirq_stack[tp->cpu];
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  29  		if (sp >= base &&
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  30  		    sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  31  			return true;
6f63e781eaf6a7 arch/sparc64/kernel/kstack.h David S. Miller 2008-08-13  32  	}
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  33  	return false;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  34  }
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  35  
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  36  /* Does "regs" point to a valid pt_regs trap frame?  */
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  37  static inline bool kstack_is_trap_frame(struct thread_info *tp, struct pt_regs *regs)
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  38  {
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  39  	unsigned long base = (unsigned long) tp;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  40  	unsigned long addr = (unsigned long) regs;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  41  
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  42  	if (addr >= base &&
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  43  	    addr <= (base + THREAD_SIZE - sizeof(*regs)))
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  44  		goto check_magic;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  45  
6f63e781eaf6a7 arch/sparc64/kernel/kstack.h David S. Miller 2008-08-13  46  	if (hardirq_stack[tp->cpu]) {
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  47  		base = (unsigned long) hardirq_stack[tp->cpu];
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  48  		if (addr >= base &&
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  49  		    addr <= (base + THREAD_SIZE - sizeof(*regs)))
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  50  			goto check_magic;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  51  		base = (unsigned long) softirq_stack[tp->cpu];
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  52  		if (addr >= base &&
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  53  		    addr <= (base + THREAD_SIZE - sizeof(*regs)))
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  54  			goto check_magic;
6f63e781eaf6a7 arch/sparc64/kernel/kstack.h David S. Miller 2008-08-13  55  	}
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  56  	return false;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  57  
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  58  check_magic:
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12 @59  	if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC)
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  60  		return true;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  61  	return false;
4f70f7a91bffdc arch/sparc64/kernel/kstack.h David S. Miller 2008-08-12  62  

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

  parent reply	other threads:[~2021-12-02  9:04 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  3:21 [PATCH net-next 00/19] net: add preliminary netdev refcount tracking Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 01/19] lib: add reference counting tracking infrastructure Eric Dumazet
2021-12-02  8:12   ` Dmitry Vyukov
2021-12-02 16:05     ` Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 02/19] lib: add tests for reference tracker Eric Dumazet
2021-12-02  3:31   ` Eric Dumazet
2021-12-02  9:03   ` kernel test robot [this message]
2021-12-02 19:25   ` kernel test robot
2021-12-02 19:46     ` Eric Dumazet
2021-12-03  7:37       ` Dmitry Vyukov
2021-12-02  3:21 ` [PATCH net-next 03/19] net: add dev_hold_track() and dev_put_track() helpers Eric Dumazet
2022-05-23 18:03   ` Jakub Kicinski
2022-05-23 18:14     ` Eric Dumazet
2022-05-23 18:26       ` Jakub Kicinski
2021-12-02  3:21 ` [PATCH net-next 04/19] net: add net device refcount tracker to struct netdev_rx_queue Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 05/19] net: add net device refcount tracker to struct netdev_queue Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 06/19] net: add net device refcount tracker to ethtool_phys_id() Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 07/19] net: add net device refcount tracker to dev_ifsioc() Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 08/19] drop_monitor: add net device refcount tracker Eric Dumazet
2021-12-02  5:40   ` kernel test robot
2021-12-02  5:57     ` Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 09/19] net: dst: add net device refcount tracking to dst_entry Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 10/19] ipv6: add net device refcount tracker to rt6_probe_deferred() Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 11/19] sit: add net device refcount tracking to ip_tunnel Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 12/19] ipv6: add net device refcount tracker to struct ip6_tnl Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 13/19] net: add net device refcount tracker to struct neighbour Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 14/19] net: add net device refcount tracker to struct pneigh_entry Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 15/19] net: add net device refcount tracker to struct neigh_parms Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 16/19] net: add net device refcount tracker to struct netdev_adjacent Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 17/19] ipv6: add net device refcount tracker to struct inet6_dev Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 18/19] ipv4: add net device refcount tracker to struct in_device Eric Dumazet
2021-12-02  3:21 ` [PATCH net-next 19/19] net/sched: add net device refcount tracker to struct Qdisc Eric Dumazet
2021-12-02 12:49 ` [PATCH net-next 00/19] net: add preliminary netdev refcount tracking dust.li
2021-12-02 15:13   ` Eric Dumazet
2021-12-03  3:46     ` dust.li
2021-12-03  4:06       ` Eric Dumazet

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=202112021600.8HBrwOX4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.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 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).