linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, live-patching@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Jessica Yu <jeyu@redhat.com>, Jiri Kosina <jikos@kernel.org>,
	Miroslav Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH v2 1/2] livepatch: introduce shadow variable API
Date: Fri, 7 Jul 2017 14:05:38 -0400	[thread overview]
Message-ID: <20170707180538.4mknmvpwjhj4zo3o@redhat.com> (raw)
In-Reply-To: <201706302159.CP4d0hZY%fengguang.wu@intel.com>

On Fri, Jun 30, 2017 at 09:49:46PM +0800, kbuild test robot wrote:
> Date: Fri, 30 Jun 2017 21:49:46 +0800
> From: kbuild test robot <lkp@intel.com>
> To: Joe Lawrence <joe.lawrence@redhat.com>
> Cc: kbuild-all@01.org, live-patching@vger.kernel.org,
>  linux-kernel@vger.kernel.org, Josh Poimboeuf <jpoimboe@redhat.com>,
>  Jessica Yu <jeyu@redhat.com>, Jiri Kosina <jikos@kernel.org>, Miroslav
>  Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>
> Subject: Re: [PATCH v2 1/2] livepatch: introduce shadow variable API
> User-Agent: Mutt/1.5.23 (2014-03-12)
> 
> Hi Joe,
> 
> [auto build test WARNING on jikos-livepatching/for-next]
> [also build test WARNING on v4.12-rc7 next-20170630]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Joe-Lawrence/livepatch-introduce-shadow-variable-API/20170630-061942
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching.git for-next
> config: s390-performance_defconfig (attached as .config)
> compiler: s390x-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
>         wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=s390 
> 
> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from include/linux/irqflags.h:15:0,
>                     from arch/s390/include/asm/processor.h:35,
>                     from arch/s390/include/asm/thread_info.h:24,
>                     from include/linux/thread_info.h:37,
>                     from arch/s390/include/asm/preempt.h:5,
>                     from include/linux/preempt.h:80,
>                     from include/linux/spinlock.h:50,
>                     from include/linux/rcupdate.h:38,
>                     from include/linux/rculist.h:10,
>                     from include/linux/hashtable.h:13,
>                     from kernel/livepatch/shadow.c:49:
>    kernel/livepatch/shadow.c: In function '_klp_shadow_attach':
> >> arch/s390/include/asm/irqflags.h:63:12: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      if (flags & ARCH_IRQ_ENABLED)
>                ^
>    kernel/livepatch/shadow.c:135:16: note: 'flags' was declared here
>      unsigned long flags;
>                    ^~~~~
> --
>    In file included from include/linux/irqflags.h:15:0,
>                     from arch/s390/include/asm/processor.h:35,
>                     from arch/s390/include/asm/thread_info.h:24,
>                     from include/linux/thread_info.h:37,
>                     from arch/s390/include/asm/preempt.h:5,
>                     from include/linux/preempt.h:80,
>                     from include/linux/spinlock.h:50,
>                     from include/linux/rcupdate.h:38,
>                     from include/linux/rculist.h:10,
>                     from include/linux/hashtable.h:13,
>                     from kernel//livepatch/shadow.c:49:
>    kernel//livepatch/shadow.c: In function '_klp_shadow_attach':
> >> arch/s390/include/asm/irqflags.h:63:12: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
>      if (flags & ARCH_IRQ_ENABLED)
>                ^
>    kernel//livepatch/shadow.c:135:16: note: 'flags' was declared here
>      unsigned long flags;
>                    ^~~~~
> 
> vim +/flags +63 arch/s390/include/asm/irqflags.h
> 
> 94c12cc7d include/asm-s390/irqflags.h      Martin Schwidefsky    2006-09-28  47  }
> 94c12cc7d include/asm-s390/irqflags.h      Martin Schwidefsky    2006-09-28  48  
> f433c4aec arch/s390/include/asm/irqflags.h Steven Rostedt        2011-07-24  49  static inline notrace void arch_local_irq_disable(void)
> df9ee2927 arch/s390/include/asm/irqflags.h David Howells         2010-10-07  50  {
> df9ee2927 arch/s390/include/asm/irqflags.h David Howells         2010-10-07  51  	arch_local_irq_save();
> df9ee2927 arch/s390/include/asm/irqflags.h David Howells         2010-10-07  52  }
> 1f194a4c3 include/asm-s390/irqflags.h      Heiko Carstens        2006-07-03  53  
> f433c4aec arch/s390/include/asm/irqflags.h Steven Rostedt        2011-07-24  54  static inline notrace void arch_local_irq_enable(void)
> 94c12cc7d include/asm-s390/irqflags.h      Martin Schwidefsky    2006-09-28  55  {
> df9ee2927 arch/s390/include/asm/irqflags.h David Howells         2010-10-07  56  	__arch_local_irq_stosm(0x03);
> 94c12cc7d include/asm-s390/irqflags.h      Martin Schwidefsky    2006-09-28  57  }
> 1f194a4c3 include/asm-s390/irqflags.h      Heiko Carstens        2006-07-03  58  
> 204ee2c56 arch/s390/include/asm/irqflags.h Christian Borntraeger 2016-01-11  59  /* This only restores external and I/O interrupt state */
> f433c4aec arch/s390/include/asm/irqflags.h Steven Rostedt        2011-07-24  60  static inline notrace void arch_local_irq_restore(unsigned long flags)
> df9ee2927 arch/s390/include/asm/irqflags.h David Howells         2010-10-07  61  {
> 204ee2c56 arch/s390/include/asm/irqflags.h Christian Borntraeger 2016-01-11  62  	/* only disabled->disabled and disabled->enabled is valid */
> 204ee2c56 arch/s390/include/asm/irqflags.h Christian Borntraeger 2016-01-11 @63  	if (flags & ARCH_IRQ_ENABLED)
> 204ee2c56 arch/s390/include/asm/irqflags.h Christian Borntraeger 2016-01-11  64  		arch_local_irq_enable();
> df9ee2927 arch/s390/include/asm/irqflags.h David Howells         2010-10-07  65  }
> df9ee2927 arch/s390/include/asm/irqflags.h David Howells         2010-10-07  66  
> f433c4aec arch/s390/include/asm/irqflags.h Steven Rostedt        2011-07-24  67  static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
> 1f194a4c3 include/asm-s390/irqflags.h      Heiko Carstens        2006-07-03  68  {
> 204ee2c56 arch/s390/include/asm/irqflags.h Christian Borntraeger 2016-01-11  69  	return !(flags & ARCH_IRQ_ENABLED);
> 1f194a4c3 include/asm-s390/irqflags.h      Heiko Carstens        2006-07-03  70  }
> 1f194a4c3 include/asm-s390/irqflags.h      Heiko Carstens        2006-07-03  71  
> 
> :::::: The code at line 63 was first introduced by commit
> :::::: 204ee2c5643199a25181ec04ea645d00709c2a5a s390/irqflags: optimize irq restore
> 
> :::::: TO: Christian Borntraeger <borntraeger@de.ibm.com>
> :::::: CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Presumably the 0-day built bot doesn't like this construct:

	static void *_klp_shadow_attach(void *obj, unsigned long num, void *new_data,
					size_t new_size, gfp_t gfp_flags,
					bool lock)
	{
		unsigned long flags;
		...
		if (lock)
			spin_lock_irqsave(&klp_shadow_lock, flags);
		hash_add_rcu(klp_shadow_hash, &shadow->node, (unsigned long)obj);
		if (lock)
			spin_unlock_irqrestore(&klp_shadow_lock, flags);

Perhaps explicitly initializing flags to 0, or combining the conditional
will appease it?

-- Joe

  reply	other threads:[~2017-07-07 18:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 15:37 [PATCH v2 0/2] livepatch: add shadow variable API Joe Lawrence
2017-06-28 15:37 ` [PATCH v2 1/2] livepatch: introduce " Joe Lawrence
2017-06-30 13:49   ` kbuild test robot
2017-07-07 18:05     ` Joe Lawrence [this message]
2017-07-14  0:41   ` Josh Poimboeuf
2017-07-17 15:35     ` Miroslav Benes
2017-07-18 13:00       ` Petr Mladek
2017-07-18 19:36         ` Joe Lawrence
2017-07-19 15:19           ` Petr Mladek
2017-07-19 18:50             ` Miroslav Benes
2017-07-17 15:29   ` Miroslav Benes
2017-07-18 20:21     ` Joe Lawrence
2017-07-19  2:28       ` Josh Poimboeuf
2017-07-19 19:01       ` Miroslav Benes
2017-07-20 14:45         ` Miroslav Benes
2017-07-20 15:48           ` Joe Lawrence
2017-07-20 20:23             ` Josh Poimboeuf
2017-07-21  8:42             ` Petr Mladek
2017-07-21  8:59             ` Miroslav Benes
2017-07-18 12:45   ` Petr Mladek
2017-07-20 20:30     ` Joe Lawrence
2017-07-21  9:12       ` Miroslav Benes
2017-07-21  9:27         ` Petr Mladek
2017-07-21  9:13       ` Petr Mladek
2017-07-21 13:55         ` Joe Lawrence
2017-07-24 15:04           ` Josh Poimboeuf
2017-06-28 15:37 ` [PATCH v2 2/2] livepatch: add shadow variable sample programs Joe Lawrence
2017-07-18 14:47   ` Petr Mladek
2017-07-18 19:15     ` Joe Lawrence
2017-07-19 14:44       ` Petr Mladek
2017-07-19 15:06   ` Petr Mladek

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=20170707180538.4mknmvpwjhj4zo3o@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=jeyu@redhat.com \
    --cc=jikos@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.com \
    /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).