tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.uaccess head: 8ff789cacc36a22e0a4818f5b080973b47aeb287 commit: ba41252eb5efc560e73a44061206ddd01965f5ea [94/110] compat statfs: switch to copy_to_user() config: sparc64-allnoconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout ba41252eb5efc560e73a44061206ddd01965f5ea # save the attached .config to linux build tree make.cross ARCH=sparc64 All errors (new ones prefixed by >>): In file included from include/linux/string.h:18:0, from include/linux/signal.h:14, from include/linux/syscalls.h:74, from fs/statfs.c:1: fs/statfs.c: In function 'put_compat_statfs': >> fs/statfs.c:261:9: error: incompatible type for argument 1 of '__builtin_memset' memset(buf, 0, sizeof(struct compat_statfs)); ^ arch/sparc/include/asm/string.h:17:46: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ fs/statfs.c:261:9: note: expected 'void *' but argument is of type 'struct compat_statfs' memset(buf, 0, sizeof(struct compat_statfs)); ^ arch/sparc/include/asm/string.h:17:46: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ fs/statfs.c:274:25: error: incompatible type for argument 2 of 'copy_to_user' if (copy_to_user(ubuf, buf, sizeof(struct compat_statfs))) ^~~ 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:164:1: note: expected 'const void *' but argument is of type 'struct compat_statfs' copy_to_user(void __user *to, const void *from, unsigned long n) ^~~~~~~~~~~~ In file included from include/linux/string.h:18:0, from include/linux/signal.h:14, from include/linux/syscalls.h:74, from fs/statfs.c:1: fs/statfs.c: In function 'put_compat_statfs64': fs/statfs.c:317:9: error: incompatible type for argument 1 of '__builtin_memset' memset(buf, 0, sizeof(struct compat_statfs)); ^ arch/sparc/include/asm/string.h:17:46: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ fs/statfs.c:317:9: note: expected 'void *' but argument is of type 'struct compat_statfs64' memset(buf, 0, sizeof(struct compat_statfs)); ^ arch/sparc/include/asm/string.h:17:46: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ fs/statfs.c:330:25: error: incompatible type for argument 2 of 'copy_to_user' if (copy_to_user(ubuf, buf, sizeof(struct compat_statfs))) ^~~ 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:164:1: note: expected 'const void *' but argument is of type 'struct compat_statfs64' copy_to_user(void __user *to, const void *from, unsigned long n) ^~~~~~~~~~~~ vim +/__builtin_memset +261 fs/statfs.c 255 && (kbuf->f_files & 0xffffffff00000000ULL)) 256 return -EOVERFLOW; 257 if (kbuf->f_ffree != 0xffffffffffffffffULL 258 && (kbuf->f_ffree & 0xffffffff00000000ULL)) 259 return -EOVERFLOW; 260 } > 261 memset(buf, 0, sizeof(struct compat_statfs)); 262 buf.f_type = kbuf->f_type; 263 buf.f_bsize = kbuf->f_bsize; 264 buf.f_blocks = kbuf->f_blocks; --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip