Hi Al, Thank you for the patch! Yet something to improve: [auto build test ERROR on sparc-next/master] [also build test ERROR on sparc/master tip/x86/core linus/master v5.8-rc6] [cannot apply to next-20200723] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Al-Viro/xtensa-fix-access-check-in-csum_and_copy_from_user/20200724-103114 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next.git master config: c6x-allyesconfig (attached as .config) compiler: c6x-elf-gcc (GCC) 9.3.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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): net/core/skbuff.c: In function 'skb_copy_and_csum_bits': >> net/core/skbuff.c:2739:12: error: macro "csum_partial_copy_nocheck" requires 4 arguments, but only 3 given 2739 | copy); | ^ In file included from include/net/checksum.h:22, from include/linux/skbuff.h:28, from include/net/net_namespace.h:39, from include/linux/inet.h:42, from net/core/skbuff.c:43: arch/c6x/include/asm/checksum.h:32: note: macro "csum_partial_copy_nocheck" defined here 32 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | >> net/core/skbuff.c:2738:10: error: 'csum_partial_copy_nocheck' undeclared (first use in this function); did you mean 'csum_partial_copy'? 2738 | csum = csum_partial_copy_nocheck(skb->data + offset, to, | ^~~~~~~~~~~~~~~~~~~~~~~~~ | csum_partial_copy net/core/skbuff.c:2738:10: note: each undeclared identifier is reported only once for each function it appears in net/core/skbuff.c:2769:16: error: macro "csum_partial_copy_nocheck" requires 4 arguments, but only 3 given 2769 | p_len); | ^ In file included from include/net/checksum.h:22, from include/linux/skbuff.h:28, from include/net/net_namespace.h:39, from include/linux/inet.h:42, from net/core/skbuff.c:43: arch/c6x/include/asm/checksum.h:32: note: macro "csum_partial_copy_nocheck" defined here 32 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | -- net/ipv4/ip_output.c: In function 'ip_reply_glue_bits': >> net/ipv4/ip_output.c:1645:55: error: macro "csum_partial_copy_nocheck" requires 4 arguments, but only 3 given 1645 | csum = csum_partial_copy_nocheck(dptr+offset, to, len); | ^ In file included from include/net/checksum.h:22, from include/linux/skbuff.h:28, from include/net/net_namespace.h:39, from include/linux/inet.h:42, from net/ipv4/ip_output.c:59: arch/c6x/include/asm/checksum.h:32: note: macro "csum_partial_copy_nocheck" defined here 32 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | >> net/ipv4/ip_output.c:1645:9: error: 'csum_partial_copy_nocheck' undeclared (first use in this function); did you mean 'csum_partial_copy'? 1645 | csum = csum_partial_copy_nocheck(dptr+offset, to, len); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | csum_partial_copy net/ipv4/ip_output.c:1645:9: note: each undeclared identifier is reported only once for each function it appears in -- net/ipv4/raw.c: In function 'raw_getfrag': >> net/ipv4/raw.c:481:18: error: macro "csum_partial_copy_nocheck" requires 4 arguments, but only 3 given 481 | to, copy), | ^ In file included from include/net/checksum.h:22, from include/linux/skbuff.h:28, from include/linux/pim.h:5, from include/linux/mroute.h:6, from net/ipv4/raw.c:51: arch/c6x/include/asm/checksum.h:32: note: macro "csum_partial_copy_nocheck" defined here 32 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | >> net/ipv4/raw.c:480:5: error: 'csum_partial_copy_nocheck' undeclared (first use in this function); did you mean 'csum_partial_copy'? 480 | csum_partial_copy_nocheck(rfv->hdr.c + offset, | ^~~~~~~~~~~~~~~~~~~~~~~~~ | csum_partial_copy net/ipv4/raw.c:480:5: note: each undeclared identifier is reported only once for each function it appears in -- net/ipv4/icmp.c: In function 'icmp_push_reply': >> net/ipv4/icmp.c:384:28: error: macro "csum_partial_copy_nocheck" requires 4 arguments, but only 3 given 384 | icmp_param->head_len); | ^ In file included from include/net/checksum.h:22, from include/linux/skbuff.h:28, from include/net/net_namespace.h:39, from include/linux/inet.h:42, from net/ipv4/icmp.c:69: arch/c6x/include/asm/checksum.h:32: note: macro "csum_partial_copy_nocheck" defined here 32 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | >> net/ipv4/icmp.c:382:10: error: 'csum_partial_copy_nocheck' undeclared (first use in this function); did you mean 'csum_partial_copy'? 382 | csum = csum_partial_copy_nocheck((void *)&icmp_param->data, | ^~~~~~~~~~~~~~~~~~~~~~~~~ | csum_partial_copy net/ipv4/icmp.c:382:10: note: each undeclared identifier is reported only once for each function it appears in -- net/ipv6/raw.c: In function 'raw6_getfrag': >> net/ipv6/raw.c:749:18: error: macro "csum_partial_copy_nocheck" requires 4 arguments, but only 3 given 749 | to, copy), | ^ In file included from include/net/checksum.h:22, from include/linux/skbuff.h:28, from include/linux/if_ether.h:19, from include/uapi/linux/ethtool.h:19, from include/linux/ethtool.h:18, from include/linux/netdevice.h:37, from net/ipv6/raw.c:24: arch/c6x/include/asm/checksum.h:32: note: macro "csum_partial_copy_nocheck" defined here 32 | #define csum_partial_copy_nocheck(src, dst, len, sum) \ | >> net/ipv6/raw.c:748:5: error: 'csum_partial_copy_nocheck' undeclared (first use in this function); did you mean 'csum_partial_copy'? 748 | csum_partial_copy_nocheck(rfv->c + offset, | ^~~~~~~~~~~~~~~~~~~~~~~~~ | csum_partial_copy net/ipv6/raw.c:748:5: note: each undeclared identifier is reported only once for each function it appears in vim +/csum_partial_copy_nocheck +2739 net/core/skbuff.c 2724 2725 __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, 2726 u8 *to, int len) 2727 { 2728 int start = skb_headlen(skb); 2729 int i, copy = start - offset; 2730 struct sk_buff *frag_iter; 2731 int pos = 0; 2732 __wsum csum = 0; 2733 2734 /* Copy header. */ 2735 if (copy > 0) { 2736 if (copy > len) 2737 copy = len; > 2738 csum = csum_partial_copy_nocheck(skb->data + offset, to, > 2739 copy); 2740 if ((len -= copy) == 0) 2741 return csum; 2742 offset += copy; 2743 to += copy; 2744 pos = copy; 2745 } 2746 2747 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { 2748 int end; 2749 2750 WARN_ON(start > offset + len); 2751 2752 end = start + skb_frag_size(&skb_shinfo(skb)->frags[i]); 2753 if ((copy = end - offset) > 0) { 2754 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 2755 u32 p_off, p_len, copied; 2756 struct page *p; 2757 __wsum csum2; 2758 u8 *vaddr; 2759 2760 if (copy > len) 2761 copy = len; 2762 2763 skb_frag_foreach_page(frag, 2764 skb_frag_off(frag) + offset - start, 2765 copy, p, p_off, p_len, copied) { 2766 vaddr = kmap_atomic(p); 2767 csum2 = csum_partial_copy_nocheck(vaddr + p_off, 2768 to + copied, 2769 p_len); 2770 kunmap_atomic(vaddr); 2771 csum = csum_block_add(csum, csum2, pos); 2772 pos += p_len; 2773 } 2774 2775 if (!(len -= copy)) 2776 return csum; 2777 offset += copy; 2778 to += copy; 2779 } 2780 start = end; 2781 } 2782 2783 skb_walk_frags(skb, frag_iter) { 2784 __wsum csum2; 2785 int end; 2786 2787 WARN_ON(start > offset + len); 2788 2789 end = start + frag_iter->len; 2790 if ((copy = end - offset) > 0) { 2791 if (copy > len) 2792 copy = len; 2793 csum2 = skb_copy_and_csum_bits(frag_iter, 2794 offset - start, 2795 to, copy); 2796 csum = csum_block_add(csum, csum2, pos); 2797 if ((len -= copy) == 0) 2798 return csum; 2799 offset += copy; 2800 to += copy; 2801 pos += copy; 2802 } 2803 start = end; 2804 } 2805 BUG_ON(len); 2806 return csum; 2807 } 2808 EXPORT_SYMBOL(skb_copy_and_csum_bits); 2809 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org