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:   Mon, 5 Feb 2018 10:56:07 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     kbuild-all@...org, linux-scsi@...r.kernel.org,
        "James E . J . Bottomley" <jejb@...ux.vnet.ibm.com>,
        QLogic-Storage-Upstream@...ium.com,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Nicolas Pitre <nico@...aro.org>,
        Andi Kleen <ak@...ux.intel.com>, Arnd Bergmann <arnd@...db.de>,
        Saurav Kashyap <saurav.kashyap@...ium.com>,
        "Dupuis, Chad" <chad.dupuis@...ium.com>,
        Arun Easi <arun.easi@...ium.com>,
        Nilesh Javali <nilesh.javali@...ium.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] scsi: qedf: use correct strncpy() size

Hi Arnd,

I love your patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v4.15]
[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/Arnd-Bergmann/scsi-fixes-for-building-with-LTO/20180205-083607
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 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
        make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/scsi//qedf/qedf_dbg.c: In function 'qedf_uevent_emit':
>> drivers/scsi//qedf/qedf_dbg.c:163:4: warning: ignoring return value of 'strscpy', declared with attribute warn_unused_result [-Wunused-result]
       strscpy(event_string, msg, sizeof(event_string));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/strscpy +163 drivers/scsi//qedf/qedf_dbg.c

   152	
   153	void
   154	qedf_uevent_emit(struct Scsi_Host *shost, u32 code, char *msg)
   155	{
   156		char event_string[40];
   157		char *envp[] = {event_string, NULL};
   158	
   159		memset(event_string, 0, sizeof(event_string));
   160		switch (code) {
   161		case QEDF_UEVENT_CODE_GRCDUMP:
   162			if (msg)
 > 163				strscpy(event_string, msg, sizeof(event_string));
   164			else
   165				sprintf(event_string, "GRCDUMP=%u", shost->host_no);
   166			break;
   167		default:
   168			/* do nothing */
   169			break;
   170		}
   171	
   172		kobject_uevent_env(&shost->shost_gendev.kobj, KOBJ_CHANGE, envp);
   173	}
   174	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ