tree: https://github.com/ammarfaizi2/linux-block akpm/mm/mm-nonmm-unstable head: d6c497872c18b7f810d329bb8ea3f88b9a4e4267 commit: 1afca3ae915b45ce92a86235f96f7d3901948c1b [14/27] regset: make user_regset_copyin_ignore() *void* config: powerpc-randconfig-r005-20221017 compiler: powerpc-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/ammarfaizi2/linux-block/commit/1afca3ae915b45ce92a86235f96f7d3901948c1b git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block akpm/mm/mm-nonmm-unstable git checkout 1afca3ae915b45ce92a86235f96f7d3901948c1b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash arch/powerpc/kernel/ptrace/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): arch/powerpc/kernel/ptrace/ptrace-view.c: In function 'gpr32_set_common': >> arch/powerpc/kernel/ptrace/ptrace-view.c:709:16: error: void value not ignored as it ought to be 709 | return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 710 | (PT_TRAP + 1) * sizeof(reg), -1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +709 arch/powerpc/kernel/ptrace/ptrace-view.c 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 642 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 643 int gpr32_set_common(struct task_struct *target, 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 644 const struct user_regset *regset, 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 645 unsigned int pos, unsigned int count, 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 646 const void *kbuf, const void __user *ubuf, 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 647 unsigned long *regs) 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 648 { 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 649 const compat_ulong_t *k = kbuf; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 650 const compat_ulong_t __user *u = ubuf; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 651 compat_ulong_t reg; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 652 93c043e393af7fa2 Christophe Leroy 2021-03-10 653 if (!kbuf && !user_read_access_begin(u, count)) 93c043e393af7fa2 Christophe Leroy 2021-03-10 654 return -EFAULT; 93c043e393af7fa2 Christophe Leroy 2021-03-10 655 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 656 pos /= sizeof(reg); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 657 count /= sizeof(reg); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 658 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 659 if (kbuf) 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 660 for (; count > 0 && pos < PT_MSR; --count) 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 661 regs[pos++] = *k++; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 662 else 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 663 for (; count > 0 && pos < PT_MSR; --count) { 93c043e393af7fa2 Christophe Leroy 2021-03-10 664 unsafe_get_user(reg, u++, Efault); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 665 regs[pos++] = reg; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 666 } 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 667 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 668 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 669 if (count > 0 && pos == PT_MSR) { 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 670 if (kbuf) 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 671 reg = *k++; 93c043e393af7fa2 Christophe Leroy 2021-03-10 672 else 93c043e393af7fa2 Christophe Leroy 2021-03-10 673 unsafe_get_user(reg, u++, Efault); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 674 set_user_msr(target, reg); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 675 ++pos; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 676 --count; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 677 } 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 678 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 679 if (kbuf) { 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 680 for (; count > 0 && pos <= PT_MAX_PUT_REG; --count) 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 681 regs[pos++] = *k++; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 682 for (; count > 0 && pos < PT_TRAP; --count, ++pos) 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 683 ++k; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 684 } else { 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 685 for (; count > 0 && pos <= PT_MAX_PUT_REG; --count) { 93c043e393af7fa2 Christophe Leroy 2021-03-10 686 unsafe_get_user(reg, u++, Efault); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 687 regs[pos++] = reg; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 688 } 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 689 for (; count > 0 && pos < PT_TRAP; --count, ++pos) 93c043e393af7fa2 Christophe Leroy 2021-03-10 690 unsafe_get_user(reg, u++, Efault); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 691 } 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 692 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 693 if (count > 0 && pos == PT_TRAP) { 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 694 if (kbuf) 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 695 reg = *k++; 93c043e393af7fa2 Christophe Leroy 2021-03-10 696 else 93c043e393af7fa2 Christophe Leroy 2021-03-10 697 unsafe_get_user(reg, u++, Efault); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 698 set_user_trap(target, reg); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 699 ++pos; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 700 --count; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 701 } 93c043e393af7fa2 Christophe Leroy 2021-03-10 702 if (!kbuf) 93c043e393af7fa2 Christophe Leroy 2021-03-10 703 user_read_access_end(); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 704 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 705 kbuf = k; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 706 ubuf = u; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 707 pos *= sizeof(reg); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 708 count *= sizeof(reg); 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 @709 return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 710 (PT_TRAP + 1) * sizeof(reg), -1); 93c043e393af7fa2 Christophe Leroy 2021-03-10 711 93c043e393af7fa2 Christophe Leroy 2021-03-10 712 Efault: 93c043e393af7fa2 Christophe Leroy 2021-03-10 713 user_read_access_end(); 93c043e393af7fa2 Christophe Leroy 2021-03-10 714 return -EFAULT; 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 715 } 6e0b79750ce2f3b9 Christophe Leroy 2020-02-28 716 :::::: The code at line 709 was first introduced by commit :::::: 6e0b79750ce2f3b9c9eabbb5687f343483abdc64 powerpc/ptrace: move register viewing functions out of ptrace.c :::::: TO: Christophe Leroy :::::: CC: Michael Ellerman -- 0-DAY CI Kernel Test Service https://01.org/lkp