Re: [PATCH v12 01/15] iommu: Introduce attach/detach_pasid_table API
by kernel test robot
Hi Eric,
I love your patch! Perhaps something to improve:
[auto build test WARNING on iommu/next]
[also build test WARNING on linus/master v5.10-rc4 next-20201116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-S...
base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: arm64-randconfig-r034-20201115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/54be9a9e014a566f9c7640da201c24cfb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-IOMMU-part/20201116-185039
git checkout 54be9a9e014a566f9c7640da201c24cfb1eda06e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/iommu/iommu.c:2225:34: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare]
if (pasid_table_data.config < 1 && pasid_table_data.config > 3)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +2225 drivers/iommu/iommu.c
2182
2183 int iommu_uapi_attach_pasid_table(struct iommu_domain *domain,
2184 void __user *uinfo)
2185 {
2186 struct iommu_pasid_table_config pasid_table_data = { 0 };
2187 u32 minsz;
2188
2189 if (unlikely(!domain->ops->attach_pasid_table))
2190 return -ENODEV;
2191
2192 /*
2193 * No new spaces can be added before the variable sized union, the
2194 * minimum size is the offset to the union.
2195 */
2196 minsz = offsetof(struct iommu_pasid_table_config, vendor_data);
2197
2198 /* Copy minsz from user to get flags and argsz */
2199 if (copy_from_user(&pasid_table_data, uinfo, minsz))
2200 return -EFAULT;
2201
2202 /* Fields before the variable size union are mandatory */
2203 if (pasid_table_data.argsz < minsz)
2204 return -EINVAL;
2205
2206 /* PASID and address granu require additional info beyond minsz */
2207 if (pasid_table_data.version != PASID_TABLE_CFG_VERSION_1)
2208 return -EINVAL;
2209 if (pasid_table_data.format == IOMMU_PASID_FORMAT_SMMUV3 &&
2210 pasid_table_data.argsz <
2211 offsetofend(struct iommu_pasid_table_config, vendor_data.smmuv3))
2212 return -EINVAL;
2213
2214 /*
2215 * User might be using a newer UAPI header which has a larger data
2216 * size, we shall support the existing flags within the current
2217 * size. Copy the remaining user data _after_ minsz but not more
2218 * than the current kernel supported size.
2219 */
2220 if (copy_from_user((void *)&pasid_table_data + minsz, uinfo + minsz,
2221 min_t(u32, pasid_table_data.argsz, sizeof(pasid_table_data)) - minsz))
2222 return -EFAULT;
2223
2224 /* Now the argsz is validated, check the content */
> 2225 if (pasid_table_data.config < 1 && pasid_table_data.config > 3)
2226 return -EINVAL;
2227
2228 return domain->ops->attach_pasid_table(domain, &pasid_table_data);
2229 }
2230 EXPORT_SYMBOL_GPL(iommu_uapi_attach_pasid_table);
2231
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [PATCH v4 27/27] scripts: kernel-doc: validate kernel-doc markup with the actual names
by kernel test robot
Hi Mauro,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20201116]
[cannot apply to drm-intel/for-linux-next s390/features tip/timers/core tip/irq/core tip/sched/core linus/master hnaz-linux-mm/master v5.10-rc4 v5.10-rc3 v5.10-rc2 v5.10-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/net-phy-fi...
base: 034307507118f7e1b18f8403c85af2216da2dc94
config: nios2-randconfig-r022-20201116 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/11cd9cdaab434fff7a5edbee8d8d4ce9e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mauro-Carvalho-Chehab/net-phy-fix-kernel-doc-markups/20201116-191847
git checkout 11cd9cdaab434fff7a5edbee8d8d4ce9ef11acf4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> net/batman-adv/multicast.c:840: warning: expecting prototype for batadv_mcast_flags_logs(). Prototype was for batadv_mcast_flags_log() instead
vim +840 net/batman-adv/multicast.c
72f7b2deafde895 Linus Lüssing 2016-05-10 830
72f7b2deafde895 Linus Lüssing 2016-05-10 831 /**
7e9a8c2ce7c5f87 Sven Eckelmann 2017-12-02 832 * batadv_mcast_flags_logs() - output debug information about mcast flag changes
72f7b2deafde895 Linus Lüssing 2016-05-10 833 * @bat_priv: the bat priv with all the soft interface information
6bc4544021f8228 Linus Lüssing 2019-05-07 834 * @flags: TVLV flags indicating the new multicast state
72f7b2deafde895 Linus Lüssing 2016-05-10 835 *
bccb48c89fe3c09 Sven Eckelmann 2020-06-01 836 * Whenever the multicast TVLV flags this node announces change, this function
bccb48c89fe3c09 Sven Eckelmann 2020-06-01 837 * should be used to notify userspace about the change.
72f7b2deafde895 Linus Lüssing 2016-05-10 838 */
72f7b2deafde895 Linus Lüssing 2016-05-10 839 static void batadv_mcast_flags_log(struct batadv_priv *bat_priv, u8 flags)
72f7b2deafde895 Linus Lüssing 2016-05-10 @840 {
6bc4544021f8228 Linus Lüssing 2019-05-07 841 bool old_enabled = bat_priv->mcast.mla_flags.enabled;
6bc4544021f8228 Linus Lüssing 2019-05-07 842 u8 old_flags = bat_priv->mcast.mla_flags.tvlv_flags;
61caf3d109f5411 Linus Lüssing 2019-06-11 843 char str_old_flags[] = "[.... . ]";
72f7b2deafde895 Linus Lüssing 2016-05-10 844
61caf3d109f5411 Linus Lüssing 2019-06-11 845 sprintf(str_old_flags, "[%c%c%c%s%s]",
72f7b2deafde895 Linus Lüssing 2016-05-10 846 (old_flags & BATADV_MCAST_WANT_ALL_UNSNOOPABLES) ? 'U' : '.',
72f7b2deafde895 Linus Lüssing 2016-05-10 847 (old_flags & BATADV_MCAST_WANT_ALL_IPV4) ? '4' : '.',
61caf3d109f5411 Linus Lüssing 2019-06-11 848 (old_flags & BATADV_MCAST_WANT_ALL_IPV6) ? '6' : '.',
61caf3d109f5411 Linus Lüssing 2019-06-11 849 !(old_flags & BATADV_MCAST_WANT_NO_RTR4) ? "R4" : ". ",
61caf3d109f5411 Linus Lüssing 2019-06-11 850 !(old_flags & BATADV_MCAST_WANT_NO_RTR6) ? "R6" : ". ");
72f7b2deafde895 Linus Lüssing 2016-05-10 851
72f7b2deafde895 Linus Lüssing 2016-05-10 852 batadv_dbg(BATADV_DBG_MCAST, bat_priv,
61caf3d109f5411 Linus Lüssing 2019-06-11 853 "Changing multicast flags from '%s' to '[%c%c%c%s%s]'\n",
6bc4544021f8228 Linus Lüssing 2019-05-07 854 old_enabled ? str_old_flags : "<undefined>",
72f7b2deafde895 Linus Lüssing 2016-05-10 855 (flags & BATADV_MCAST_WANT_ALL_UNSNOOPABLES) ? 'U' : '.',
72f7b2deafde895 Linus Lüssing 2016-05-10 856 (flags & BATADV_MCAST_WANT_ALL_IPV4) ? '4' : '.',
61caf3d109f5411 Linus Lüssing 2019-06-11 857 (flags & BATADV_MCAST_WANT_ALL_IPV6) ? '6' : '.',
61caf3d109f5411 Linus Lüssing 2019-06-11 858 !(flags & BATADV_MCAST_WANT_NO_RTR4) ? "R4" : ". ",
61caf3d109f5411 Linus Lüssing 2019-06-11 859 !(flags & BATADV_MCAST_WANT_NO_RTR6) ? "R6" : ". ");
72f7b2deafde895 Linus Lüssing 2016-05-10 860 }
72f7b2deafde895 Linus Lüssing 2016-05-10 861
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [PATCH 2/2] usb: gadget: Fix memleak in gadgetfs_fill_super
by kernel test robot
Hi Zhang,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on balbi-usb/testing/next]
[also build test ERROR on usb/usb-testing linus/master peter.chen-usb/ci-for-usb-next v5.10-rc4 next-20201116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Zhang-Qilong/usb-gadget-Fix-two-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
config: powerpc-randconfig-r015-20201116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/0dfab8598cb8b814fc17011d7a15ff463...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zhang-Qilong/usb-gadget-Fix-two-memleaks-in-error-handling/20201116-201612
git checkout 0dfab8598cb8b814fc17011d7a15ff463840e1dd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/usb/gadget/legacy/inode.c:2042:2: error: implicitly declaring library function 'free' with type 'void (void *)' [-Werror,-Wimplicit-function-declaration]
free(CHIP);
^
drivers/usb/gadget/legacy/inode.c:2042:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'free'
>> drivers/usb/gadget/legacy/inode.c:2042:7: error: passing 'const char *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
free(CHIP);
^~~~
2 errors generated.
vim +2042 drivers/usb/gadget/legacy/inode.c
1990
1991 static int
1992 gadgetfs_fill_super (struct super_block *sb, struct fs_context *fc)
1993 {
1994 struct inode *inode;
1995 struct dev_data *dev;
1996
1997 if (the_device)
1998 return -ESRCH;
1999
2000 CHIP = usb_get_gadget_udc_name();
2001 if (!CHIP)
2002 return -ENODEV;
2003
2004 /* superblock */
2005 sb->s_blocksize = PAGE_SIZE;
2006 sb->s_blocksize_bits = PAGE_SHIFT;
2007 sb->s_magic = GADGETFS_MAGIC;
2008 sb->s_op = &gadget_fs_operations;
2009 sb->s_time_gran = 1;
2010
2011 /* root inode */
2012 inode = gadgetfs_make_inode (sb,
2013 NULL, &simple_dir_operations,
2014 S_IFDIR | S_IRUGO | S_IXUGO);
2015 if (!inode)
2016 goto Enomem;
2017 inode->i_op = &simple_dir_inode_operations;
2018 if (!(sb->s_root = d_make_root (inode)))
2019 goto Enomem;
2020
2021 /* the ep0 file is named after the controller we expect;
2022 * user mode code can use it for sanity checks, like we do.
2023 */
2024 dev = dev_new ();
2025 if (!dev)
2026 goto Enomem;
2027
2028 dev->sb = sb;
2029 dev->dentry = gadgetfs_create_file(sb, CHIP, dev, &ep0_operations);
2030 if (!dev->dentry) {
2031 put_dev(dev);
2032 goto Enomem;
2033 }
2034
2035 /* other endpoint files are available after hardware setup,
2036 * from binding to a controller.
2037 */
2038 the_device = dev;
2039 return 0;
2040
2041 Enomem:
> 2042 free(CHIP);
2043 CHIP = NULL;
2044
2045 return -ENOMEM;
2046 }
2047
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
UPS Invoice Notification
by Invoice-notification@ups.com
Dear Customer:Your new invoice is now available.For questions about your invoice, or invoice payment, please call (800) 8111648 Monday through Friday 8:00 am to 9:00 pm Eastern Time.For technical support questions regarding your electronic invoicing, please call 877-289-6418.For more information about UPS billing options, visit UPS Billing Center.Thank you for using UPS.This is a post only email; please do not respond to this message.Notice: This email message and all attachments transmitted with it may contain proprietary information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by electronic mail at customer.service(a)ups.com and delete this message and all copies and backups thereof. Thank
you.
1 year, 10 months
Re: [PATCH v11 05/13] vfio/pci: Register an iommu fault handler
by kernel test robot
Hi Eric,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.10-rc4]
[also build test WARNING on next-20201116]
[cannot apply to vfio/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Eric-Auger/SMMUv3-Nested-Stage-S...
base: 09162bc32c880a791c6c0668ce0745cf7958f576
config: powerpc64-randconfig-r026-20201116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/747ef402696e1192684908ca99f06f3d6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Eric-Auger/SMMUv3-Nested-Stage-Setup-VFIO-part/20201116-190742
git checkout 747ef402696e1192684908ca99f06f3d68466c04
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/vfio/pci/vfio_pci.c:26:
In file included from include/linux/vfio.h:16:
include/uapi/linux/vfio.h:1231:34: error: field has incomplete type 'struct iommu_pasid_table_config'
struct iommu_pasid_table_config config; /* used on SET */
^
include/uapi/linux/vfio.h:1231:9: note: forward declaration of 'struct iommu_pasid_table_config'
struct iommu_pasid_table_config config; /* used on SET */
^
>> drivers/vfio/pci/vfio_pci.c:339:5: warning: no previous prototype for function 'vfio_pci_iommu_dev_fault_handler' [-Wmissing-prototypes]
int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data)
^
drivers/vfio/pci/vfio_pci.c:339:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data)
^
static
1 warning and 1 error generated.
vim +/vfio_pci_iommu_dev_fault_handler +339 drivers/vfio/pci/vfio_pci.c
338
> 339 int vfio_pci_iommu_dev_fault_handler(struct iommu_fault *fault, void *data)
340 {
341 struct vfio_pci_device *vdev = (struct vfio_pci_device *)data;
342 struct vfio_region_dma_fault *reg =
343 (struct vfio_region_dma_fault *)vdev->fault_pages;
344 struct iommu_fault *new;
345 u32 head, tail, size;
346 int ret = -EINVAL;
347
348
349 if (WARN_ON(!reg))
350 return ret;
351
352 mutex_lock(&vdev->fault_queue_lock);
353
354 head = reg->head;
355 tail = reg->tail;
356 size = reg->nb_entries;
357
358 new = (struct iommu_fault *)(vdev->fault_pages + reg->offset +
359 head * reg->entry_size);
360
361 if (CIRC_SPACE(head, tail, size) < 1) {
362 ret = -ENOSPC;
363 goto unlock;
364 }
365
366 *new = *fault;
367 reg->head = (head + 1) % size;
368 ret = 0;
369 unlock:
370 mutex_unlock(&vdev->fault_queue_lock);
371 return ret;
372 }
373
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [linux-stable-rc:linux-5.9.y 967/1457] drivers/hwtracing/coresight/coresight-etm-perf.c:226:37: warning: passing argument 1 of 'coresight_get_enabled_sink' makes pointer from integer without a cast
by Linu Cherian
Hi Greg,
> -----Original Message-----
> From: kernel test robot <lkp(a)intel.com>
> Sent: Sunday, November 15, 2020 10:11 AM
> To: Linu Cherian <lcherian(a)marvell.com>
> Cc: kbuild-all(a)lists.01.org; Greg Kroah-Hartman
> <gregkh(a)linuxfoundation.org>; Mathieu Poirier
> <mathieu.poirier(a)linaro.org>; Sasha Levin
> <alexander.levin(a)microsoft.com>
> Subject: [EXT] [linux-stable-rc:linux-5.9.y 967/1457]
> drivers/hwtracing/coresight/coresight-etm-perf.c:226:37: warning: passing
> argument 1 of 'coresight_get_enabled_sink' makes pointer from integer
> without a cast
>
>
>
> ----------------------------------------------------------------------
> tree: https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__git.kernel.org_pub_scm_linux_kernel_git_stable_linux-2Dstable-
> 2Drc.git&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=DI9kird_6lFtBCVoGa
> 5ogk3dJwsUlHLjLlgu0r46iU4&m=LA2M3EzCSjtExR98WF0gipSel9z_Z1MN2yM
> _RqZQrSU&s=96C6JD4uj02xn6PeeUidPtpo04b-wY6PRNJXlKhuy5k&e= linux-
> 5.9.y
> head: f022ed13f4d94a0b1bf5ec9e1f08e964f6878d55
> commit: fc5382d70826c92e90d9efa90a4c671efe15f268 [967/1457] coresight:
> Make sysfs functional on topologies with per core sink
> config: arm-randconfig-r033-20201115 (attached as .config)
> compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
> wget https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__raw.githubusercontent.com_intel_lkp-
> 2Dtests_master_sbin_make.cross&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtf
> Q&r=DI9kird_6lFtBCVoGa5ogk3dJwsUlHLjLlgu0r46iU4&m=LA2M3EzCSjtExR9
> 8WF0gipSel9z_Z1MN2yM_RqZQrSU&s=FKSkViKNDHzxRhn5WavnjgjTkUfZE_
> j4VpKjb3hmO8E&e= -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__git.kernel.org_pub_scm_linux_kernel_git_stable_linux-2Dstable-
> 2Drc.git_commit_-3Fid-
> 3Dfc5382d70826c92e90d9efa90a4c671efe15f268&d=DwIBAg&c=nKjWec2b6
> R0mOyPaz7xtfQ&r=DI9kird_6lFtBCVoGa5ogk3dJwsUlHLjLlgu0r46iU4&m=LA
> 2M3EzCSjtExR98WF0gipSel9z_Z1MN2yM_RqZQrSU&s=2O4eGuUaddTfxTIB
> G39alNPjE460sVeq94pDy26fFa8&e=
> git remote add linux-stable-rc
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__git.kernel.org_pub_scm_linux_kernel_git_stable_linux-2Dstable-
> 2Drc.git&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=DI9kird_6lFtBCVoGa
> 5ogk3dJwsUlHLjLlgu0r46iU4&m=LA2M3EzCSjtExR98WF0gipSel9z_Z1MN2yM
> _RqZQrSU&s=96C6JD4uj02xn6PeeUidPtpo04b-wY6PRNJXlKhuy5k&e=
> git fetch --no-tags linux-stable-rc linux-5.9.y
> git checkout fc5382d70826c92e90d9efa90a4c671efe15f268
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0
> make.cross ARCH=arm
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp(a)intel.com>
>
> All warnings (new ones prefixed by >>):
>
> drivers/hwtracing/coresight/coresight-etm-perf.c: In function
> 'etm_setup_aux':
> >> drivers/hwtracing/coresight/coresight-etm-perf.c:226:37: warning:
> passing argument 1 of 'coresight_get_enabled_sink' makes pointer from
> integer without a cast [-Wint-conversion]
> 226 | sink = coresight_get_enabled_sink(true);
> | ^~~~
> | |
> | int
> In file included from drivers/hwtracing/coresight/coresight-etm-perf.h:11,
> from drivers/hwtracing/coresight/coresight-etm-perf.c:21:
> drivers/hwtracing/coresight/coresight-priv.h:152:1: note: expected 'struct
> coresight_device *' but argument is of type 'int'
> 152 | coresight_get_enabled_sink(struct coresight_device *source);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> vim +/coresight_get_enabled_sink +226
> drivers/hwtracing/coresight/coresight-etm-perf.c
>
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 206
> 840018668ce2d96 Mathieu Poirier 2019-01-31 207 static void
> *etm_setup_aux(struct perf_event *event, void **pages,
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 208 int
> nr_pages, bool overwrite)
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 209 {
> 2264439258870ed Mathieu Poirier 2019-01-31 210 u32 id;
> 840018668ce2d96 Mathieu Poirier 2019-01-31 211 int cpu = event-
> >cpu;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 212 cpumask_t *mask;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 213 struct
> coresight_device *sink;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 214 struct
> etm_event_data *event_data = NULL;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 215
> 840018668ce2d96 Mathieu Poirier 2019-01-31 216 event_data =
> alloc_event_data(cpu);
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 217 if (!event_data)
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 218 return NULL;
> d755209f6afddec Suzuki K Poulose 2017-06-05 219
> INIT_WORK(&event_data->work, free_event_data);
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 220
> 2264439258870ed Mathieu Poirier 2019-01-31 221 /* First get the
> selected sink from user space. */
> 2264439258870ed Mathieu Poirier 2019-01-31 222 if (event-
> >attr.config2) {
> 2264439258870ed Mathieu Poirier 2019-01-31 223 id =
> (u32)event->attr.config2;
> 2264439258870ed Mathieu Poirier 2019-01-31 224 sink =
> coresight_get_sink_by_id(id);
> 2264439258870ed Mathieu Poirier 2019-01-31 225 } else {
> d52c9750f150111 Mathieu Poirier 2016-11-29 @226 sink =
> coresight_get_enabled_sink(true);
> 2264439258870ed Mathieu Poirier 2019-01-31 227 }
> 2264439258870ed Mathieu Poirier 2019-01-31 228
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 229 mask =
> &event_data->mask;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 230
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 231 /*
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 232 * Setup the path for
> each CPU in a trace session. We try to build
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 233 * trace path for
> each CPU in the mask. If we don't find an ETM
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 234 * for the CPU or fail
> to build a path, we clear the CPU from the
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 235 * mask and
> continue with the rest. If ever we try to trace on those
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 236 * CPUs, we can
> handle it and fail the session.
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 237 */
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 238 for_each_cpu(cpu,
> mask) {
> 5ecabe4a76e8cdb Suzuki K Poulose 2018-09-20 239 struct
> list_head *path;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 240 struct
> coresight_device *csdev;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 241
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 242 csdev =
> per_cpu(csdev_src, cpu);
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 243 /*
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 244 * If there is
> no ETM associated with this CPU clear it from
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 245 * the mask
> and continue with the rest. If ever we try to trace
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 246 * on this
> CPU, we handle it accordingly.
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 247 */
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 248 if (!csdev) {
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 249
> cpumask_clear_cpu(cpu, mask);
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 250
> continue;
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 251 }
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 252
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 253 /*
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 254 * No sink
> provided - look for a default sink for one of the
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 255 * devices.
> At present we only support topology where all CPUs
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 256 * use the
> same sink [N:1], so only need to find one sink. The
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 257 *
> coresight_build_path later will remove any CPU that does not
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 258 * attach to
> the sink, or if we have not found a sink.
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 259 */
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 260 if (!sink)
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 261 sink
> = coresight_find_default_sink(csdev);
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 262
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 263 /*
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 264 * Building a
> path doesn't enable it, it simply builds a
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 265 * list of
> devices from source to sink that can be
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 266 *
> referenced later when the path is actually needed.
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 267 */
> 5ecabe4a76e8cdb Suzuki K Poulose 2018-09-20 268 path =
> coresight_build_path(csdev, sink);
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 269 if
> (IS_ERR(path)) {
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 270
> cpumask_clear_cpu(cpu, mask);
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 271
> continue;
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 272 }
> 5ecabe4a76e8cdb Suzuki K Poulose 2018-09-20 273
> 5ecabe4a76e8cdb Suzuki K Poulose 2018-09-20 274
> *etm_event_cpu_path_ptr(event_data, cpu) = path;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 275 }
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 276
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 277 /* no sink found for
> any CPU - cannot trace */
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 278 if (!sink)
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 279 goto err;
> bbfb8f3e4e3f10c Mike Leach 2020-07-16 280
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 281 /* If we don't have
> any CPUs ready for tracing, abort */
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 282 cpu =
> cpumask_first(mask);
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 283 if (cpu >=
> nr_cpu_ids)
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 284 goto err;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 285
> 02d5c897a091f8e Mathieu Poirier 2019-04-25 286 if (!sink_ops(sink)-
> >alloc_buffer || !sink_ops(sink)->free_buffer)
> 02d5c897a091f8e Mathieu Poirier 2019-04-25 287 goto err;
> 02d5c897a091f8e Mathieu Poirier 2019-04-25 288
> f9d81a657bb833e Suzuki K Poulose 2018-09-20 289 /* Allocate the sink
> buffer for this session */
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 290 event_data-
> >snk_config =
> a0f08a6a9fee0ce Mathieu Poirier 2019-04-25 291
> sink_ops(sink)->alloc_buffer(sink, event, pages,
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 292
> nr_pages, overwrite);
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 293 if (!event_data-
> >snk_config)
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 294 goto err;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 295
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 296 out:
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 297 return event_data;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 298
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 299 err:
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 300
> etm_free_aux(event_data);
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 301 event_data = NULL;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 302 goto out;
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 303 }
> 0bcbf2e30ff2271 Mathieu Poirier 2016-02-17 304
>
> :::::: The code at line 226 was first introduced by commit
> :::::: d52c9750f150111dc7f73e4036f6948b20c9f8c3 coresight: reset
> "enable_sink" flag when need be
>
> :::::: TO: Mathieu Poirier <mathieu.poirier(a)linaro.org>
> :::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
>
When commit 6d578258b955 ("coresight: Make sysfs functional on
topologies with per core sink") was merged into stable,
a pre-requisite commit,
commit bb1860efc817("coresight: etm: perf: Sink selection using sysfs is
deprecated") got missed out and lead to this build breakage.
Hence the missing commit along with another one which fixes a regression for the same
has been submitted to stable tree v5.9.
https://lore.kernel.org/stable/20201116123510.28980-1-lcherian@marvell.com/
https://lore.kernel.org/stable/20201116123510.28980-2-lcherian@marvell.com/
Thanks.
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__lists.01.org_hyperkitty_list_kbuild-2Dall-
> 40lists.01.org&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=DI9kird_6lFtBC
> VoGa5ogk3dJwsUlHLjLlgu0r46iU4&m=LA2M3EzCSjtExR98WF0gipSel9z_Z1M
> N2yM_RqZQrSU&s=QASHlQeHbFyOgSAr1ubfpGb6nD8TkxBfNlp5EQIjWIU&
> e=
1 year, 10 months
Re: [PATCH 2/6] net/x25: make neighbour params configurable
by kernel test robot
Hi Martin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on net/master linus/master sparc-next/master v5.10-rc4 next-20201116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Martin-Schiller/net-x25-add-remo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 0064c5c1b3bf2a695c772c90e8dea38426a870ff
config: x86_64-randconfig-a011-20201116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/2d44533245f7e8388db93c53c26703ac5...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Martin-Schiller/net-x25-add-remove-x25_link_device-by-NETDEV_REGISTER-UNREGISTER/20201116-153459
git checkout 2d44533245f7e8388db93c53c26703ac52650e57
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> net/x25/af_x25.c:1709:30: error: assigning to 'struct compat_x25_facilities' from incompatible type 'struct x25_facilities'
x25_subscr.facilities = nb->facilities;
^ ~~~~~~~~~~~~~~
>> net/x25/af_x25.c:1761:24: error: assigning to 'struct x25_facilities' from incompatible type 'struct compat_x25_facilities'
nb->facilities = x25_subscr.facilities;
^ ~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +1709 net/x25/af_x25.c
1678
1679 #ifdef CONFIG_COMPAT
1680 static int compat_x25_subscr_ioctl(unsigned int cmd,
1681 struct compat_x25_subscrip_struct __user *x25_subscr32)
1682 {
1683 struct compat_x25_subscrip_struct x25_subscr;
1684 struct x25_neigh *nb;
1685 struct net_device *dev;
1686 int rc = -EINVAL;
1687
1688 if (cmd != SIOCX25GSUBSCRIP && cmd != SIOCX25SSUBSCRIP)
1689 goto out;
1690
1691 rc = -EFAULT;
1692 if (copy_from_user(&x25_subscr, x25_subscr32, sizeof(*x25_subscr32)))
1693 goto out;
1694
1695 rc = -EINVAL;
1696 dev = x25_dev_get(x25_subscr.device);
1697 if (dev == NULL)
1698 goto out;
1699
1700 nb = x25_get_neigh(dev);
1701 if (nb == NULL)
1702 goto out_dev_put;
1703
1704 if (cmd == SIOCX25GSUBSCRIP) {
1705 read_lock_bh(&x25_neigh_list_lock);
1706 x25_subscr.extended = nb->extended;
1707 x25_subscr.dce = nb->dce;
1708 x25_subscr.lc = nb->lc;
> 1709 x25_subscr.facilities = nb->facilities;
1710 x25_subscr.t20 = nb->t20;
1711 x25_subscr.global_facil_mask = nb->global_facil_mask;
1712 read_unlock_bh(&x25_neigh_list_lock);
1713 rc = copy_to_user(x25_subscr32, &x25_subscr,
1714 sizeof(*x25_subscr32)) ? -EFAULT : 0;
1715 } else {
1716 rc = -EINVAL;
1717
1718 if (dev->flags & IFF_UP)
1719 return -EBUSY;
1720
1721 if (x25_subscr.extended != 0 && x25_subscr.extended != 1)
1722 goto out_dev_and_neigh_put;
1723 if (x25_subscr.dce != 0 && x25_subscr.dce != 1)
1724 goto out_dev_and_neigh_put;
1725 if (x25_subscr.lc < 1 || x25_subscr.lc > 4095)
1726 goto out_dev_and_neigh_put;
1727 if (x25_subscr.facilities.pacsize_in < X25_PS16 ||
1728 x25_subscr.facilities.pacsize_in > X25_PS4096)
1729 goto out_dev_and_neigh_put;
1730 if (x25_subscr.facilities.pacsize_out < X25_PS16 ||
1731 x25_subscr.facilities.pacsize_out > X25_PS4096)
1732 goto out_dev_and_neigh_put;
1733 if (x25_subscr.facilities.winsize_in < 1 ||
1734 x25_subscr.facilities.winsize_in > 127)
1735 goto out_dev_and_neigh_put;
1736 if (x25_subscr.facilities.throughput) {
1737 int out = x25_subscr.facilities.throughput & 0xf0;
1738 int in = x25_subscr.facilities.throughput & 0x0f;
1739 if (!out)
1740 x25_subscr.facilities.throughput |=
1741 X25_DEFAULT_THROUGHPUT << 4;
1742 else if (out < 0x30 || out > 0xD0)
1743 goto out_dev_and_neigh_put;
1744 if (!in)
1745 x25_subscr.facilities.throughput |=
1746 X25_DEFAULT_THROUGHPUT;
1747 else if (in < 0x03 || in > 0x0D)
1748 goto out_dev_and_neigh_put;
1749 }
1750 if (x25_subscr.facilities.reverse &&
1751 (x25_subscr.facilities.reverse & 0x81) != 0x81)
1752 goto out_dev_and_neigh_put;
1753 if (x25_subscr.t20 < 1 * HZ || x25_subscr.t20 > 300 * HZ)
1754 goto out_dev_and_neigh_put;
1755
1756 rc = 0;
1757 write_lock_bh(&x25_neigh_list_lock);
1758 nb->extended = x25_subscr.extended;
1759 nb->dce = x25_subscr.dce;
1760 nb->lc = x25_subscr.lc;
> 1761 nb->facilities = x25_subscr.facilities;
1762 nb->t20 = x25_subscr.t20;
1763 nb->global_facil_mask = x25_subscr.global_facil_mask;
1764 write_unlock_bh(&x25_neigh_list_lock);
1765 }
1766 dev_put(dev);
1767
1768 x25_neigh_put(nb);
1769 out:
1770 return rc;
1771 out_dev_and_neigh_put:
1772 x25_neigh_put(nb);
1773 out_dev_put:
1774 dev_put(dev);
1775 goto out;
1776 }
1777
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [PATCH RFC 02/12] vdpa: split vdpasim to core and net modules
by Dan Carpenter
Hi Stefano,
url: https://github.com/0day-ci/linux/commits/Stefano-Garzarella/vdpa-generali...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 585e5b17b92dead8a3aca4e3c9876fbca5f7e0ba
config: x86_64-randconfig-m001-20201114 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/vdpa/vdpa_sim/vdpa_sim.c:242 vdpasim_create() error: uninitialized symbol 'dev'.
vim +/dev +242 drivers/vdpa/vdpa_sim/vdpa_sim.c
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 184 struct vdpasim *vdpasim_create(struct vdpasim_init_attr *attr)
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 185 {
de91a4d0e725db3 drivers/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-08-04 186 const struct vdpa_config_ops *ops;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 187 struct vdpasim *vdpasim;
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 188 u32 device_id;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 189 struct device *dev;
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 190 int i, size, ret = -ENOMEM;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 191
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 192 device_id = attr->device_id;
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 193 /* Currently, we only accept the network and block devices. */
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 194 if (device_id != VIRTIO_ID_NET && device_id != VIRTIO_ID_BLOCK)
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 195 return ERR_PTR(-EOPNOTSUPP);
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 196
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 197 if (attr->batch_mapping)
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 198 ops = &vdpasim_batch_config_ops;
de91a4d0e725db3 drivers/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-08-04 199 else
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 200 ops = &vdpasim_config_ops;
de91a4d0e725db3 drivers/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-08-04 201
a9974489b61c09c drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-08-04 202 vdpasim = vdpa_alloc_device(struct vdpasim, vdpa, NULL, ops, VDPASIM_VQ_NUM);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 203 if (!vdpasim)
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 204 goto err_alloc;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 205
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 206 if (device_id == VIRTIO_ID_NET)
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 207 size = sizeof(struct virtio_net_config);
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 208 else
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 209 size = sizeof(struct virtio_blk_config);
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 210 vdpasim->config = kzalloc(size, GFP_KERNEL);
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 211 if (!vdpasim->config)
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 212 goto err_iommu;
^^^^^^^^^^^^^^
"dev" not initialized on this path.
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 213
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 214 vdpasim->device_id = device_id;
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 215 vdpasim->supported_features = attr->features;
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 216 INIT_WORK(&vdpasim->work, attr->work_fn);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 217 spin_lock_init(&vdpasim->lock);
1e3e792650d2c0d drivers/vdpa/vdpa_sim/vdpa_sim.c Michael S. Tsirkin 2020-08-10 218 spin_lock_init(&vdpasim->iommu_lock);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 219
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 220 dev = &vdpasim->vdpa.dev;
1eca16b231570c8 drivers/vdpa/vdpa_sim/vdpa_sim.c Laurent Vivier 2020-10-27 221 dev->dma_mask = &dev->coherent_dma_mask;
1eca16b231570c8 drivers/vdpa/vdpa_sim/vdpa_sim.c Laurent Vivier 2020-10-27 222 if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)))
1eca16b231570c8 drivers/vdpa/vdpa_sim/vdpa_sim.c Laurent Vivier 2020-10-27 223 goto err_iommu;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 224 set_dma_ops(dev, &vdpasim_dma_ops);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 225
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 226 vdpasim->iommu = vhost_iotlb_alloc(2048, 0);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 227 if (!vdpasim->iommu)
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 228 goto err_iommu;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 229
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 230 vdpasim->buffer = kmalloc(PAGE_SIZE, GFP_KERNEL);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 231 if (!vdpasim->buffer)
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 232 goto err_iommu;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 233
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 234 for (i = 0; i < VDPASIM_VQ_NUM; i++)
12adecc2babdd7b drivers/vdpa/vdpa_sim/vdpa_sim.c Max Gurtovoy 2020-11-13 235 vringh_set_iotlb(&vdpasim->vqs[i].vring, vdpasim->iommu);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 236
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 237 vdpasim->vdpa.dma_dev = dev;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 238
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 239 return vdpasim;
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 240
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 241 err_iommu:
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 @242 put_device(dev);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 243 err_alloc:
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 244 return ERR_PTR(ret);
2c53d0f64c06f45 drivers/virtio/vdpa/vdpa_sim/vdpa_sim.c Jason Wang 2020-03-26 245 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
include/linux/string.h:377:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
by kernel test robot
Hi Karsten,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 09162bc32c880a791c6c0668ce0745cf7958f576
commit: f3811fd7bc97587b142fed9edf8c726694220cb2 net/smc: send DELETE_LINK, ALL message and wait for send to complete
date: 7 months ago
config: arm-randconfig-r012-20201116 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f3811fd7bc97587b142fed9edf8c726694220cb2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
net/smc/smc_llc.c:754:31: warning: variable 'del_llc' set but not used [-Wunused-but-set-variable]
754 | struct smc_llc_msg_del_link *del_llc;
| ^~~~~~~
net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
net/smc/smc_llc.c:1301:33: warning: variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
1301 | struct smc_llc_msg_del_link *del_llc_resp;
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/net/tcp.h:19,
from net/smc/smc_llc.c:13:
net/smc/smc_llc.c: In function 'smc_llc_add_pending_send':
include/linux/compiler.h:350:38: error: call to '__compiletime_assert_198' declared with attribute error: must increase SMC_WR_BUF_SIZE to at least sizeof(struct smc_llc_msg)
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
331 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c:348:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
348 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
include/linux/compiler.h:350:38: error: call to '__compiletime_assert_199' declared with attribute error: must adapt SMC_WR_TX_SIZE to sizeof(struct smc_llc_msg); if not all smc_wr upper layer protocols use the same message size any more, must start to set link->wr_tx_sges[i].length on each individual smc_wr_tx_send()
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
331 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
350 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
net/smc/smc_llc.c:351:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
351 | BUILD_BUG_ON_MSG(
| ^~~~~~~~~~~~~~~~
In file included from include/linux/bitmap.h:9,
from include/linux/nodemask.h:95,
from include/linux/mmzone.h:17,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from include/linux/bvec.h:13,
from include/linux/skbuff.h:17,
from include/linux/tcp.h:17,
from include/net/tcp.h:20,
from net/smc/smc_llc.c:13:
In function 'memcpy',
inlined from 'smc_llc_send_message_wait' at net/smc/smc_llc.c:578:2,
inlined from 'smc_llc_send_link_delete_all' at net/smc/smc_llc.c:1255:8:
>> include/linux/string.h:377:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
377 | __read_overflow2();
| ^~~~~~~~~~~~~~~~~~
vim +/__read_overflow2 +377 include/linux/string.h
6974f0c4555e285 Daniel Micay 2017-07-12 368
6974f0c4555e285 Daniel Micay 2017-07-12 369 __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
6974f0c4555e285 Daniel Micay 2017-07-12 370 {
6974f0c4555e285 Daniel Micay 2017-07-12 371 size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e285 Daniel Micay 2017-07-12 372 size_t q_size = __builtin_object_size(q, 0);
6974f0c4555e285 Daniel Micay 2017-07-12 373 if (__builtin_constant_p(size)) {
6974f0c4555e285 Daniel Micay 2017-07-12 374 if (p_size < size)
6974f0c4555e285 Daniel Micay 2017-07-12 375 __write_overflow();
6974f0c4555e285 Daniel Micay 2017-07-12 376 if (q_size < size)
6974f0c4555e285 Daniel Micay 2017-07-12 @377 __read_overflow2();
6974f0c4555e285 Daniel Micay 2017-07-12 378 }
6974f0c4555e285 Daniel Micay 2017-07-12 379 if (p_size < size || q_size < size)
6974f0c4555e285 Daniel Micay 2017-07-12 380 fortify_panic(__func__);
6974f0c4555e285 Daniel Micay 2017-07-12 381 return __builtin_memcpy(p, q, size);
6974f0c4555e285 Daniel Micay 2017-07-12 382 }
6974f0c4555e285 Daniel Micay 2017-07-12 383
:::::: The code at line 377 was first introduced by commit
:::::: 6974f0c4555e285ab217cee58b6e874f776ff409 include/linux/string.h: add the option of fortified string.h functions
:::::: TO: Daniel Micay <danielmicay(a)gmail.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months