Hi Kees, I love your patch! Yet something to improve: [auto build test ERROR on staging/staging-testing] [also build test ERROR on linus/master v5.14-rc3] [cannot apply to wireless-drivers-next/master wireless-drivers/master next-20210727] [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/Kees-Cook/Introduce-strict-memcpy-bounds-checking/20210728-053749 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 39f9137268ee3df0047706df4e9b7357a40ffc98 config: powerpc64-buildonly-randconfig-r002-20210726 (attached as .config) compiler: powerpc-linux-gcc (GCC) 10.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/0day-ci/linux/commit/d6aff26cc627e1579f89ebaaa51365cabd5c7ee3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Kees-Cook/Introduce-strict-memcpy-bounds-checking/20210728-053749 git checkout d6aff26cc627e1579f89ebaaa51365cabd5c7ee3 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=powerpc64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/string.h:253, from include/linux/bitmap.h:10, from include/linux/cpumask.h:12, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/rcupdate.h:29, from include/linux/rculist.h:11, from include/linux/pid.h:5, from include/linux/sched.h:14, from arch/powerpc/kernel/signal_32.c:16: In function 'fortify_memset_chk', inlined from 'restore_user_regs.part.0' at arch/powerpc/kernel/signal_32.c:539:3: >> include/linux/fortify-string.h:195:4: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] 195 | __write_overflow_field(); | ^~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors vim +/__write_overflow_field +195 include/linux/fortify-string.h 177 178 __FORTIFY_INLINE void fortify_memset_chk(__kernel_size_t size, 179 const size_t p_size, 180 const size_t p_size_field) 181 { 182 if (__builtin_constant_p(size)) { 183 /* 184 * Length argument is a constant expression, so we 185 * can perform compile-time bounds checking where 186 * buffer sizes are known. 187 */ 188 189 /* Error when size is larger than enclosing struct. */ 190 if (p_size > p_size_field && p_size < size) 191 __write_overflow(); 192 193 /* Warn when write size is larger than dest field. */ 194 if (p_size_field < size) > 195 __write_overflow_field(); 196 } 197 /* 198 * At this point, length argument may not be a constant expression, 199 * so run-time bounds checking can be done where buffer sizes are 200 * known. (This is not an "else" because the above checks may only 201 * be compile-time warnings, and we want to still warn for run-time 202 * overflows.) 203 */ 204 205 /* 206 * Always stop accesses beyond the struct that contains the 207 * field, when the buffer's remaining size is known. 208 * (The -1 test is to optimize away checks where the buffer 209 * lengths are unknown.) 210 */ 211 if (p_size != (size_t)(-1) && p_size < size) 212 fortify_panic("memset"); 213 } 214 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org