tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.uaccess-unaligned head: e234d9bd756d419e6772a8042bab86fef5e67c55 commit: 9c02566c78f0b05d078677c8a4e6f3c0ae380a69 [1/2] binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail config: h8300-h8300h-sim_defconfig (attached as .config) compiler: h8300-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 9c02566c78f0b05d078677c8a4e6f3c0ae380a69 # save the attached .config to linux build tree make.cross ARCH=h8300 All errors (new ones prefixed by >>): In file included from include/linux/flat.h:12:0, from fs/binfmt_flat.c:36: arch/h8300/include/asm/flat.h: In function 'flat_get_addr_from_rp': >> arch/h8300/include/asm/flat.h:27:16: error: 'FLAT_FLAG_GOTPIC' undeclared (first use in this function) if (!(flags & FLAT_FLAG_GOTPIC) ^~~~~~~~~~~~~~~~ arch/h8300/include/asm/flat.h:27:16: note: each undeclared identifier is reported only once for each function it appears in >> arch/h8300/include/asm/flat.h:28:3: error: expected ')' before 'val' val &= 0x00ffffff; ^~~ >> arch/h8300/include/asm/flat.h:31:1: error: expected expression before '}' token } ^ arch/h8300/include/asm/flat.h:26:6: warning: unused variable 'val' [-Wunused-variable] u32 val = get_unaligned((__force u32 *)rp); ^~~ arch/h8300/include/asm/flat.h:31:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ In file included from include/linux/kernel.h:13:0, from fs/binfmt_flat.c:20: fs/binfmt_flat.c: In function 'load_flat_file': include/linux/kern_levels.h:4:18: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'u32 {aka unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ include/linux/printk.h:136:11: note: in definition of macro 'no_printk' printk(fmt, ##__VA_ARGS__); \ ^~~ include/linux/kern_levels.h:14:20: note: in expansion of macro 'KERN_SOH' #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ ^~~~~~~~ include/linux/printk.h:339:12: note: in expansion of macro 'KERN_DEBUG' no_printk(KERN_DEBUG pr_fmt(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", ^~~~~~~~ vim +/FLAT_FLAG_GOTPIC +27 arch/h8300/include/asm/flat.h 21 22 #define flat_get_relocate_addr(rel) (rel & ~0x00000001) 23 static inline int flat_get_addr_from_rp(u32 __user *rp, u32 relval, u32 flags, 24 u32 *addr, u32 *persistent) 25 { 26 u32 val = get_unaligned((__force u32 *)rp); > 27 if (!(flags & FLAT_FLAG_GOTPIC) > 28 val &= 0x00ffffff; 29 *addr = val; 30 return 0; > 31 } 32 33 static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel) 34 { --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip