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]
Date:   Thu, 20 Oct 2022 09:14:07 +0800
From:   kernel test robot <lkp@...el.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [arm-integrator:virt-to-pfn-v6.1-rc1 6/20]
 drivers/net/xen-netback/netback.c:600:37: warning: passing argument 1 of
 'virt_to_pfn' makes pointer from integer without a cast

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git virt-to-pfn-v6.1-rc1
head:   1991cddd20a7836e10b20ed128b2e7b80cd42eef
commit: c18a7fd40bd5b9ad1cc13b5817c1d3e8338579ca [6/20] ARM: mm: Make virt_to_pfn() a static inline
config: arm-randconfig-r012-20221019
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/linusw/linux-integrator.git/commit/?id=c18a7fd40bd5b9ad1cc13b5817c1d3e8338579ca
        git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
        git fetch --no-tags arm-integrator virt-to-pfn-v6.1-rc1
        git checkout c18a7fd40bd5b9ad1cc13b5817c1d3e8338579ca
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/mm/ drivers/net/xen-netback/

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

All warnings (new ones prefixed by >>):

   In file included from arch/arm/include/asm/memory.h:392,
                    from arch/arm/include/asm/page.h:163,
                    from include/linux/mm_types_task.h:16,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from drivers/net/xen-netback/common.h:32,
                    from drivers/net/xen-netback/netback.c:35:
   drivers/net/xen-netback/netback.c: In function 'xenvif_fill_frags':
>> drivers/net/xen-netback/netback.c:600:37: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
     600 |                 page = virt_to_page(idx_to_kaddr(queue, pending_idx));
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                     |
         |                                     long unsigned int
   include/asm-generic/memory_model.h:40:32: note: in definition of macro '__pfn_to_page'
      40 | ({      unsigned long __pfn = (pfn);                    \
         |                                ^~~
   drivers/net/xen-netback/netback.c:600:24: note: in expansion of macro 'virt_to_page'
     600 |                 page = virt_to_page(idx_to_kaddr(queue, pending_idx));
         |                        ^~~~~~~~~~~~
   arch/arm/include/asm/memory.h:292:53: note: expected 'const void *' but argument is of type 'long unsigned int'
     292 | static inline unsigned long virt_to_pfn(const void *p)
         |                                         ~~~~~~~~~~~~^


vim +/virt_to_pfn +600 drivers/net/xen-netback/netback.c

f942dc2552b8bfd Ian Campbell 2011-03-15  572  
e9ce7cb6b107407 Wei Liu      2014-06-04  573  static void xenvif_fill_frags(struct xenvif_queue *queue, struct sk_buff *skb)
f942dc2552b8bfd Ian Campbell 2011-03-15  574  {
f942dc2552b8bfd Ian Campbell 2011-03-15  575  	struct skb_shared_info *shinfo = skb_shinfo(skb);
f942dc2552b8bfd Ian Campbell 2011-03-15  576  	int nr_frags = shinfo->nr_frags;
f942dc2552b8bfd Ian Campbell 2011-03-15  577  	int i;
f53c3fe8dad725b Zoltan Kiss  2014-03-06  578  	u16 prev_pending_idx = INVALID_PENDING_IDX;
f53c3fe8dad725b Zoltan Kiss  2014-03-06  579  
f942dc2552b8bfd Ian Campbell 2011-03-15  580  	for (i = 0; i < nr_frags; i++) {
f942dc2552b8bfd Ian Campbell 2011-03-15  581  		skb_frag_t *frag = shinfo->frags + i;
f942dc2552b8bfd Ian Campbell 2011-03-15  582  		struct xen_netif_tx_request *txp;
ea066ad158631f5 Ian Campbell 2011-10-05  583  		struct page *page;
ea066ad158631f5 Ian Campbell 2011-10-05  584  		u16 pending_idx;
f942dc2552b8bfd Ian Campbell 2011-03-15  585  
ea066ad158631f5 Ian Campbell 2011-10-05  586  		pending_idx = frag_get_pending_idx(frag);
f942dc2552b8bfd Ian Campbell 2011-03-15  587  
f53c3fe8dad725b Zoltan Kiss  2014-03-06  588  		/* If this is not the first frag, chain it to the previous*/
bdab82759b8e362 Zoltan Kiss  2014-04-02  589  		if (prev_pending_idx == INVALID_PENDING_IDX)
f53c3fe8dad725b Zoltan Kiss  2014-03-06  590  			skb_shinfo(skb)->destructor_arg =
e9ce7cb6b107407 Wei Liu      2014-06-04  591  				&callback_param(queue, pending_idx);
bdab82759b8e362 Zoltan Kiss  2014-04-02  592  		else
e9ce7cb6b107407 Wei Liu      2014-06-04  593  			callback_param(queue, prev_pending_idx).ctx =
e9ce7cb6b107407 Wei Liu      2014-06-04  594  				&callback_param(queue, pending_idx);
f53c3fe8dad725b Zoltan Kiss  2014-03-06  595  
e9ce7cb6b107407 Wei Liu      2014-06-04  596  		callback_param(queue, pending_idx).ctx = NULL;
f53c3fe8dad725b Zoltan Kiss  2014-03-06  597  		prev_pending_idx = pending_idx;
f53c3fe8dad725b Zoltan Kiss  2014-03-06  598  
e9ce7cb6b107407 Wei Liu      2014-06-04  599  		txp = &queue->pending_tx_info[pending_idx].req;
e9ce7cb6b107407 Wei Liu      2014-06-04 @600  		page = virt_to_page(idx_to_kaddr(queue, pending_idx));
ea066ad158631f5 Ian Campbell 2011-10-05  601  		__skb_fill_page_desc(skb, i, page, txp->offset, txp->size);
f942dc2552b8bfd Ian Campbell 2011-03-15  602  		skb->len += txp->size;
f942dc2552b8bfd Ian Campbell 2011-03-15  603  		skb->data_len += txp->size;
f942dc2552b8bfd Ian Campbell 2011-03-15  604  		skb->truesize += txp->size;
f942dc2552b8bfd Ian Campbell 2011-03-15  605  
f53c3fe8dad725b Zoltan Kiss  2014-03-06  606  		/* Take an extra reference to offset network stack's put_page */
e9ce7cb6b107407 Wei Liu      2014-06-04  607  		get_page(queue->mmap_pages[pending_idx]);
f942dc2552b8bfd Ian Campbell 2011-03-15  608  	}
f942dc2552b8bfd Ian Campbell 2011-03-15  609  }
f942dc2552b8bfd Ian Campbell 2011-03-15  610  

:::::: The code at line 600 was first introduced by commit
:::::: e9ce7cb6b107407e4798e8905b18ad8b642766f6 xen-netback: Factor queue-specific data into queue struct

:::::: TO: Wei Liu <wei.liu2@...rix.com>
:::::: CC: David S. Miller <davem@...emloft.net>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (196433 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ