Messages in this thread | | | Date | Thu, 2 Sep 2021 18:07:46 +0800 | From | kernel test robot <> | Subject | [intel-tdx:guest 72/127] include/linux/mman.h:158:9: error: division by zero is undefined |
| |
tree: https://github.com/intel/tdx.git guest head: c748712bd17bbd7f8a75553911a5557f3d7d32b2 commit: 9776cd53b86f83859c1f974a9cfff54d08e81f46 [72/127] x86/tdx: Add device filter support for x86 TDX guest platform config: i386-randconfig-r005-20210901 (attached as .config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4b1fde8a2b681dad2ce0c082a5d6422caa06b0bc) 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/intel/tdx/commit/9776cd53b86f83859c1f974a9cfff54d08e81f46 git remote add intel-tdx https://github.com/intel/tdx.git git fetch --no-tags intel-tdx guest git checkout 9776cd53b86f83859c1f974a9cfff54d08e81f46 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from arch/x86/kvm/../../../virt/kvm/kvm_main.c:18: In file included from include/linux/kvm_host.h:35: In file included from include/linux/kvm_para.h:5: In file included from include/uapi/linux/kvm_para.h:37: In file included from arch/x86/include/asm/kvm_para.h:7: arch/x86/include/asm/tdx.h:175:12: error: incomplete definition of type 'struct device' return dev->authorized; ~~~^ include/linux/dynamic_debug.h:70:8: note: forward declaration of 'struct device' struct device; ^ In file included from arch/x86/kvm/../../../virt/kvm/kvm_main.c:41: >> include/linux/mman.h:158:9: error: division by zero is undefined [-Werror,-Wdivision-by-zero] _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mman.h:135:21: note: expanded from macro '_calc_vm_trans' : ((x) & (bit1)) / ((bit1) / (bit2)))) ^ ~~~~~~~~~~~~~~~~~ 2 errors generated.
vim +158 include/linux/mman.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 148 ^1da177e4c3f41 Linus Torvalds 2005-04-16 149 /* ^1da177e4c3f41 Linus Torvalds 2005-04-16 150 * Combine the mmap "flags" argument into "vm_flags" used internally. ^1da177e4c3f41 Linus Torvalds 2005-04-16 151 */ ^1da177e4c3f41 Linus Torvalds 2005-04-16 152 static inline unsigned long ^1da177e4c3f41 Linus Torvalds 2005-04-16 153 calc_vm_flag_bits(unsigned long flags) ^1da177e4c3f41 Linus Torvalds 2005-04-16 154 { ^1da177e4c3f41 Linus Torvalds 2005-04-16 155 return _calc_vm_trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN ) | ^1da177e4c3f41 Linus Torvalds 2005-04-16 156 _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | b6fb293f2497a9 Jan Kara 2017-11-01 157 _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ) | b3fbbea4c00220 Kevin Brodsky 2019-11-25 @158 _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) | b3fbbea4c00220 Kevin Brodsky 2019-11-25 159 arch_calc_vm_flag_bits(flags); ^1da177e4c3f41 Linus Torvalds 2005-04-16 160 } 00619bcc44d6b7 Jerome Marchand 2013-11-12 161
:::::: The code at line 158 was first introduced by commit :::::: b3fbbea4c00220f62e6f7e2514466e6ee81f7f60 mm: Introduce arch_calc_vm_flag_bits()
:::::: TO: Kevin Brodsky <Kevin.Brodsky@arm.com> :::::: CC: Catalin Marinas <catalin.marinas@arm.com>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |