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: <202208301535.M2atV9VI-lkp@intel.com>
Date:   Tue, 30 Aug 2022 15:29:00 +0800
From:   kernel test robot <lkp@...el.com>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [arm-integrator:virt-to-pfn-v6.0-rc1 24/24]
 arch/x86/xen/setup.c:341:25: warning: incompatible integer to pointer
 conversion passing 'unsigned long' to parameter of type 'const void *'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git virt-to-pfn-v6.0-rc1
head:   fd7709c9f1119794e96665ae423d79d93bfe43fc
commit: fd7709c9f1119794e96665ae423d79d93bfe43fc [24/24] x86/xen: Make virt_to_pfn() a static inline
config: x86_64-randconfig-r011-20220829
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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=fd7709c9f1119794e96665ae423d79d93bfe43fc
        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.0-rc1
        git checkout fd7709c9f1119794e96665ae423d79d93bfe43fc
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/xen/

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 >>):

>> arch/x86/xen/setup.c:341:25: warning: incompatible integer to pointer conversion passing 'unsigned long' to parameter of type 'const void *' [-Wint-conversion]
           mfn_save = virt_to_mfn(buf);
                                  ^~~
   arch/x86/include/asm/xen/page.h:302:49: note: expanded from macro 'virt_to_mfn'
   #define virt_to_mfn(v)          (pfn_to_mfn(virt_to_pfn(v)))
                                                           ^
   arch/x86/include/asm/xen/page.h:298:53: note: passing argument to parameter 'v' here
   static inline unsigned long virt_to_pfn(const void *v)
                                                       ^
   1 warning generated.


vim +341 arch/x86/xen/setup.c

83d51ab473dddd David Vrabel  2012-05-03  316  
83d51ab473dddd David Vrabel  2012-05-03  317  /*
4fbb67e3c87b80 Matt Rushton  2014-08-11  318   * This function updates the p2m and m2p tables with an identity map from
1f3ac86b4c45a1 Juergen Gross 2014-11-28  319   * start_pfn to start_pfn+size and prepares remapping the underlying RAM of the
1f3ac86b4c45a1 Juergen Gross 2014-11-28  320   * original allocation at remap_pfn. The information needed for remapping is
1f3ac86b4c45a1 Juergen Gross 2014-11-28  321   * saved in the memory itself to avoid the need for allocating buffers. The
1f3ac86b4c45a1 Juergen Gross 2014-11-28  322   * complete remap information is contained in a list of MFNs each containing
1f3ac86b4c45a1 Juergen Gross 2014-11-28  323   * up to REMAP_SIZE MFNs and the start target PFN for doing the remap.
1f3ac86b4c45a1 Juergen Gross 2014-11-28  324   * This enables us to preserve the original mfn sequence while doing the
1f3ac86b4c45a1 Juergen Gross 2014-11-28  325   * remapping at a time when the memory management is capable of allocating
1f3ac86b4c45a1 Juergen Gross 2014-11-28  326   * virtual and physical memory in arbitrary amounts, see 'xen_remap_memory' and
1f3ac86b4c45a1 Juergen Gross 2014-11-28  327   * its callers.
83d51ab473dddd David Vrabel  2012-05-03  328   */
1f3ac86b4c45a1 Juergen Gross 2014-11-28  329  static void __init xen_do_set_identity_and_remap_chunk(
4fbb67e3c87b80 Matt Rushton  2014-08-11  330          unsigned long start_pfn, unsigned long size, unsigned long remap_pfn)
4fbb67e3c87b80 Matt Rushton  2014-08-11  331  {
1f3ac86b4c45a1 Juergen Gross 2014-11-28  332  	unsigned long buf = (unsigned long)&xen_remap_buf;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  333  	unsigned long mfn_save, mfn;
4fbb67e3c87b80 Matt Rushton  2014-08-11  334  	unsigned long ident_pfn_iter, remap_pfn_iter;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  335  	unsigned long ident_end_pfn = start_pfn + size;
4fbb67e3c87b80 Matt Rushton  2014-08-11  336  	unsigned long left = size;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  337  	unsigned int i, chunk;
e201bfcc5c4fe6 David Vrabel  2013-07-22  338  
4fbb67e3c87b80 Matt Rushton  2014-08-11  339  	WARN_ON(size == 0);
e201bfcc5c4fe6 David Vrabel  2013-07-22  340  
1f3ac86b4c45a1 Juergen Gross 2014-11-28 @341  	mfn_save = virt_to_mfn(buf);
4fbb67e3c87b80 Matt Rushton  2014-08-11  342  
1f3ac86b4c45a1 Juergen Gross 2014-11-28  343  	for (ident_pfn_iter = start_pfn, remap_pfn_iter = remap_pfn;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  344  	     ident_pfn_iter < ident_end_pfn;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  345  	     ident_pfn_iter += REMAP_SIZE, remap_pfn_iter += REMAP_SIZE) {
1f3ac86b4c45a1 Juergen Gross 2014-11-28  346  		chunk = (left < REMAP_SIZE) ? left : REMAP_SIZE;
4fbb67e3c87b80 Matt Rushton  2014-08-11  347  
1f3ac86b4c45a1 Juergen Gross 2014-11-28  348  		/* Map first pfn to xen_remap_buf */
1f3ac86b4c45a1 Juergen Gross 2014-11-28  349  		mfn = pfn_to_mfn(ident_pfn_iter);
1f3ac86b4c45a1 Juergen Gross 2014-11-28  350  		set_pte_mfn(buf, mfn, PAGE_KERNEL);
4fbb67e3c87b80 Matt Rushton  2014-08-11  351  
1f3ac86b4c45a1 Juergen Gross 2014-11-28  352  		/* Save mapping information in page */
1f3ac86b4c45a1 Juergen Gross 2014-11-28  353  		xen_remap_buf.next_area_mfn = xen_remap_mfn;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  354  		xen_remap_buf.target_pfn = remap_pfn_iter;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  355  		xen_remap_buf.size = chunk;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  356  		for (i = 0; i < chunk; i++)
1f3ac86b4c45a1 Juergen Gross 2014-11-28  357  			xen_remap_buf.mfns[i] = pfn_to_mfn(ident_pfn_iter + i);
4fbb67e3c87b80 Matt Rushton  2014-08-11  358  
1f3ac86b4c45a1 Juergen Gross 2014-11-28  359  		/* Put remap buf into list. */
1f3ac86b4c45a1 Juergen Gross 2014-11-28  360  		xen_remap_mfn = mfn;
4fbb67e3c87b80 Matt Rushton  2014-08-11  361  
1f3ac86b4c45a1 Juergen Gross 2014-11-28  362  		/* Set identity map */
bc7142cf798ae7 David Vrabel  2015-01-07  363  		set_phys_range_identity(ident_pfn_iter, ident_pfn_iter + chunk);
4fbb67e3c87b80 Matt Rushton  2014-08-11  364  
1f3ac86b4c45a1 Juergen Gross 2014-11-28  365  		left -= chunk;
1f3ac86b4c45a1 Juergen Gross 2014-11-28  366  	}
4fbb67e3c87b80 Matt Rushton  2014-08-11  367  
1f3ac86b4c45a1 Juergen Gross 2014-11-28  368  	/* Restore old xen_remap_buf mapping */
1f3ac86b4c45a1 Juergen Gross 2014-11-28  369  	set_pte_mfn(buf, mfn_save, PAGE_KERNEL);
4fbb67e3c87b80 Matt Rushton  2014-08-11  370  }
4fbb67e3c87b80 Matt Rushton  2014-08-11  371  

:::::: The code at line 341 was first introduced by commit
:::::: 1f3ac86b4c45a146e090d24bf66c49b95e72f071 xen: Delay remapping memory of pv-domain

:::::: TO: Juergen Gross <jgross@...e.com>
:::::: CC: David Vrabel <david.vrabel@...rix.com>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ