tree: https://github.com/ambarus/linux-0day saravana-fw-devlink-more-forgiving-v2 head: 2c330a32f492512c7e8683ce046c716ecec67681 commit: 9714985cbac3b3dfb9459578180f7256c482a21b [7805/7919] kasan: ensure poisoning size alignment config: arm-allyesconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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://github.com/ambarus/linux-0day/commit/9714985cbac3b3dfb9459578180f7256c482a21b git remote add ambarus https://github.com/ambarus/linux-0day git fetch --no-tags ambarus saravana-fw-devlink-more-forgiving-v2 git checkout 9714985cbac3b3dfb9459578180f7256c482a21b # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from arch/arm/include/asm/bug.h:60, from include/linux/bug.h:5, from include/linux/cpumask.h:14, from include/linux/smp.h:13, from arch/arm/include/asm/proc-fns.h:105, from arch/arm/include/asm/pgtable.h:11, from include/linux/pgtable.h:6, from include/linux/kasan.h:28, from mm/kasan/shadow.c:14: mm/kasan/shadow.c: In function 'kasan_poison': >> mm/kasan/shadow.c:87:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 87 | if (WARN_ON((u64)addr & KASAN_GRANULE_MASK)) | ^ include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON' 119 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ mm/kasan/shadow.c: In function 'kasan_unpoison': mm/kasan/shadow.c:128:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 128 | if (WARN_ON((u64)addr & KASAN_GRANULE_MASK)) | ^ include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON' 119 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ vim +87 mm/kasan/shadow.c 71 72 void kasan_poison(const void *addr, size_t size, u8 value) 73 { 74 void *shadow_start, *shadow_end; 75 76 /* 77 * Perform shadow offset calculation based on untagged address, as 78 * some of the callers (e.g. kasan_poison_object_data) pass tagged 79 * addresses to this function. 80 */ 81 addr = kasan_reset_tag(addr); 82 83 /* Skip KFENCE memory if called explicitly outside of sl*b. */ 84 if (is_kfence_address(addr)) 85 return; 86 > 87 if (WARN_ON((u64)addr & KASAN_GRANULE_MASK)) 88 return; 89 if (WARN_ON(size & KASAN_GRANULE_MASK)) 90 return; 91 92 shadow_start = kasan_mem_to_shadow(addr); 93 shadow_end = kasan_mem_to_shadow(addr + size); 94 95 __memset(shadow_start, value, shadow_end - shadow_start); 96 } 97 EXPORT_SYMBOL(kasan_poison); 98 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip