lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201805110234.FUlJejFr%fengguang.wu@intel.com>
Date:   Fri, 11 May 2018 04:59:18 +0800
From:   kbuild test robot <lkp@...el.com>
To:     changbin.du@...el.com
Cc:     kbuild-all@...org, yamada.masahiro@...ionext.com,
        michal.lkml@...kovi.net, tglx@...utronix.de, mingo@...hat.com,
        akpm@...ux-foundation.org, rostedt@...dmis.org,
        rdunlap@...radead.org, x86@...nel.org, lgirdwood@...il.com,
        broonie@...nel.org, arnd@...db.de, linux-kbuild@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        Changbin Du <changbin.du@...el.com>
Subject: Re: [PATCH v4 3/4] kernel hacking: new config
 CC_OPTIMIZE_FOR_DEBUGGING to apply GCC -Og optimization

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

   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_freq':
>> drivers//net/wireless/zydas/zd1201.c:939:10: warning: 'channel' may be used uninitialized in this function [-Wmaybe-uninitialized]
     freq->m = channel;
     ~~~~~~~~^~~~~~~~~
   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_mode':
>> drivers//net/wireless/zydas/zd1201.c:1016:2: warning: 'porttype' may be used uninitialized in this function [-Wmaybe-uninitialized]
     switch(porttype) {
     ^~~~~~
   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_rate':
>> drivers//net/wireless/zydas/zd1201.c:1282:2: warning: 'rate' may be used uninitialized in this function [-Wmaybe-uninitialized]
     switch(rate) {
     ^~~~~~
   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_rts':
>> drivers//net/wireless/zydas/zd1201.c:1334:13: warning: 'rtst' may be used uninitialized in this function [-Wmaybe-uninitialized]
     rts->value = rtst;
     ~~~~~~~~~~~^~~~~~
   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_frag':
>> drivers//net/wireless/zydas/zd1201.c:1372:14: warning: 'fragt' may be used uninitialized in this function [-Wmaybe-uninitialized]
     frag->value = fragt;
     ~~~~~~~~~~~~^~~~~~~
   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_set_power':
>> drivers//net/wireless/zydas/zd1201.c:1503:28: warning: 'duration' may be used uninitialized in this function [-Wmaybe-uninitialized]
       level = vwrq->value * 4 / duration;
               ~~~~~~~~~~~~~~~~^~~~~~~~~~
   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_power':
   drivers//net/wireless/zydas/zd1201.c:1542:27: warning: 'duration' may be used uninitialized in this function [-Wmaybe-uninitialized]
       vwrq->value = duration * level / 4;
                     ~~~~~~~~~^~~~~~~
>> drivers//net/wireless/zydas/zd1201.c:1547:15: warning: 'level' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (enabled && level)
          ~~~~~~~~^~~~~~~~
>> drivers//net/wireless/zydas/zd1201.c:1547:6: warning: 'enabled' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (enabled && level)
         ^
   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_hostauth':
>> drivers//net/wireless/zydas/zd1201.c:1631:13: warning: 'hostauth' may be used uninitialized in this function [-Wmaybe-uninitialized]
     rrq->value = hostauth;
     ~~~~~~~~~~~^~~~~~~~~~
   drivers//net/wireless/zydas/zd1201.c: In function 'zd1201_get_maxassoc':
>> drivers//net/wireless/zydas/zd1201.c:1681:13: warning: 'maxassoc' may be used uninitialized in this function [-Wmaybe-uninitialized]
     rrq->value = maxassoc;
     ~~~~~~~~~~~^~~~~~~~~~
--
   drivers/rtc/rtc-da9052.c: In function 'da9052_read_alarm':
>> drivers/rtc/rtc-da9052.c:25:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
      dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
      ^~~~~~~
   In file included from drivers/rtc/rtc-da9052.c:21:0:
   include/linux/mfd/da9052/da9052.h:157:6: note: 'ret' was declared here
     int ret;
         ^~~
>> drivers/rtc/rtc-da9052.c:25:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
      dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
      ^~~~~~~
   In file included from drivers/rtc/rtc-da9052.c:21:0:
   include/linux/mfd/da9052/da9052.h:157:6: note: 'ret' was declared here
     int ret;
         ^~~
   drivers/rtc/rtc-da9052.c: In function 'da9052_rtc_read_time':
>> drivers/rtc/rtc-da9052.c:25:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
      dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
      ^~~~~~~
   In file included from drivers/rtc/rtc-da9052.c:21:0:
   include/linux/mfd/da9052/da9052.h:157:6: note: 'ret' was declared here
     int ret;
         ^~~
>> drivers/rtc/rtc-da9052.c:25:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
      dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
      ^~~~~~~
   In file included from drivers/rtc/rtc-da9052.c:21:0:
   include/linux/mfd/da9052/da9052.h:157:6: note: 'ret' was declared here
     int ret;
         ^~~
--
   net/bluetooth/mgmt.c: In function 'read_local_oob_ext_data_complete':
>> net/bluetooth/mgmt.c:5669:27: warning: 'r256' may be used uninitialized in this function [-Wmaybe-uninitialized]
     u8 *h192, *r192, *h256, *r256;
                              ^~~~
--
   In file included from drivers//net/wireless/zydas/zd1211rw/zd_usb.c:28:0:
   drivers//net/wireless/zydas/zd1211rw/zd_usb.c: In function 'eject_installer':
>> include/linux/usb.h:1922:23: warning: 'bulk_out_ep' may be used uninitialized in this function [-Wmaybe-uninitialized]
     ((PIPE_BULK << 30) | __create_pipe(dev, endpoint))
                          ^~~~~~~~~~~~~
   drivers//net/wireless/zydas/zd1211rw/zd_usb.c:1278:5: note: 'bulk_out_ep' was declared here
     u8 bulk_out_ep;
        ^~~~~~~~~~~
--
   drivers/slimbus/messaging.c: In function 'slim_do_transfer':
>> drivers/slimbus/messaging.c:126:4: warning: 'tid' may be used uninitialized in this function [-Wmaybe-uninitialized]
       idr_remove(&ctrl->tid_idr, tid);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers//staging/comedi/drivers/serial2002.c: In function 'serial2002_setup_subdevs':
>> drivers//staging/comedi/drivers/serial2002.c:497:7: warning: 'cfg' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (serial2002_setup_subdevice(s, cfg, range, mapping, kind))
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   In file included from drivers/net/wireless/zydas/zd1211rw/zd_usb.c:28:0:
   drivers/net/wireless/zydas/zd1211rw/zd_usb.c: In function 'eject_installer':
>> include/linux/usb.h:1922:23: warning: 'bulk_out_ep' may be used uninitialized in this function [-Wmaybe-uninitialized]
     ((PIPE_BULK << 30) | __create_pipe(dev, endpoint))
                          ^~~~~~~~~~~~~
   drivers/net/wireless/zydas/zd1211rw/zd_usb.c:1278:5: note: 'bulk_out_ep' was declared here
     u8 bulk_out_ep;
        ^~~~~~~~~~~
--
   drivers//regulator/max8925-regulator.c: In function 'max8925_regulator_probe':
>> drivers//regulator/max8925-regulator.c:315:3: warning: 'ri' may be used uninitialized in this function [-Wmaybe-uninitialized]
      dev_err(&pdev->dev, "failed to register regulator %s\n",
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        ri->desc.name);
        ~~~~~~~~~~~~~~
--
   drivers//bcma/sprom.c: In function 'bcma_sprom_get':
>> drivers//bcma/sprom.c:642:3: warning: 'sprom' may be used uninitialized in this function [-Wmaybe-uninitialized]
      kfree(sprom);
      ^~~~~~~~~~~~
--
   drivers//block/rbd.c: In function 'rbd_v2_snap_id_by_name':
>> drivers//block/rbd.c:4797:25: warning: 'snap_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return found ? snap_id : CEPH_NOSNAP;
                             
   drivers//block/rbd.c: In function 'rbd_dev_image_id':
>> drivers//block/rbd.c:5349:27: warning: 'image_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
      rbd_dev->spec->image_id = image_id;
      ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
--
   drivers//firmware/qemu_fw_cfg.c: In function 'fw_cfg_build_symlink':
>> drivers//firmware/qemu_fw_cfg.c:557:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return ret;
            ^~~
..

vim +/seq +33 include/linux/compiler.h

1f0d69a9 Steven Rostedt          2008-11-12  22  
d45ae1f7 Steven Rostedt (VMware  2017-01-17  23) #define __branch_check__(x, expect, is_constant) ({			\
1f0d69a9 Steven Rostedt          2008-11-12  24  			int ______r;					\
134e6a03 Steven Rostedt (VMware  2017-01-19  25) 			static struct ftrace_likely_data		\
1f0d69a9 Steven Rostedt          2008-11-12  26  				__attribute__((__aligned__(4)))		\
45b79749 Steven Rostedt          2008-11-21  27  				__attribute__((section("_ftrace_annotated_branch"))) \
1f0d69a9 Steven Rostedt          2008-11-12  28  				______f = {				\
134e6a03 Steven Rostedt (VMware  2017-01-19  29) 				.data.func = __func__,			\
134e6a03 Steven Rostedt (VMware  2017-01-19  30) 				.data.file = __FILE__,			\
134e6a03 Steven Rostedt (VMware  2017-01-19  31) 				.data.line = __LINE__,			\
1f0d69a9 Steven Rostedt          2008-11-12  32  			};						\
d45ae1f7 Steven Rostedt (VMware  2017-01-17 @33) 			______r = __builtin_expect(!!(x), expect);	\
d45ae1f7 Steven Rostedt (VMware  2017-01-17  34) 			ftrace_likely_update(&______f, ______r,		\
d45ae1f7 Steven Rostedt (VMware  2017-01-17  35) 					     expect, is_constant);	\
1f0d69a9 Steven Rostedt          2008-11-12  36  			______r;					\
1f0d69a9 Steven Rostedt          2008-11-12  37  		})
1f0d69a9 Steven Rostedt          2008-11-12  38  

:::::: The code at line 33 was first introduced by commit
:::::: d45ae1f7041ac52ade6c5ec76d96bbed765d67aa tracing: Process constants for (un)likely() profiler

:::::: TO: Steven Rostedt (VMware) <rostedt@...dmis.org>
:::::: CC: Steven Rostedt (VMware) <rostedt@...dmis.org>

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

Download attachment ".config.gz" of type "application/gzip" (35922 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ