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] [day] [month] [year] [list]
Date:   Fri, 17 Jul 2020 14:39:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luo bin <luobin9@...wei.com>, davem@...emloft.net
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, luoxianjun@...wei.com,
        yin.yinshi@...wei.com, cloud.wangxiaoyun@...wei.com,
        chiqijun@...wei.com
Subject: Re: [PATCH net-next 1/2] hinic: add support to handle hw abnormal
 event

Hi Luo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Luo-bin/hinic-add-some-error-messages-for-debug/20200716-205321
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 59632b220f2d61df274ed3a14a204e941051fdad
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/device.h:15,
                    from include/linux/pci.h:37,
                    from drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c:9:
   drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c: In function 'mgmt_watchdog_timeout_event_handler':
>> drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c:794:36: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Wformat=]
     794 |   dev_err(&hwdev->hwif->pdev->dev, "Invalid mgmt watchdog report, length: %d, should be %ld\n",
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c:794:3: note: in expansion of macro 'dev_err'
     794 |   dev_err(&hwdev->hwif->pdev->dev, "Invalid mgmt watchdog report, length: %d, should be %ld\n",
         |   ^~~~~~~
   drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c:794:91: note: format string is defined here
     794 |   dev_err(&hwdev->hwif->pdev->dev, "Invalid mgmt watchdog report, length: %d, should be %ld\n",
         |                                                                                         ~~^
         |                                                                                           |
         |                                                                                           long int
         |                                                                                         %d

vim +794 drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c

   782	
   783	static void mgmt_watchdog_timeout_event_handler(void *dev,
   784							void *buf_in, u16 in_size,
   785							void *buf_out, u16 *out_size)
   786	{
   787		struct hinic_mgmt_watchdog_info *watchdog_info = NULL;
   788		struct hinic_hwdev *hwdev = dev;
   789		u32 *dump_addr = NULL;
   790		u32 stack_len, i, j;
   791		u32 *reg = NULL;
   792	
   793		if (in_size != sizeof(*watchdog_info)) {
 > 794			dev_err(&hwdev->hwif->pdev->dev, "Invalid mgmt watchdog report, length: %d, should be %ld\n",
   795				in_size, sizeof(*watchdog_info));
   796			return;
   797		}
   798	
   799		watchdog_info = buf_in;
   800	
   801		dev_err(&hwdev->hwif->pdev->dev, "Mgmt deadloop time: 0x%x 0x%x, task id: 0x%x, sp: 0x%x\n",
   802			watchdog_info->curr_time_h, watchdog_info->curr_time_l,
   803			watchdog_info->task_id, watchdog_info->sp);
   804		dev_err(&hwdev->hwif->pdev->dev, "Stack current used: 0x%x, peak used: 0x%x, overflow flag: 0x%x, top: 0x%x, bottom: 0x%x\n",
   805			watchdog_info->curr_used, watchdog_info->peak_used,
   806			watchdog_info->is_overflow, watchdog_info->stack_top,
   807			watchdog_info->stack_bottom);
   808	
   809		dev_err(&hwdev->hwif->pdev->dev, "Mgmt pc: 0x%08x, lr: 0x%08x, cpsr:0x%08x\n",
   810			watchdog_info->pc, watchdog_info->lr, watchdog_info->cpsr);
   811	
   812		dev_err(&hwdev->hwif->pdev->dev, "Mgmt register info\n");
   813	
   814		for (i = 0; i < 3; i++) {
   815			reg = watchdog_info->reg + (u64)(u32)(4 * i);
   816			dev_err(&hwdev->hwif->pdev->dev, "0x%08x 0x%08x 0x%08x 0x%08x\n",
   817				*(reg), *(reg + 1), *(reg + 2), *(reg + 3));
   818		}
   819	
   820		dev_err(&hwdev->hwif->pdev->dev, "0x%08x\n", watchdog_info->reg[12]);
   821	
   822		if (watchdog_info->stack_actlen <= 1024) {
   823			stack_len = watchdog_info->stack_actlen;
   824		} else {
   825			dev_err(&hwdev->hwif->pdev->dev, "Oops stack length: 0x%x is wrong\n",
   826				watchdog_info->stack_actlen);
   827			stack_len = 1024;
   828		}
   829	
   830		dev_err(&hwdev->hwif->pdev->dev, "Mgmt dump stack, 16Bytes per line(start from sp)\n");
   831		for (i = 0; i < (stack_len / 16); i++) {
   832			dump_addr = (u32 *)(watchdog_info->data + ((u64)(u32)(i * 16)));
   833			dev_err(&hwdev->hwif->pdev->dev, "0x%08x 0x%08x 0x%08x 0x%08x\n",
   834				*dump_addr, *(dump_addr + 1), *(dump_addr + 2),
   835				*(dump_addr + 3));
   836		}
   837	
   838		for (j = 0; j < ((stack_len % 16) / 4); j++) {
   839			dump_addr = (u32 *)(watchdog_info->data +
   840				    ((u64)(u32)(i * 16 + j * 4)));
   841			dev_err(&hwdev->hwif->pdev->dev, "0x%08x ", *dump_addr);
   842		}
   843	
   844		*out_size = sizeof(*watchdog_info);
   845		watchdog_info = buf_out;
   846		watchdog_info->status = 0;
   847	}
   848	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ