[PATCH net 3/4] security: add sctp_assoc_established hook
kernel test robot
lkp at intel.com
Mon Oct 25 05:01:42 UTC 2021
Hi Xin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net/master]
url: https://github.com/0day-ci/linux/commits/Xin-Long/security-fixups-for-the-security-hooks-in-sctp/20211022-143827
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 397430b50a363d8b7bdda00522123f82df6adc5e
config: hexagon-randconfig-r041-20211025 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a461fa64bb37cffd73f683c74f6b0780379fc2ca)
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/32fba59611e67404b515f7864aa67a3abd2f7978
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xin-Long/security-fixups-for-the-security-hooks-in-sctp/20211022-143827
git checkout 32fba59611e67404b515f7864aa67a3abd2f7978
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/vgem/vgem_drv.c:36:
In file included from include/linux/shmem_fs.h:11:
In file included from include/linux/fs_parser.h:11:
In file included from include/linux/fs_context.h:14:
include/linux/security.h:1651:2: error: void function 'security_sctp_assoc_established' should not return a value [-Wreturn-type]
return 0;
^ ~
>> drivers/gpu/drm/vgem/vgem_drv.c:460:10: warning: shift count >= width of type [-Wshift-count-overflow]
DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 1 error generated.
vim +460 drivers/gpu/drm/vgem/vgem_drv.c
502e95c6678505 Zach Reizner 2015-03-04 444
502e95c6678505 Zach Reizner 2015-03-04 445 static int __init vgem_init(void)
502e95c6678505 Zach Reizner 2015-03-04 446 {
502e95c6678505 Zach Reizner 2015-03-04 447 int ret;
bcc0ef7f57e51e Daniel Vetter 2020-09-09 448 struct platform_device *pdev;
502e95c6678505 Zach Reizner 2015-03-04 449
bcc0ef7f57e51e Daniel Vetter 2020-09-09 450 pdev = platform_device_register_simple("vgem", -1, NULL, 0);
bcc0ef7f57e51e Daniel Vetter 2020-09-09 451 if (IS_ERR(pdev))
bcc0ef7f57e51e Daniel Vetter 2020-09-09 452 return PTR_ERR(pdev);
e2aff44868ae60 Laura Abbott 2017-05-04 453
bcc0ef7f57e51e Daniel Vetter 2020-09-09 454 if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) {
bcc0ef7f57e51e Daniel Vetter 2020-09-09 455 ret = -ENOMEM;
bcc0ef7f57e51e Daniel Vetter 2020-09-09 456 goto out_unregister;
502e95c6678505 Zach Reizner 2015-03-04 457 }
502e95c6678505 Zach Reizner 2015-03-04 458
bcc0ef7f57e51e Daniel Vetter 2020-09-09 459 dma_coerce_mask_and_coherent(&pdev->dev,
e2aff44868ae60 Laura Abbott 2017-05-04 @460 DMA_BIT_MASK(64));
bcc0ef7f57e51e Daniel Vetter 2020-09-09 461
bcc0ef7f57e51e Daniel Vetter 2020-09-09 462 vgem_device = devm_drm_dev_alloc(&pdev->dev, &vgem_driver,
bcc0ef7f57e51e Daniel Vetter 2020-09-09 463 struct vgem_device, drm);
bcc0ef7f57e51e Daniel Vetter 2020-09-09 464 if (IS_ERR(vgem_device)) {
bcc0ef7f57e51e Daniel Vetter 2020-09-09 465 ret = PTR_ERR(vgem_device);
bcc0ef7f57e51e Daniel Vetter 2020-09-09 466 goto out_devres;
bcc0ef7f57e51e Daniel Vetter 2020-09-09 467 }
bcc0ef7f57e51e Daniel Vetter 2020-09-09 468 vgem_device->platform = pdev;
e2aff44868ae60 Laura Abbott 2017-05-04 469
315f0242aa2b1e Chris Wilson 2017-05-08 470 /* Final step: expose the device/driver to userspace */
315f0242aa2b1e Chris Wilson 2017-05-08 471 ret = drm_dev_register(&vgem_device->drm, 0);
502e95c6678505 Zach Reizner 2015-03-04 472 if (ret)
bcc0ef7f57e51e Daniel Vetter 2020-09-09 473 goto out_devres;
502e95c6678505 Zach Reizner 2015-03-04 474
502e95c6678505 Zach Reizner 2015-03-04 475 return 0;
502e95c6678505 Zach Reizner 2015-03-04 476
bcc0ef7f57e51e Daniel Vetter 2020-09-09 477 out_devres:
bcc0ef7f57e51e Daniel Vetter 2020-09-09 478 devres_release_group(&pdev->dev, NULL);
d5c04dff24870e Deepak Sharma 2018-10-23 479 out_unregister:
bcc0ef7f57e51e Daniel Vetter 2020-09-09 480 platform_device_unregister(pdev);
502e95c6678505 Zach Reizner 2015-03-04 481 return ret;
502e95c6678505 Zach Reizner 2015-03-04 482 }
502e95c6678505 Zach Reizner 2015-03-04 483
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
More information about the Linux-security-module-archive
mailing list