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]
Date:   Fri, 15 Mar 2019 00:12:56 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Leandro Dorileo <leandro.maciel.dorileo@...el.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        "David S . Miller" <davem@...emloft.net>,
        Vinicius Costa Gomes <vinicius.gomes@...el.com>
Subject: Re: [PATCH net 2/2] net/sched: cbs: fix port_rate miscalculation

Hi Leandro,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Leandro-Dorileo/net-sched-taprio-fix-picos_per_byte-miscalculation/20190314-231519
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=alpha 

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7:0,
                    from include/linux/kernel.h:14,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from net/sched/sch_cbs.c:58:
   net/sched/sch_cbs.c: In function 'cbs_set_port_rate':
   include/linux/kern_levels.h:5:18: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'long int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */
                     ^
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
   include/linux/printk.h:310:9: note: in expansion of macro 'KERN_INFO'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~
>> net/sched/sch_cbs.c:318:2: note: in expansion of macro 'pr_info'
     pr_info("cbs: set %s's port_rate to: %llu, linkspeed: %d\n",
     ^~~~~~~
   net/sched/sch_cbs.c:318:42: note: format string is defined here
     pr_info("cbs: set %s's port_rate to: %llu, linkspeed: %d\n",
                                          ~~~^
                                          %lu

vim +/pr_info +318 net/sched/sch_cbs.c

   307	
   308	static void cbs_set_port_rate(struct net_device *dev, struct cbs_sched_data *q)
   309	{
   310		struct ethtool_link_ksettings ecmd;
   311		int port_rate = -1;
   312	
   313		if (!__ethtool_get_link_ksettings(dev, &ecmd) &&
   314		    ecmd.base.speed != SPEED_UNKNOWN)
   315			port_rate = ecmd.base.speed * 1000 * BYTES_PER_KBIT;
   316	
   317		atomic64_set(&q->port_rate, port_rate);
 > 318		pr_info("cbs: set %s's port_rate to: %llu, linkspeed: %d\n",
   319			dev->name, atomic64_read(&q->port_rate), ecmd.base.speed);
   320	}
   321	

---
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" (55551 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ