Hi Baoquan, I love your patch! Perhaps something to improve: [auto build test WARNING on akpm-mm/mm-everything] url: https://github.com/intel-lab-lkp/linux/commits/Baoquan-He/mm-vmalloc-c-allow-vread-to-read-out-vm_map_ram-areas/20221217-095615 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20221217015435.73889-4-bhe%40redhat.com patch subject: [PATCH v2 3/7] mm/vmalloc.c: allow vread() to read out vm_map_ram areas config: loongarch-randconfig-r006-20221216 compiler: loongarch64-linux-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://github.com/intel-lab-lkp/linux/commit/368cd65be8fedd1642e53393dc3f28ff8726122d git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Baoquan-He/mm-vmalloc-c-allow-vread-to-read-out-vm_map_ram-areas/20221217-095615 git checkout 368cd65be8fedd1642e53393dc3f28ff8726122d # 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=loongarch olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): mm/vmalloc.c: In function 'vb_vread': >> mm/vmalloc.c:3563:49: warning: suggest parentheses around '-' inside '<<' [-Wparentheses] 3563 | n = (re - rs + 1) << PAGE_SHIFT - offset; vim +3563 mm/vmalloc.c 3533 3534 static void vb_vread(char *buf, char *addr, int count) 3535 { 3536 char *start; 3537 struct vmap_block *vb; 3538 unsigned long offset; 3539 unsigned int rs, re, n; 3540 3541 vb = xa_load(&vmap_blocks, addr_to_vb_idx((unsigned long)addr)); 3542 3543 spin_lock(&vb->lock); 3544 if (bitmap_empty(vb->used_map, VMAP_BBMAP_BITS)) { 3545 spin_unlock(&vb->lock); 3546 memset(buf, 0, count); 3547 return; 3548 } 3549 for_each_set_bitrange(rs, re, vb->used_map, VMAP_BBMAP_BITS) { 3550 if (!count) 3551 break; 3552 start = vmap_block_vaddr(vb->va->va_start, rs); 3553 if (addr < start) { 3554 if (count == 0) 3555 break; 3556 *buf = '\0'; 3557 buf++; 3558 addr++; 3559 count--; 3560 } 3561 /*it could start reading from the middle of used region*/ 3562 offset = offset_in_page(addr); > 3563 n = (re - rs + 1) << PAGE_SHIFT - offset; 3564 if (n > count) 3565 n = count; 3566 aligned_vread(buf, start+offset, n); 3567 3568 buf += n; 3569 addr += n; 3570 count -= n; 3571 } 3572 spin_unlock(&vb->lock); 3573 3574 /* zero-fill the left dirty or free regions */ 3575 if (count) 3576 memset(buf, 0, count); 3577 } 3578 -- 0-DAY CI Kernel Test Service https://01.org/lkp