Hi Gabriel, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on pcmoore-audit/next] [also build test WARNING on ext4/dev linus/master v5.12] [cannot apply to ext3/fsnotify next-20210426] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Gabriel-Krisman-Bertazi/File-system-wide-monitoring/20210427-024627 base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit.git next config: arm-randconfig-r022-20210426 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d941863de2becb3d8d2e00676fc7125974934c7f) 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 # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/0day-ci/linux/commit/0b550d36bb2ec4613ad64b68b18898a72fd5af50 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Gabriel-Krisman-Bertazi/File-system-wide-monitoring/20210427-024627 git checkout 0b550d36bb2ec4613ad64b68b18898a72fd5af50 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> fs/notify/ring.c:82:15: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] ring_size, size); ^~~~ include/linux/printk.h:430:38: note: expanded from macro 'pr_debug' no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:140:17: note: expanded from macro 'no_printk' printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ 1 warning generated. vim +82 fs/notify/ring.c 67 68 struct fsnotify_event *fsnotify_ring_alloc_event_slot(struct fsnotify_group *group, 69 size_t size) 70 __acquires(&group->notification_lock) 71 { 72 struct fsnotify_event *fsn; 73 u64 head, tail; 74 u64 ring_size = group->ring_buffer.nr_pages << PAGE_SHIFT; 75 u64 new_head; 76 void *kaddr; 77 78 if (WARN_ON(!(group->flags & FSN_SUBMISSION_RING_BUFFER) || size > PAGE_SIZE)) 79 return ERR_PTR(-EINVAL); 80 81 pr_debug("%s: start group=%p ring_size=%llu, requested=%lu\n", __func__, group, > 82 ring_size, size); 83 84 spin_lock(&group->notification_lock); 85 again: 86 head = group->ring_buffer.head; 87 tail = group->ring_buffer.tail; 88 new_head = NEXT_SLOT(head, size, ring_size); 89 90 /* head would catch up to tail, corrupting an entry. */ 91 if ((head < tail && new_head > tail) || (head > new_head && new_head > tail)) { 92 fsn = ERR_PTR(-ENOMEM); 93 goto err; 94 } 95 96 /* 97 * Not event a skip message fits in the page. We can detect the 98 * lack of space. Move on to the next page. 99 */ 100 if ((PAGE_SIZE - (head & (PAGE_SIZE-1))) < sizeof(struct fsnotify_event)) { 101 /* Start again on next page */ 102 group->ring_buffer.head = NEXT_PAGE(head, ring_size); 103 goto again; 104 } 105 106 kaddr = kmap_atomic(group->ring_buffer.pages[head / PAGE_SIZE]); 107 if (!kaddr) { 108 fsn = ERR_PTR(-EFAULT); 109 goto err; 110 } 111 112 fsn = (struct fsnotify_event *) (kaddr + (head & (PAGE_SIZE-1))); 113 114 if ((head >> PAGE_SHIFT) != (new_head >> PAGE_SHIFT)) { 115 /* 116 * No room in the current page. Add a fake entry 117 * consuming the end the page to avoid splitting event 118 * structure. 119 */ 120 fsn->slot_len = INVALID_RING_SLOT; 121 kunmap_atomic(kaddr); 122 /* Start again on the next page */ 123 group->ring_buffer.head = NEXT_PAGE(head, ring_size); 124 125 goto again; 126 } 127 fsn->slot_len = size; 128 129 return fsn; 130 131 err: 132 spin_unlock(&group->notification_lock); 133 return fsn; 134 } 135 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org