tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.uaccess head: 00b19766335a2ce1299e047713b0fef21390f137 commit: 63a83ed9311071a2f7dc99901155d4ea42652973 [25/89] binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail config: sh-allmodconfig (attached as .config) compiler: sh4-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 63a83ed9311071a2f7dc99901155d4ea42652973 # save the attached .config to linux build tree make.cross ARCH=sh All error/warnings (new ones prefixed by >>): In file included from include/linux/flat.h:12:0, from fs/binfmt_flat.c:36: arch/sh/include/asm/flat.h: In function 'flat_get_addr_from_rp': >> arch/sh/include/asm/flat.h:21:10: error: implicit declaration of function 'get_unaligned' [-Werror=implicit-function-declaration] *addr = get_unaligned((__force u32 *)rp); ^~~~~~~~~~~~~ arch/sh/include/asm/flat.h: In function 'flat_put_addr_at_rp': >> arch/sh/include/asm/flat.h:26:2: error: implicit declaration of function 'put_unaligned' [-Werror=implicit-function-declaration] put_unaligned(addr, (__force u32 *)rp); ^~~~~~~~~~~~~ >> arch/sh/include/asm/flat.h:27:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ fs/binfmt_flat.c: In function 'load_flat_file': >> <command-line>:0:16: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'u32 {aka unsigned int}' [-Wformat=] >> fs/binfmt_flat.c:18:21: note: in expansion of macro 'KBUILD_MODNAME' #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt ^~~~~~~~~~~~~~ include/linux/dynamic_debug.h:126:35: note: in expansion of macro 'pr_fmt' __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ ^~~~~~ include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug' dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ >> fs/binfmt_flat.c:577:3: note: in expansion of macro 'pr_debug' pr_debug("Allocated data+bss+stack (%ld bytes): %lx\n", ^~~~~~~~ >> fs/binfmt_flat.c:599:9: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] reloc = (unsigned long __user *) ^ fs/binfmt_flat.c:624:9: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] reloc = (unsigned long __user *) ^ cc1: some warnings being treated as errors vim +/get_unaligned +21 arch/sh/include/asm/flat.h 15 #define flat_argvp_envp_on_stack() 0 16 #define flat_old_ram_flag(flags) (flags) 17 #define flat_reloc_valid(reloc, size) ((reloc) <= (size)) 18 static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, 19 u32 *addr, u32 *persistent) 20 { > 21 *addr = get_unaligned((__force u32 *)rp); 22 return 0; 23 } 24 static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel) 25 { > 26 put_unaligned(addr, (__force u32 *)rp); > 27 } 28 #define flat_get_relocate_addr(rel) (rel) 29 #define flat_set_persistent(relval, p) ({ (void)p; 0; }) 30 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip