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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202201290701.fKs5pg0E-lkp@intel.com>
Date:   Sat, 29 Jan 2022 07:47:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     farah kassabri <fkassabri@...ana.ai>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Oded Gabbay <ogabbay@...nel.org>
Subject: [ogabbay:habanalabs-next 32/33]
 drivers/misc/habanalabs/common/irq.c:178:5: warning: no previous prototype
 for 'handle_registration_node'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git habanalabs-next
head:   c720ae02be190b7639446bba872752a68cb4ba17
commit: 402f801a3488a90a5481524ea87c3da17867e635 [32/33] habanalabs: Timestamps buffers registration
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20220129/202201290701.fKs5pg0E-lkp@intel.com/config)
compiler: alpha-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
        # https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git/commit/?id=402f801a3488a90a5481524ea87c3da17867e635
        git remote add ogabbay https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux.git
        git fetch --no-tags ogabbay habanalabs-next
        git checkout 402f801a3488a90a5481524ea87c3da17867e635
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/misc/

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

All warnings (new ones prefixed by >>):

>> drivers/misc/habanalabs/common/irq.c:178:5: warning: no previous prototype for 'handle_registration_node' [-Wmissing-prototypes]
     178 | int handle_registration_node(struct hl_device *hdev, struct hl_user_pending_interrupt *pend,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~
--
   drivers/misc/habanalabs/common/memory.c: In function 'ts_buff_release':
   drivers/misc/habanalabs/common/memory.c:2046:9: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
    2046 |         vfree(buff->kernel_buff_address);
         |         ^~~~~
         |         kvfree
   drivers/misc/habanalabs/common/memory.c: In function 'hl_ts_mmap':
   drivers/misc/habanalabs/common/memory.c:2150:14: error: implicit declaration of function 'remap_vmalloc_range'; did you mean 'ida_alloc_range'? [-Werror=implicit-function-declaration]
    2150 |         rc = remap_vmalloc_range(vma, buff->user_buff_address, 0);
         |              ^~~~~~~~~~~~~~~~~~~
         |              ida_alloc_range
   drivers/misc/habanalabs/common/memory.c: In function 'hl_ts_alloc_buff':
   drivers/misc/habanalabs/common/memory.c:2201:13: error: implicit declaration of function 'vmalloc_user'; did you mean 'kmalloc_order'? [-Werror=implicit-function-declaration]
    2201 |         p = vmalloc_user(size);
         |             ^~~~~~~~~~~~
         |             kmalloc_order
>> drivers/misc/habanalabs/common/memory.c:2201:11: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2201 |         p = vmalloc_user(size);
         |           ^
   drivers/misc/habanalabs/common/memory.c:2210:13: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration]
    2210 |         p = vmalloc(size);
         |             ^~~~~~~
         |             kvmalloc
   drivers/misc/habanalabs/common/memory.c:2210:11: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2210 |         p = vmalloc(size);
         |           ^
   cc1: some warnings being treated as errors


vim +/handle_registration_node +178 drivers/misc/habanalabs/common/irq.c

   167	
   168	/*
   169	 * This function called with spin_lock of wait_list_lock taken
   170	 * This function will set timestamp and delete the registration node from the
   171	 * wait_list_lock.
   172	 * and since we're protected with spin_lock here, so we cannot just put the refcount
   173	 * for the objects here, since the release function may be called and it's also a long
   174	 * logic (which might sleep also) that cannot be handled in irq context.
   175	 * so here we'll be filling a list with nodes of "put" jobs and then will send this
   176	 * list to a dedicated workqueue to do the actual put.
   177	 */
 > 178	int handle_registration_node(struct hl_device *hdev, struct hl_user_pending_interrupt *pend,
   179							struct list_head **free_list)
   180	{
   181		struct timestamp_reg_free_node *free_node;
   182		u64 timestamp;
   183	
   184		if (!(*free_list)) {
   185			/* Alloc/Init the timestamp registration free objects list */
   186			*free_list = kmalloc(sizeof(struct list_head), GFP_ATOMIC);
   187			if (!(*free_list))
   188				return -ENOMEM;
   189	
   190			INIT_LIST_HEAD(*free_list);
   191		}
   192	
   193		free_node = kmalloc(sizeof(*free_node), GFP_ATOMIC);
   194		if (!free_node)
   195			return -ENOMEM;
   196	
   197		timestamp = ktime_get_ns();
   198	
   199		*pend->ts_reg_info.timestamp_kernel_addr = timestamp;
   200	
   201		dev_dbg(hdev->dev, "Timestamp is set to ts cb address (%p), ts: 0x%llx\n",
   202				pend->ts_reg_info.timestamp_kernel_addr,
   203				*(u64 *)pend->ts_reg_info.timestamp_kernel_addr);
   204	
   205		list_del(&pend->wait_list_node);
   206	
   207		/* Mark kernel CB node as free */
   208		pend->ts_reg_info.in_use = 0;
   209	
   210		/* Putting the refcount for ts_buff and cq_cb objects will be handled
   211		 * in workqueue context, just add job to free_list.
   212		 */
   213		free_node->ts_buff = pend->ts_reg_info.ts_buff;
   214		free_node->cq_cb = pend->ts_reg_info.cq_cb;
   215		list_add(&free_node->free_objects_node, *free_list);
   216	
   217		return 0;
   218	}
   219	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ