lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Jun 2021 17:37:19 +0800
From:   kernel test robot <lkp@...el.com>
To:     Florian Westphal <fw@...len.de>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org,
        Steffen Klassert <steffen.klassert@...unet.com>
Subject: [ipsec-next:testing 10/10] net/xfrm/xfrm_output.c:100:33: error:
 'nh' undeclared

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git testing
head:   65b3564d0c98ea3c0ca4f19d5edd9b77090d8998
commit: 65b3564d0c98ea3c0ca4f19d5edd9b77090d8998 [10/10] xfrm: merge dstopt and routing hdroff functions
config: sh-randconfig-s031-20210611 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git/commit/?id=65b3564d0c98ea3c0ca4f19d5edd9b77090d8998
        git remote add ipsec-next https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git
        git fetch --no-tags ipsec-next testing
        git checkout 65b3564d0c98ea3c0ca4f19d5edd9b77090d8998
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
   cc1: warning: arch/sh/include/mach-rsk: No such file or directory [-Wmissing-include-dirs]
   net/xfrm/xfrm_output.c: In function 'mip6_rthdr_offset':
>> net/xfrm/xfrm_output.c:100:33: error: 'nh' undeclared (first use in this function)
     100 |     rt = (struct ipv6_rt_hdr *)(nh + offset);
         |                                 ^~
   net/xfrm/xfrm_output.c:100:33: note: each undeclared identifier is reported only once for each function it appears in


vim +/nh +100 net/xfrm/xfrm_output.c

    79	
    80	#if IS_ENABLED(CONFIG_IPV6_MIP6)
    81	static int mip6_rthdr_offset(struct sk_buff *skb, u8 **nexthdr, int type)
    82	{
    83		unsigned int offset = sizeof(struct ipv6hdr);
    84		unsigned int packet_len = skb_tail_pointer(skb) -
    85			skb_network_header(skb);
    86		int found_rhdr = 0;
    87	
    88		*nexthdr = &ipv6_hdr(skb)->nexthdr;
    89	
    90		while (offset <= packet_len) {
    91			struct ipv6_opt_hdr *exthdr;
    92	
    93			switch (**nexthdr) {
    94			case NEXTHDR_HOP:
    95				break;
    96			case NEXTHDR_ROUTING:
    97				if (type == IPPROTO_ROUTING && offset + 3 <= packet_len) {
    98					struct ipv6_rt_hdr *rt;
    99	
 > 100					rt = (struct ipv6_rt_hdr *)(nh + offset);
   101					if (rt->type != 0)
   102						return offset;
   103				}
   104				found_rhdr = 1;
   105				break;
   106			case NEXTHDR_DEST:
   107				/* HAO MUST NOT appear more than once.
   108				 * XXX: It is better to try to find by the end of
   109				 * XXX: packet if HAO exists.
   110				 */
   111				if (ipv6_find_tlv(skb, offset, IPV6_TLV_HAO) >= 0) {
   112					net_dbg_ratelimited("mip6: hao exists already, override\n");
   113					return offset;
   114				}
   115	
   116				if (found_rhdr)
   117					return offset;
   118	
   119				break;
   120			default:
   121				return offset;
   122			}
   123	
   124			if (offset + sizeof(struct ipv6_opt_hdr) > packet_len)
   125				return -EINVAL;
   126	
   127			exthdr = (struct ipv6_opt_hdr *)(skb_network_header(skb) +
   128							 offset);
   129			offset += ipv6_optlen(exthdr);
   130			if (offset > IPV6_MAXPLEN)
   131				return -EINVAL;
   132			*nexthdr = &exthdr->nexthdr;
   133		}
   134	
   135		return offset;
   136	}
   137	#endif
   138	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (37044 bytes)

Powered by blists - more mailing lists