From: kbuild test robot <lkp@intel.com> To: Christophe Leroy <christophe.leroy@c-s.fr> Cc: kbuild-all@01.org, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Michael Ellerman <mpe@ellerman.id.au>, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc/uaccess: fix warning/error with access_ok() Date: Fri, 19 Oct 2018 07:11:33 +0800 [thread overview] Message-ID: <201810190710.pQoZYUe1%fengguang.wu@intel.com> (raw) In-Reply-To: <40873f45f922b28c727c013e3883be467fc31c56.1539852411.git.christophe.leroy@c-s.fr> [-- Attachment #1: Type: text/plain, Size: 8785 bytes --] Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v4.19-rc8 next-20181018] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-uaccess-fix-warning-error-with-access_ok/20181019-031908 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-socrates_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=powerpc All error/warnings (new ones prefixed by >>): In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/init_task.h:9, from arch/powerpc/kernel/process.c:32: arch/powerpc/kernel/process.c: In function 'show_user_instructions': >> arch/powerpc/include/asm/uaccess.h:21:25: error: incompatible type for argument 3 of '__access_ok' #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) ^ >> arch/powerpc/include/asm/uaccess.h:28:18: note: in expansion of macro 'MAKE_MM_SEG' #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) ^~~~~~~~~~~ >> arch/powerpc/kernel/process.c:1313:55: note: in expansion of macro 'USER_DS' if (!__access_ok(pc, NR_INSN_TO_PRINT * sizeof(int), USER_DS)) { ^~~~~~~ arch/powerpc/include/asm/uaccess.h:58:19: note: expected 'long unsigned int' but argument is of type 'mm_segment_t {aka struct <anonymous>}' static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ >> arch/powerpc/kernel/process.c:1313:7: error: too few arguments to function '__access_ok' if (!__access_ok(pc, NR_INSN_TO_PRINT * sizeof(int), USER_DS)) { ^~~~~~~~~~~ In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/init_task.h:9, from arch/powerpc/kernel/process.c:32: arch/powerpc/include/asm/uaccess.h:58:19: note: declared here static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ -- In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/kprobes.h:42, from arch/powerpc/lib/sstep.c:12: arch/powerpc/lib/sstep.c: In function 'address_ok': >> arch/powerpc/include/asm/uaccess.h:21:25: error: incompatible type for argument 3 of '__access_ok' #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) ^ >> arch/powerpc/include/asm/uaccess.h:28:18: note: in expansion of macro 'MAKE_MM_SEG' #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) ^~~~~~~~~~~ >> arch/powerpc/lib/sstep.c:113:26: note: in expansion of macro 'USER_DS' if (__access_ok(ea, nb, USER_DS)) ^~~~~~~ arch/powerpc/include/asm/uaccess.h:58:19: note: expected 'long unsigned int' but argument is of type 'mm_segment_t {aka struct <anonymous>}' static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ >> arch/powerpc/lib/sstep.c:113:6: error: too few arguments to function '__access_ok' if (__access_ok(ea, nb, USER_DS)) ^~~~~~~~~~~ In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/kprobes.h:42, from arch/powerpc/lib/sstep.c:12: arch/powerpc/include/asm/uaccess.h:58:19: note: declared here static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ >> arch/powerpc/include/asm/uaccess.h:21:25: error: incompatible type for argument 3 of '__access_ok' #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) ^ >> arch/powerpc/include/asm/uaccess.h:28:18: note: in expansion of macro 'MAKE_MM_SEG' #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) ^~~~~~~~~~~ arch/powerpc/lib/sstep.c:115:25: note: in expansion of macro 'USER_DS' if (__access_ok(ea, 1, USER_DS)) ^~~~~~~ arch/powerpc/include/asm/uaccess.h:58:19: note: expected 'long unsigned int' but argument is of type 'mm_segment_t {aka struct <anonymous>}' static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ arch/powerpc/lib/sstep.c:115:6: error: too few arguments to function '__access_ok' if (__access_ok(ea, 1, USER_DS)) ^~~~~~~~~~~ In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/kprobes.h:42, from arch/powerpc/lib/sstep.c:12: arch/powerpc/include/asm/uaccess.h:58:19: note: declared here static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ vim +/__access_ok +21 arch/powerpc/include/asm/uaccess.h 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 9 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 10 /* 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 11 * The fs value determines whether argument validity checking should be 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 12 * performed or not. If get_fs() == USER_DS, checking is performed, with 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 13 * get_fs() == KERNEL_DS, checking is bypassed. 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 14 * 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 15 * For historical reasons, these macros are grossly misnamed. 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 16 * 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 17 * The fs/ds values are now the highest legal address in the "segment". 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 18 * This simplifies the checking in the routines below. 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 19 */ 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 20 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 @21 #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 22 5015b494 include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-31 23 #define KERNEL_DS MAKE_MM_SEG(~0UL) 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 24 #ifdef __powerpc64__ 5015b494 include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-31 25 /* We use TASK_SIZE_USER64 as TASK_SIZE is not constant */ 5015b494 include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-31 26 #define USER_DS MAKE_MM_SEG(TASK_SIZE_USER64 - 1) 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 27 #else 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 @28 #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 29 #endif 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 30 :::::: The code at line 21 was first introduced by commit :::::: 2df5e8bcca53e528a78ee0e3b114d0d21dd6d043 powerpc: merge uaccess.h :::::: TO: Stephen Rothwell <sfr@canb.auug.org.au> :::::: CC: Stephen Rothwell <sfr@canb.auug.org.au> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 17535 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com> To: Christophe Leroy <christophe.leroy@c-s.fr> Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>, kbuild-all@01.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc/uaccess: fix warning/error with access_ok() Date: Fri, 19 Oct 2018 07:11:33 +0800 [thread overview] Message-ID: <201810190710.pQoZYUe1%fengguang.wu@intel.com> (raw) In-Reply-To: <40873f45f922b28c727c013e3883be467fc31c56.1539852411.git.christophe.leroy@c-s.fr> [-- Attachment #1: Type: text/plain, Size: 8785 bytes --] Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v4.19-rc8 next-20181018] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-uaccess-fix-warning-error-with-access_ok/20181019-031908 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-socrates_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=powerpc All error/warnings (new ones prefixed by >>): In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/init_task.h:9, from arch/powerpc/kernel/process.c:32: arch/powerpc/kernel/process.c: In function 'show_user_instructions': >> arch/powerpc/include/asm/uaccess.h:21:25: error: incompatible type for argument 3 of '__access_ok' #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) ^ >> arch/powerpc/include/asm/uaccess.h:28:18: note: in expansion of macro 'MAKE_MM_SEG' #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) ^~~~~~~~~~~ >> arch/powerpc/kernel/process.c:1313:55: note: in expansion of macro 'USER_DS' if (!__access_ok(pc, NR_INSN_TO_PRINT * sizeof(int), USER_DS)) { ^~~~~~~ arch/powerpc/include/asm/uaccess.h:58:19: note: expected 'long unsigned int' but argument is of type 'mm_segment_t {aka struct <anonymous>}' static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ >> arch/powerpc/kernel/process.c:1313:7: error: too few arguments to function '__access_ok' if (!__access_ok(pc, NR_INSN_TO_PRINT * sizeof(int), USER_DS)) { ^~~~~~~~~~~ In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/init_task.h:9, from arch/powerpc/kernel/process.c:32: arch/powerpc/include/asm/uaccess.h:58:19: note: declared here static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ -- In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/kprobes.h:42, from arch/powerpc/lib/sstep.c:12: arch/powerpc/lib/sstep.c: In function 'address_ok': >> arch/powerpc/include/asm/uaccess.h:21:25: error: incompatible type for argument 3 of '__access_ok' #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) ^ >> arch/powerpc/include/asm/uaccess.h:28:18: note: in expansion of macro 'MAKE_MM_SEG' #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) ^~~~~~~~~~~ >> arch/powerpc/lib/sstep.c:113:26: note: in expansion of macro 'USER_DS' if (__access_ok(ea, nb, USER_DS)) ^~~~~~~ arch/powerpc/include/asm/uaccess.h:58:19: note: expected 'long unsigned int' but argument is of type 'mm_segment_t {aka struct <anonymous>}' static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ >> arch/powerpc/lib/sstep.c:113:6: error: too few arguments to function '__access_ok' if (__access_ok(ea, nb, USER_DS)) ^~~~~~~~~~~ In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/kprobes.h:42, from arch/powerpc/lib/sstep.c:12: arch/powerpc/include/asm/uaccess.h:58:19: note: declared here static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ >> arch/powerpc/include/asm/uaccess.h:21:25: error: incompatible type for argument 3 of '__access_ok' #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) ^ >> arch/powerpc/include/asm/uaccess.h:28:18: note: in expansion of macro 'MAKE_MM_SEG' #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) ^~~~~~~~~~~ arch/powerpc/lib/sstep.c:115:25: note: in expansion of macro 'USER_DS' if (__access_ok(ea, 1, USER_DS)) ^~~~~~~ arch/powerpc/include/asm/uaccess.h:58:19: note: expected 'long unsigned int' but argument is of type 'mm_segment_t {aka struct <anonymous>}' static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ arch/powerpc/lib/sstep.c:115:6: error: too few arguments to function '__access_ok' if (__access_ok(ea, 1, USER_DS)) ^~~~~~~~~~~ In file included from include/linux/uaccess.h:14:0, from arch/powerpc/include/asm/sections.h:7, from include/linux/kallsyms.h:15, from include/linux/ftrace.h:11, from include/linux/kprobes.h:42, from arch/powerpc/lib/sstep.c:12: arch/powerpc/include/asm/uaccess.h:58:19: note: declared here static inline int __access_ok(int type, unsigned long addr, unsigned long size, ^~~~~~~~~~~ vim +/__access_ok +21 arch/powerpc/include/asm/uaccess.h 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 9 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 10 /* 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 11 * The fs value determines whether argument validity checking should be 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 12 * performed or not. If get_fs() == USER_DS, checking is performed, with 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 13 * get_fs() == KERNEL_DS, checking is bypassed. 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 14 * 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 15 * For historical reasons, these macros are grossly misnamed. 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 16 * 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 17 * The fs/ds values are now the highest legal address in the "segment". 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 18 * This simplifies the checking in the routines below. 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 19 */ 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 20 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 @21 #define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 22 5015b494 include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-31 23 #define KERNEL_DS MAKE_MM_SEG(~0UL) 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 24 #ifdef __powerpc64__ 5015b494 include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-31 25 /* We use TASK_SIZE_USER64 as TASK_SIZE is not constant */ 5015b494 include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-31 26 #define USER_DS MAKE_MM_SEG(TASK_SIZE_USER64 - 1) 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 27 #else 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 @28 #define USER_DS MAKE_MM_SEG(TASK_SIZE - 1) 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 29 #endif 2df5e8bc include/asm-powerpc/uaccess.h Stephen Rothwell 2005-10-29 30 :::::: The code at line 21 was first introduced by commit :::::: 2df5e8bcca53e528a78ee0e3b114d0d21dd6d043 powerpc: merge uaccess.h :::::: TO: Stephen Rothwell <sfr@canb.auug.org.au> :::::: CC: Stephen Rothwell <sfr@canb.auug.org.au> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 17535 bytes --]
next prev parent reply other threads:[~2018-10-18 23:12 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-18 8:48 [PATCH] powerpc/uaccess: fix warning/error with access_ok() Christophe Leroy 2018-10-18 8:48 ` Christophe Leroy 2018-10-18 9:19 ` Christophe LEROY 2018-10-18 23:11 ` kbuild test robot [this message] 2018-10-18 23:11 ` kbuild test robot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=201810190710.pQoZYUe1%fengguang.wu@intel.com \ --to=lkp@intel.com \ --cc=benh@kernel.crashing.org \ --cc=christophe.leroy@c-s.fr \ --cc=kbuild-all@01.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=mpe@ellerman.id.au \ --cc=paulus@samba.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.