linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: changbin.du@intel.com
Cc: kbuild-all@01.org, yamada.masahiro@socionext.com,
	michal.lkml@markovi.net, tglx@linutronix.de, mingo@redhat.com,
	akpm@linux-foundation.org, rostedt@goodmis.org,
	rdunlap@infradead.org, x86@kernel.org, lgirdwood@gmail.com,
	broonie@kernel.org, arnd@arndb.de, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Changbin Du <changbin.du@intel.com>
Subject: Re: [PATCH v4 3/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization
Date: Fri, 11 May 2018 11:18:04 +0800	[thread overview]
Message-ID: <201805111151.dA3OXxaF%fengguang.wu@intel.com> (raw)
In-Reply-To: <1525855396-7908-4-git-send-email-changbin.du@intel.com>

[-- Attachment #1: Type: text/plain, Size: 5327 bytes --]

Hi Changbin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.17-rc4 next-20180510]
[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/changbin-du-intel-com/kernel-hacking-GCC-optimization-for-better-debug-experience-Og/20180509-213955
config: x86_64-randconfig-s1-05100951 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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 >>):

   lib/test_firmware.c: In function 'trigger_batched_requests_async_store':
>> lib/test_firmware.c:779:31: warning: 'rc' may be used uninitialized in this function [-Wmaybe-uninitialized]
      test_fw_config->test_result = rc;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
--
   kernel/futex.c: In function 'futex_atomic_op_inuser':
>> kernel/futex.c:1604:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized]
      return oldval > cmparg;
             ~~~~~~~^~~~~~~~
--
   kernel/kexec_file.c: In function 'kexec_apply_relocations':
>> kernel/kexec_file.c:896:6: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (ret)
         ^
--
   mm/swap_state.c: In function '__add_to_swap_cache':
>> mm/swap_state.c:156:9: warning: 'error' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return error;
            ^~~~~
--
   mm/swapfile.c: In function 'setup_swap_map_and_extents':
>> mm/swapfile.c:3061:10: warning: 'nr_extents' may be used uninitialized in this function [-Wmaybe-uninitialized]
      return nr_extents;
             ^~~~~~~~~~
--
   mm/ksm.c: In function 'stable_node_dup':
>> mm/ksm.c:1365:15: warning: 'found_rmap_hlist_len' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (!found ||
           ~~~~~~~^~
           dup->rmap_hlist_len > found_rmap_hlist_len) {
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   mm/huge_memory.c: In function 'do_huge_pmd_wp_page':
>> mm/huge_memory.c:1318:15: warning: 'huge_gfp' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (unlikely(mem_cgroup_try_charge(new_page, vma->vm_mm,
                  ^~~~~~~~~~~~~~~~~~~~~
--
   fs/splice.c: In function 'iter_file_splice_write':
>> fs/splice.c:694:10: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     ssize_t ret;
             ^~~
--
   In file included from include/asm-generic/bug.h:5:0,
                    from arch/x86/include/asm/bug.h:83,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/gfp.h:5,
                    from include/linux/slab.h:15,
                    from ipc/sem.c:73:
   ipc/sem.c: In function 'find_alloc_undo':
>> include/linux/compiler.h:215:31: warning: 'ulp' may be used uninitialized in this function [-Wmaybe-uninitialized]
     case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
             ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   ipc/sem.c:1843:24: note: 'ulp' was declared here
     struct sem_undo_list *ulp;
                           ^~~
--
   block/blk-merge.c: In function '__blk_recalc_rq_segments':
>> block/blk-merge.c:284:21: warning: 'bbio' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (seg_size > bbio->bi_seg_back_size)
                    ~~~~^~~~~~~~~~~~~~~~~~

vim +/ulp +215 include/linux/compiler.h

230fa253 Christian Borntraeger 2014-11-25  208  
43239cbe Christian Borntraeger 2015-01-13  209  static __always_inline void __write_once_size(volatile void *p, void *res, int size)
230fa253 Christian Borntraeger 2014-11-25  210  {
230fa253 Christian Borntraeger 2014-11-25  211  	switch (size) {
230fa253 Christian Borntraeger 2014-11-25  212  	case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
230fa253 Christian Borntraeger 2014-11-25  213  	case 2: *(volatile __u16 *)p = *(__u16 *)res; break;
230fa253 Christian Borntraeger 2014-11-25  214  	case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
230fa253 Christian Borntraeger 2014-11-25 @215  	case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
230fa253 Christian Borntraeger 2014-11-25  216  	default:
230fa253 Christian Borntraeger 2014-11-25  217  		barrier();
230fa253 Christian Borntraeger 2014-11-25  218  		__builtin_memcpy((void *)p, (const void *)res, size);
230fa253 Christian Borntraeger 2014-11-25  219  		barrier();
230fa253 Christian Borntraeger 2014-11-25  220  	}
230fa253 Christian Borntraeger 2014-11-25  221  }
230fa253 Christian Borntraeger 2014-11-25  222  

:::::: The code at line 215 was first introduced by commit
:::::: 230fa253df6352af12ad0a16128760b5cb3f92df kernel: Provide READ_ONCE and ASSIGN_ONCE

:::::: TO: Christian Borntraeger <borntraeger@de.ibm.com>
:::::: CC: Christian Borntraeger <borntraeger@de.ibm.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35922 bytes --]

  parent reply	other threads:[~2018-05-11  3:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  8:43 [PATCH v4 0/4] kernel hacking: GCC optimization for better debug experience (-Og) changbin.du
2018-05-09  8:43 ` [PATCH v4 1/4] x86/mm: surround level4_kernel_pgt with #ifdef CONFIG_X86_5LEVEL...#endif changbin.du
2018-05-09  8:43 ` [PATCH v4 2/4] kernel hacking: new config NO_AUTO_INLINE to disable compiler auto-inline optimizations changbin.du
2018-05-09 18:29   ` kbuild test robot
2018-05-09 20:04   ` kbuild test robot
2018-05-09  8:43 ` [PATCH v4 3/4] kernel hacking: new config CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization changbin.du
2018-05-10 20:59   ` kbuild test robot
2018-05-11  3:18   ` kbuild test robot [this message]
2018-05-09  8:43 ` [PATCH v4 4/4] asm-generic: fix build error in fix_to_virt with CONFIG_CC_OPTIMIZE_FOR_DEBUGGING changbin.du
2018-05-09 12:52   ` Steven Rostedt
2018-05-10 12:29     ` Du, Changbin

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=201805111151.dA3OXxaF%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=changbin.du@intel.com \
    --cc=kbuild-all@01.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yamada.masahiro@socionext.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).