Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752046AbdGGSFn (ORCPT ); Fri, 7 Jul 2017 14:05:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56964 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbdGGSFl (ORCPT ); Fri, 7 Jul 2017 14:05:41 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AA8D5C0587D3 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=joe.lawrence@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com AA8D5C0587D3 Date: Fri, 7 Jul 2017 14:05:38 -0400 From: Joe Lawrence To: kbuild test robot Cc: kbuild-all@01.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Josh Poimboeuf , Jessica Yu , Jiri Kosina , Miroslav Benes , Petr Mladek Subject: Re: [PATCH v2 1/2] livepatch: introduce shadow variable API Message-ID: <20170707180538.4mknmvpwjhj4zo3o@redhat.com> References: <1498664247-12296-2-git-send-email-joe.lawrence@redhat.com> <201706302159.CP4d0hZY%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201706302159.CP4d0hZY%fengguang.wu@intel.com> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 07 Jul 2017 18:05:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7255 Lines: 126 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 > To: Joe Lawrence > Cc: kbuild-all@01.org, live-patching@vger.kernel.org, > linux-kernel@vger.kernel.org, Josh Poimboeuf , > Jessica Yu , Jiri Kosina , Miroslav > Benes , Petr Mladek > 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 > :::::: CC: Martin Schwidefsky > > --- > 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