CC: [email protected] BCC: [email protected] CC: [email protected] TO: Christophe Leroy <[email protected]> CC: Michael Ellerman <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 3123109284176b1532874591f7c81f3837bbdc17 commit: e28d0b675056d072f1f11fa644d0efbb016bb7ce powerpc/lib/sstep: Don't use __{get/put}_user() on kernel addresses date: 6 months ago :::::: branch date: 22 hours ago :::::: commit date: 6 months ago compiler: powerpc64-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> drivers/edac/edac_mc.c:502:62: warning: Parameter 'dev' can be declared with >> const [constParameter] static struct mem_ctl_info *__find_mci_by_dev(struct device *dev) ^ >> drivers/edac/edac_mc.c:703:3: warning: There is an unknown macro here >> somewhere. Configuration is required. If mci_for_each_dimm is a macro then >> please configure it. [unknownMacro] mci_for_each_dimm(mci, dimm) ^ -- >> drivers/base/power/wakeup.c:413:2: warning: There is an unknown macro here >> somewhere. Configuration is required. If list_for_each_entry_rcu is a macro >> then please configure it. [unknownMacro] list_for_each_entry_rcu_locked(ws, &wakeup_sources, entry) ^ -- arch/powerpc/lib/sstep.c:1635:9: warning: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] imm = MASK32(mb, me); ^ arch/powerpc/lib/sstep.c:1643:31: warning: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] op->val = ROTATE(val, rb) & MASK32(mb, me); ^ arch/powerpc/lib/sstep.c:1651:31: warning: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS] op->val = ROTATE(val, rb) & MASK32(mb, me); ^ >> arch/powerpc/lib/sstep.c:329:1: warning: Label 'Efault' is not used. There >> is #if in function body so the label might be used in code that is removed >> by the preprocessor. [unusedLabelConfiguration] Efault: ^ arch/powerpc/lib/sstep.c:386:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration] Efault: ^ arch/powerpc/lib/sstep.c:465:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration] Efault: ^ arch/powerpc/lib/sstep.c:522:1: warning: Label 'Efault' is not used. There is #if in function body so the label might be used in code that is removed by the preprocessor. [unusedLabelConfiguration] Efault: ^ arch/powerpc/lib/sstep.c:656:8: warning: Overlapping read/write of union is undefined behavior [overlappingWriteUnion] u.u = u.l[0]; ^ arch/powerpc/lib/sstep.c:2232:33: warning: Unsigned expression '63-sh' can't be negative so it is unnecessary to test it. [unsignedPositive] op->val = ROTATE(val, sh) & MASK64(0, 63 - sh); ^ arch/powerpc/lib/sstep.c:2201:19: warning: Shifting signed 64-bit value by 63 bits is implementation-defined behaviour [shiftTooManyBitsSigned] op->val = ival >> (sh < 64 ? sh : 63); ^ vim +/Efault +329 arch/powerpc/lib/sstep.c d955189ae42796 Paul Mackerras 2017-08-30 304 e28d0b675056d0 Christophe Leroy 2021-09-16 305 static __always_inline int e28d0b675056d0 Christophe Leroy 2021-09-16 306 __read_mem_aligned(unsigned long *dest, unsigned long ea, int nb, struct pt_regs *regs) 0016a4cf558241 Paul Mackerras 2010-06-15 307 { 0016a4cf558241 Paul Mackerras 2010-06-15 308 unsigned long x = 0; 0016a4cf558241 Paul Mackerras 2010-06-15 309 0016a4cf558241 Paul Mackerras 2010-06-15 310 switch (nb) { 0016a4cf558241 Paul Mackerras 2010-06-15 311 case 1: e28d0b675056d0 Christophe Leroy 2021-09-16 312 unsafe_get_user(x, (unsigned char __user *)ea, Efault); 0016a4cf558241 Paul Mackerras 2010-06-15 313 break; 0016a4cf558241 Paul Mackerras 2010-06-15 314 case 2: e28d0b675056d0 Christophe Leroy 2021-09-16 315 unsafe_get_user(x, (unsigned short __user *)ea, Efault); 0016a4cf558241 Paul Mackerras 2010-06-15 316 break; 0016a4cf558241 Paul Mackerras 2010-06-15 317 case 4: e28d0b675056d0 Christophe Leroy 2021-09-16 318 unsafe_get_user(x, (unsigned int __user *)ea, Efault); 0016a4cf558241 Paul Mackerras 2010-06-15 319 break; 0016a4cf558241 Paul Mackerras 2010-06-15 320 #ifdef __powerpc64__ 0016a4cf558241 Paul Mackerras 2010-06-15 321 case 8: e28d0b675056d0 Christophe Leroy 2021-09-16 322 unsafe_get_user(x, (unsigned long __user *)ea, Efault); 0016a4cf558241 Paul Mackerras 2010-06-15 323 break; 0016a4cf558241 Paul Mackerras 2010-06-15 324 #endif 0016a4cf558241 Paul Mackerras 2010-06-15 325 } 0016a4cf558241 Paul Mackerras 2010-06-15 326 *dest = x; e28d0b675056d0 Christophe Leroy 2021-09-16 327 return 0; e28d0b675056d0 Christophe Leroy 2021-09-16 328 e28d0b675056d0 Christophe Leroy 2021-09-16 @329 Efault: e28d0b675056d0 Christophe Leroy 2021-09-16 330 regs->dar = ea; e28d0b675056d0 Christophe Leroy 2021-09-16 331 return -EFAULT; e28d0b675056d0 Christophe Leroy 2021-09-16 332 } e28d0b675056d0 Christophe Leroy 2021-09-16 333 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
