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: <201803180432.KDAsML0L%fengguang.wu@intel.com>
Date:   Sun, 18 Mar 2018 04:09:44 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Gary R Hook <gary.hook@....com>
Cc:     kbuild-all@...org, iommu@...ts.linux-foundation.org,
        joro@...tes.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/5] iommu/amd - Add a debugfs entry to specify a
 IOMMU device table entry

Hi Gary,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.16-rc4]
[also build test WARNING on next-20180316]
[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/Gary-R-Hook/Add-debugfs-info-for-the-AMD-IOMMU/20180317-232302
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/iommu/amd_iommu_debugfs.c: In function 'amd_iommu_debugfs_devid_write':
>> drivers/iommu/amd_iommu_debugfs.c:145:3: warning: ignoring return value of 'kstrtoint', declared with attribute warn_unused_result [-Wunused-result]
      kstrtoint(obuf, 0, &amd_iommu_devid);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/kstrtoint +145 drivers/iommu/amd_iommu_debugfs.c

   123	
   124	static ssize_t amd_iommu_debugfs_devid_write(struct file *filp,
   125						    const char __user *ubuf,
   126						    size_t count, loff_t *offp)
   127	{
   128		unsigned int pci_id, pci_slot, pci_func;
   129		unsigned int obuflen = 80;
   130		ssize_t ret;
   131		char *obuf;
   132	
   133		obuf = kmalloc(OBUFLEN, GFP_KERNEL);
   134		if (!obuf)
   135			return -ENOMEM;
   136	
   137		ret = simple_write_to_buffer(obuf, OBUFLEN, offp, ubuf, count);
   138	
   139		if (strnchr(obuf, OBUFLEN, ':')) {
   140			int n;
   141			n = sscanf(obuf, "%x:%x.%x", &pci_id, &pci_slot, &pci_func);
   142			if (n == 3)
   143				amd_iommu_devid = PCI_DEVID(pci_id, PCI_DEVFN(pci_slot, pci_func));
   144		} else {
 > 145			kstrtoint(obuf, 0, &amd_iommu_devid);
   146		}
   147	
   148		kfree(obuf);
   149	
   150		return ret;
   151	}
   152	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ