tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.uaccess head: f57db9511b2da409406d6ad79b4d78b1df078f1a commit: 282c7d2c890f4fa7e4caddef3e524ccbb84db4ae [105/110] compat statfs: switch to copy_to_user() config: tile-allyesconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 4.6.2 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 282c7d2c890f4fa7e4caddef3e524ccbb84db4ae # save the attached .config to linux build tree make.cross ARCH=tile All errors (new ones prefixed by >>): In file included from include/linux/poll.h:11:0, from include/linux/ring_buffer.h:7, from include/linux/trace_events.h:5, from include/trace/syscall.h:6, from include/linux/syscalls.h:82, from fs/statfs.c:1: include/linux/uaccess.h: In function 'put_compat_statfs64': >> include/linux/uaccess.h:177:18: error: call to '__bad_copy_user' declared with attribute error: usercopy buffer size is too small vim +/__bad_copy_user +177 include/linux/uaccess.h d597580d Al Viro 2017-03-20 161 } d597580d Al Viro 2017-03-20 162 d597580d Al Viro 2017-03-20 163 static __always_inline unsigned long __must_check d597580d Al Viro 2017-03-20 164 copy_to_user(void __user *to, const void *from, unsigned long n) d597580d Al Viro 2017-03-20 165 { d597580d Al Viro 2017-03-20 166 int sz = __compiletime_object_size(from); d597580d Al Viro 2017-03-20 167 d597580d Al Viro 2017-03-20 168 kasan_check_read(from, n); d597580d Al Viro 2017-03-20 169 might_fault(); d597580d Al Viro 2017-03-20 170 d597580d Al Viro 2017-03-20 171 if (likely(sz < 0 || sz >= n)) { d597580d Al Viro 2017-03-20 172 check_object_size(from, n, true); d597580d Al Viro 2017-03-20 173 n = _copy_to_user(to, from, n); d597580d Al Viro 2017-03-20 174 } else if (!__builtin_constant_p(n)) d597580d Al Viro 2017-03-20 175 copy_user_overflow(sz, n); d597580d Al Viro 2017-03-20 176 else d597580d Al Viro 2017-03-20 @177 __bad_copy_user(); d597580d Al Viro 2017-03-20 178 d597580d Al Viro 2017-03-20 179 return n; d597580d Al Viro 2017-03-20 180 } d597580d Al Viro 2017-03-20 181 #ifdef CONFIG_COMPAT d597580d Al Viro 2017-03-20 182 static __always_inline unsigned long __must_check d597580d Al Viro 2017-03-20 183 __copy_in_user(void __user *to, const void *from, unsigned long n) d597580d Al Viro 2017-03-20 184 { d597580d Al Viro 2017-03-20 185 might_fault(); :::::: The code at line 177 was first introduced by commit :::::: d597580d373774b1bdab84b3d26ff0b55162b916 generic ...copy_..._user primitives :::::: TO: Al Viro <viro@xxxxxxxxxxxxxxxxxx> :::::: CC: Al Viro <viro@xxxxxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip