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>] [day] [month] [year] [list]
Message-ID: <202111121056.2BrvXQza-lkp@intel.com>
Date:   Fri, 12 Nov 2021 10:53:05 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sidraya <sidraya.bj@...hpartnertech.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Praneeth Bajjuri <praneeth@...com>,
        Angela Stegmaier <angelabaker@...com>
Subject: [ti:ti-rt-linux-5.10.y 10173/10194]
 drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:159:17:
 error: implicit declaration of function 'vunmap'; did you mean 'iounmap'?

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head:   aafb1bd67f22b44cf5f8072266002696adaa21b0
commit: 97dfdd999ba7266785579c99c40a3c65e63e864a [10173/10194] media: platform: vxd: Kconfig: Add Video decoder Kconfig and Makefile
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 11.2.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
        git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
        git fetch --no-tags ti ti-rt-linux-5.10.y
        git checkout 97dfdd999ba7266785579c99c40a3c65e63e864a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips 

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

All error/warnings (new ones prefixed by >>):

   drivers/media/platform/vxe-vxd/decoder/vxd_core.c: In function 'stream_worker':
>> drivers/media/platform/vxe-vxd/decoder/vxd_core.c:550:25: warning: variable 'vxd' set but not used [-Wunused-but-set-variable]
     550 |         struct vxd_dev *vxd = NULL;
         |                         ^~~
--
   In file included from include/linux/printk.h:409,
                    from include/linux/kernel.h:16,
                    from include/linux/radix-tree.h:12,
                    from include/linux/idr.h:15,
                    from drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:15:
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c: In function '_img_mem_alloc':
>> drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:291:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
     291 |         dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:129:29: note: in definition of macro '__dynamic_func_call'
     129 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:161:9: note: in expansion of macro '_dynamic_func_call'
     161 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:291:9: note: in expansion of macro 'dev_dbg'
     291 |         dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
         |         ^~~~~~~
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:291:81: note: format string is defined here
     291 |         dev_dbg(device, "%s heap %p ctx %p created buffer %d (%p) actual_size %zu\n",
         |                                                                               ~~^
         |                                                                                 |
         |                                                                                 unsigned int
         |                                                                               %lu
   In file included from include/linux/printk.h:409,
                    from include/linux/kernel.h:16,
                    from include/linux/radix-tree.h:12,
                    from include/linux/idr.h:15,
                    from drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:15:
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c: In function 'img_mem_alloc':
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:310:25: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'long unsigned int' [-Wformat=]
     310 |         dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:129:29: note: in definition of macro '__dynamic_func_call'
     129 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:161:9: note: in expansion of macro '_dynamic_func_call'
     161 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:310:9: note: in expansion of macro 'dev_dbg'
     310 |         dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
         |         ^~~~~~~
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:310:51: note: format string is defined here
     310 |         dev_dbg(device, "%s heap %d ctx %p size %zu\n", __func__, heap_id,
         |                                                 ~~^
         |                                                   |
         |                                                   unsigned int
         |                                                 %lu
   In file included from include/linux/printk.h:409,
                    from include/linux/kernel.h:16,
                    from include/linux/radix-tree.h:12,
                    from include/linux/idr.h:15,
                    from drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:15:
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:334:25: warning: format '%zu' expects argument of type 'size_t', but argument 9 has type 'long unsigned int' [-Wformat=]
     334 |         dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:129:29: note: in definition of macro '__dynamic_func_call'
     129 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:161:9: note: in expansion of macro '_dynamic_func_call'
     161 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:30: note: in expansion of macro 'dev_fmt'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                              ^~~~~~~
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:334:9: note: in expansion of macro 'dev_dbg'
     334 |         dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
         |         ^~~~~~~
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:334:74: note: format string is defined here
     334 |         dev_dbg(device, "%s heap %d ctx %p created buffer %d (%p) size %zu\n",
         |                                                                        ~~^
         |                                                                          |
         |                                                                          unsigned int
         |                                                                        %lu
   In file included from include/linux/printk.h:409,
                    from include/linux/kernel.h:16,
                    from include/linux/radix-tree.h:12,
                    from include/linux/idr.h:15,
                    from drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:15:
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c: In function '_img_mem_import':
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_man.c:373:25: warning: format '%zu' expects argument of type 'size_t', but argument 8 has type 'long unsigned int' [-Wformat=]
     373 |         dev_dbg(device, "%s ctx %p created buffer %d (%p) actual_size %zu\n",
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:129:29: note: in definition of macro '__dynamic_func_call'
     129 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:161:9: note: in expansion of macro '_dynamic_func_call'
     161 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:123:9: note: in expansion of macro 'dynamic_dev_dbg'
     123 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
--
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c: In function 'unified_free':
>> drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:159:17: error: implicit declaration of function 'vunmap'; did you mean 'iounmap'? [-Werror=implicit-function-declaration]
     159 |                 vunmap(buffer->kptr);
         |                 ^~~~~~
         |                 iounmap
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c: In function 'unified_map_km':
>> drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:197:24: error: implicit declaration of function 'vmap'; did you mean 'bmap'? [-Werror=implicit-function-declaration]
     197 |         buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
         |                        ^~~~
         |                        bmap
>> drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:197:63: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MTE'?
     197 |         buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
         |                                                               ^~~~~~
         |                                                               VM_MTE
   drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c:197:63: note: each undeclared identifier is reported only once for each function it appears in
   cc1: some warnings being treated as errors
--
   drivers/media/platform/vxe-vxd/decoder/../common/work_queue.c: In function 'get_delayed_work_buff':
>> drivers/media/platform/vxe-vxd/decoder/../common/work_queue.c:148:22: warning: variable 'previous' set but not used [-Wunused-but-set-variable]
     148 |         struct node *previous = NULL;
         |                      ^~~~~~~~
--
   drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c: In function 'vxd_dec_buf_prepare':
>> drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:36: error: implicit declaration of function 'phys_to_page'; did you mean 'pfn_to_page'? [-Werror=implicit-function-declaration]
     714 |                         new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
         |                                    ^~~~~~~~~~~~
         |                                    pfn_to_page
>> drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:714:34: warning: assignment to 'struct page *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     714 |                         new_page = phys_to_page(vb2_dma_contig_plane_dma_addr(vb, plane));
         |                                  ^
>> drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:620:13: warning: variable 'pages' set but not used [-Wunused-but-set-variable]
     620 |         int pages;
         |             ^~~~~
   In file included from drivers/media/platform/vxe-vxd/decoder/vxd_props.h:19,
                    from drivers/media/platform/vxe-vxd/decoder/decoder.h:29,
                    from drivers/media/platform/vxe-vxd/decoder/core.h:20,
                    from drivers/media/platform/vxe-vxd/decoder/vxd_v4l2.c:53:
   At top level:
   drivers/media/platform/vxe-vxd/common/imgmmu.h:65:28: warning: 'VIRT_DIR_IDX_MASK' defined but not used [-Wunused-const-variable=]
      65 | static const unsigned long VIRT_DIR_IDX_MASK = (~((1 << MMU_DIR_SHIFT) - 1));
         |                            ^~~~~~~~~~~~~~~~~
   drivers/media/platform/vxe-vxd/common/imgmmu.h:62:28: warning: 'VIRT_PAGE_TBL_MASK' defined but not used [-Wunused-const-variable=]
      62 | static const unsigned long VIRT_PAGE_TBL_MASK =
         |                            ^~~~~~~~~~~~~~~~~~
   drivers/media/platform/vxe-vxd/common/imgmmu.h:60:28: warning: 'VIRT_PAGE_OFF_MASK' defined but not used [-Wunused-const-variable=]
      60 | static const unsigned long VIRT_PAGE_OFF_MASK = ((1 << MMU_PAGE_SHIFT) - 1);
         |                            ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/media/platform/vxe-vxd/decoder/hevc_secure_parser.c: In function 'bspp_hevc_parse_vps':
>> drivers/media/platform/vxe-vxd/decoder/hevc_secure_parser.c:594:1: warning: the frame size of 1192 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     594 | }
         | ^
--
>> drivers/media/platform/vxe-vxd/decoder/jpeg_secure_parser.c:596:5: warning: no previous prototype for 'bspp_jpeg_unit_parser' [-Wmissing-prototypes]
     596 | int bspp_jpeg_unit_parser(void *swsr_ctx, struct bspp_unit_data *unit_data)
         |     ^~~~~~~~~~~~~~~~~~~~~


vim +159 drivers/media/platform/vxe-vxd/decoder/../common/img_mem_unified.c

b738db9eda05d06 Sidraya 2021-11-02  145  
b738db9eda05d06 Sidraya 2021-11-02  146  static void unified_free(struct heap *heap, struct buffer *buffer)
b738db9eda05d06 Sidraya 2021-11-02  147  {
b738db9eda05d06 Sidraya 2021-11-02  148  	void *dev = buffer->device;
b738db9eda05d06 Sidraya 2021-11-02  149  	void *sgt = buffer->priv;
b738db9eda05d06 Sidraya 2021-11-02  150  	void *sgl;
b738db9eda05d06 Sidraya 2021-11-02  151  
b738db9eda05d06 Sidraya 2021-11-02  152  	dev_dbg(dev, "%s:%d buffer %d (0x%p)\n", __func__, __LINE__,
b738db9eda05d06 Sidraya 2021-11-02  153  		buffer->id, buffer);
b738db9eda05d06 Sidraya 2021-11-02  154  
b738db9eda05d06 Sidraya 2021-11-02  155  	if (buffer->kptr) {
b738db9eda05d06 Sidraya 2021-11-02  156  		dev_dbg(dev, "%s vunmap 0x%p\n", __func__, buffer->kptr);
b738db9eda05d06 Sidraya 2021-11-02  157  		dma_unmap_sg(dev, img_mmu_get_sgl(sgt), img_mmu_get_orig_nents(sgt),
b738db9eda05d06 Sidraya 2021-11-02  158  			     DMA_FROM_DEVICE);
b738db9eda05d06 Sidraya 2021-11-02 @159  		vunmap(buffer->kptr);
b738db9eda05d06 Sidraya 2021-11-02  160  	}
b738db9eda05d06 Sidraya 2021-11-02  161  
b738db9eda05d06 Sidraya 2021-11-02  162  	sgl = img_mmu_get_sgl(sgt);
b738db9eda05d06 Sidraya 2021-11-02  163  	while (sgl) {
b738db9eda05d06 Sidraya 2021-11-02  164  		__free_page(sg_page(sgl));
b738db9eda05d06 Sidraya 2021-11-02  165  		sgl = sg_next(sgl);
b738db9eda05d06 Sidraya 2021-11-02  166  	}
b738db9eda05d06 Sidraya 2021-11-02  167  	sg_free_table(sgt);
b738db9eda05d06 Sidraya 2021-11-02  168  	kfree(sgt);
b738db9eda05d06 Sidraya 2021-11-02  169  }
b738db9eda05d06 Sidraya 2021-11-02  170  
b738db9eda05d06 Sidraya 2021-11-02  171  static int unified_map_km(struct heap *heap, struct buffer *buffer)
b738db9eda05d06 Sidraya 2021-11-02  172  {
b738db9eda05d06 Sidraya 2021-11-02  173  	void *dev = buffer->device;
b738db9eda05d06 Sidraya 2021-11-02  174  	void *sgt = buffer->priv;
b738db9eda05d06 Sidraya 2021-11-02  175  	void *sgl = img_mmu_get_sgl(sgt);
b738db9eda05d06 Sidraya 2021-11-02  176  	unsigned int num_pages = sg_nents(sgl);
b738db9eda05d06 Sidraya 2021-11-02  177  	unsigned int orig_nents = img_mmu_get_orig_nents(sgt);
b738db9eda05d06 Sidraya 2021-11-02  178  	void **pages;
b738db9eda05d06 Sidraya 2021-11-02  179  	int ret;
b738db9eda05d06 Sidraya 2021-11-02  180  	pgprot_t prot;
b738db9eda05d06 Sidraya 2021-11-02  181  
b738db9eda05d06 Sidraya 2021-11-02  182  	dev_dbg(dev, "%s:%d buffer %d (0x%p)\n", __func__, __LINE__, buffer->id, buffer);
b738db9eda05d06 Sidraya 2021-11-02  183  
b738db9eda05d06 Sidraya 2021-11-02  184  	if (buffer->kptr) {
b738db9eda05d06 Sidraya 2021-11-02  185  		dev_warn(dev, "%s called for already mapped buffer %d\n", __func__, buffer->id);
b738db9eda05d06 Sidraya 2021-11-02  186  		return 0;
b738db9eda05d06 Sidraya 2021-11-02  187  	}
b738db9eda05d06 Sidraya 2021-11-02  188  
b738db9eda05d06 Sidraya 2021-11-02  189  	pages = kmalloc_array(num_pages, sizeof(void *), GFP_KERNEL);
b738db9eda05d06 Sidraya 2021-11-02  190  	if (!pages)
b738db9eda05d06 Sidraya 2021-11-02  191  		return -ENOMEM;
b738db9eda05d06 Sidraya 2021-11-02  192  
b738db9eda05d06 Sidraya 2021-11-02  193  	img_mmu_get_pages(pages, sgt);
b738db9eda05d06 Sidraya 2021-11-02  194  
b738db9eda05d06 Sidraya 2021-11-02  195  	prot = PAGE_KERNEL;
b738db9eda05d06 Sidraya 2021-11-02  196  	prot = pgprot_writecombine(prot);
b738db9eda05d06 Sidraya 2021-11-02 @197  	buffer->kptr = vmap((struct page **)pages, num_pages, VM_MAP, prot);
b738db9eda05d06 Sidraya 2021-11-02  198  	kfree(pages);
b738db9eda05d06 Sidraya 2021-11-02  199  	if (!buffer->kptr) {
b738db9eda05d06 Sidraya 2021-11-02  200  		dev_err(dev, "%s vmap failed!\n", __func__);
b738db9eda05d06 Sidraya 2021-11-02  201  		return -EFAULT;
b738db9eda05d06 Sidraya 2021-11-02  202  	}
b738db9eda05d06 Sidraya 2021-11-02  203  
b738db9eda05d06 Sidraya 2021-11-02  204  	ret = dma_map_sg(dev, sgl, orig_nents, DMA_FROM_DEVICE);
b738db9eda05d06 Sidraya 2021-11-02  205  
b738db9eda05d06 Sidraya 2021-11-02  206  	if (ret <= 0) {
b738db9eda05d06 Sidraya 2021-11-02  207  		dev_err(dev, "%s dma_map_sg failed!\n", __func__);
b738db9eda05d06 Sidraya 2021-11-02  208  		vunmap(buffer->kptr);
b738db9eda05d06 Sidraya 2021-11-02  209  		return -EFAULT;
b738db9eda05d06 Sidraya 2021-11-02  210  	}
b738db9eda05d06 Sidraya 2021-11-02  211  	dev_dbg(dev, "%s:%d buffer %d orig_nents %d nents %d\n", __func__,
b738db9eda05d06 Sidraya 2021-11-02  212  		__LINE__, buffer->id, orig_nents, ret);
b738db9eda05d06 Sidraya 2021-11-02  213  
b738db9eda05d06 Sidraya 2021-11-02  214  	img_mmu_set_sgt_nents(sgt, ret);
b738db9eda05d06 Sidraya 2021-11-02  215  
b738db9eda05d06 Sidraya 2021-11-02  216  	dev_dbg(dev, "%s:%d buffer %d vmap to 0x%p\n", __func__, __LINE__,
b738db9eda05d06 Sidraya 2021-11-02  217  		buffer->id, buffer->kptr);
b738db9eda05d06 Sidraya 2021-11-02  218  
b738db9eda05d06 Sidraya 2021-11-02  219  	return 0;
b738db9eda05d06 Sidraya 2021-11-02  220  }
b738db9eda05d06 Sidraya 2021-11-02  221  

:::::: The code at line 159 was first introduced by commit
:::::: b738db9eda05d068022ccbfbba25f5f0a0a09eaa v4l: vxd-dec: Create vxd_dec Mem Manager helper library

:::::: TO: Sidraya <sidraya.bj@...hpartnertech.com>
:::::: CC: Praneeth Bajjuri <praneeth@...com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ