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-prev] [day] [month] [year] [list]
Date:   Thu, 21 May 2020 19:54:16 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Guillaume Nault <gnault@...hat.com>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...lanox.com>,
        Benjamin LaHaise <benjamin.lahaise@...ronome.com>,
        Tom Herbert <tom@...bertland.com>,
        Liel Shoshan <liels@...lanox.com>,
        Rony Efraim <ronye@...lanox.com>
Subject: Re: [PATCH net-next 1/2] flow_dissector: Parse multiple MPLS Label
 Stack Entries

Hi Guillaume,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on net/master sparc-next/master linus/master v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Guillaume-Nault/flow_dissector-cls_flower-Add-support-for-multiple-MPLS-Label-Stack-Entries/20200521-052254
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4f65e2f483b6f764c15094d14dd53dda048a4048
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-193-gb8fad4bc-dirty
        # save the attached .config to linux build tree
        make C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

   drivers/net/ethernet/netronome/nfp/flower/match.c:100:26: sparse: sparse: no member 'mpls_label' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:100:26: sparse: sparse: no member 'mpls_label' in struct flow_dissector_key_mpls
>> drivers/net/ethernet/netronome/nfp/flower/match.c:100:26: sparse: sparse: cast from unknown type
   drivers/net/ethernet/netronome/nfp/flower/match.c:101:26: sparse: sparse: no member 'mpls_tc' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:101:26: sparse: sparse: no member 'mpls_tc' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:101:26: sparse: sparse: cast from unknown type
>> drivers/net/ethernet/netronome/nfp/flower/match.c:100:85: sparse: sparse: incompatible types for operation (|):
>> drivers/net/ethernet/netronome/nfp/flower/match.c:100:85: sparse:    void
>> drivers/net/ethernet/netronome/nfp/flower/match.c:100:85: sparse:    void
   drivers/net/ethernet/netronome/nfp/flower/match.c:102:26: sparse: sparse: no member 'mpls_bos' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:102:26: sparse: sparse: no member 'mpls_bos' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:102:26: sparse: sparse: cast from unknown type
   drivers/net/ethernet/netronome/nfp/flower/match.c:105:26: sparse: sparse: no member 'mpls_label' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:105:26: sparse: sparse: no member 'mpls_label' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:105:26: sparse: sparse: cast from unknown type
   drivers/net/ethernet/netronome/nfp/flower/match.c:106:26: sparse: sparse: no member 'mpls_tc' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:106:26: sparse: sparse: no member 'mpls_tc' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:106:26: sparse: sparse: cast from unknown type
   drivers/net/ethernet/netronome/nfp/flower/match.c:105:86: sparse: sparse: incompatible types for operation (|):
   drivers/net/ethernet/netronome/nfp/flower/match.c:105:86: sparse:    void
   drivers/net/ethernet/netronome/nfp/flower/match.c:105:86: sparse:    void
   drivers/net/ethernet/netronome/nfp/flower/match.c:107:26: sparse: sparse: no member 'mpls_bos' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:107:26: sparse: sparse: no member 'mpls_bos' in struct flow_dissector_key_mpls
   drivers/net/ethernet/netronome/nfp/flower/match.c:107:26: sparse: sparse: cast from unknown type
--
   net/core/flow_dissector.c:256:43: sparse: sparse: restricted __be16 degrades to integer
>> net/core/flow_dissector.c:514:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __be32 [usertype] keyid @@    got unsignrestricted __be32 [usertype] keyid @@
>> net/core/flow_dissector.c:514:34: sparse:    expected restricted __be32 [usertype] keyid
>> net/core/flow_dissector.c:514:34: sparse:    got unsigned int [assigned] [usertype] label

vim +514 net/core/flow_dissector.c

   463	
   464	static enum flow_dissect_ret
   465	__skb_flow_dissect_mpls(const struct sk_buff *skb,
   466				struct flow_dissector *flow_dissector,
   467				void *target_container, void *data, int nhoff, int hlen,
   468				int lse_index, bool *entropy_label)
   469	{
   470		struct mpls_label *hdr, _hdr;
   471		u32 entry, label, bos;
   472	
   473		if (!dissector_uses_key(flow_dissector,
   474					FLOW_DISSECTOR_KEY_MPLS_ENTROPY) &&
   475		    !dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_MPLS))
   476			return FLOW_DISSECT_RET_OUT_GOOD;
   477	
   478		if (lse_index >= FLOW_DIS_MPLS_MAX)
   479			return FLOW_DISSECT_RET_OUT_GOOD;
   480	
   481		hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data,
   482					   hlen, &_hdr);
   483		if (!hdr)
   484			return FLOW_DISSECT_RET_OUT_BAD;
   485	
   486		entry = ntohl(hdr->entry);
   487		label = (entry & MPLS_LS_LABEL_MASK) >> MPLS_LS_LABEL_SHIFT;
   488		bos = (entry & MPLS_LS_S_MASK) >> MPLS_LS_S_SHIFT;
   489	
   490		if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_MPLS)) {
   491			struct flow_dissector_key_mpls *key_mpls;
   492			struct flow_dissector_mpls_lse *lse;
   493	
   494			key_mpls = skb_flow_dissector_target(flow_dissector,
   495							     FLOW_DISSECTOR_KEY_MPLS,
   496							     target_container);
   497			lse = &key_mpls->ls[lse_index];
   498	
   499			lse->mpls_ttl = (entry & MPLS_LS_TTL_MASK) >> MPLS_LS_TTL_SHIFT;
   500			lse->mpls_bos = bos;
   501			lse->mpls_tc = (entry & MPLS_LS_TC_MASK) >> MPLS_LS_TC_SHIFT;
   502			lse->mpls_label = label;
   503			dissector_set_mpls_lse(key_mpls, lse_index);
   504		}
   505	
   506		if (*entropy_label &&
   507		    dissector_uses_key(flow_dissector,
   508				       FLOW_DISSECTOR_KEY_MPLS_ENTROPY)) {
   509			struct flow_dissector_key_keyid *key_keyid;
   510	
   511			key_keyid = skb_flow_dissector_target(flow_dissector,
   512							      FLOW_DISSECTOR_KEY_MPLS_ENTROPY,
   513							      target_container);
 > 514			key_keyid->keyid = label;
   515		}
   516	
   517		*entropy_label = label == MPLS_LABEL_ENTROPY;
   518	
   519		return bos ? FLOW_DISSECT_RET_OUT_GOOD : FLOW_DISSECT_RET_PROTO_AGAIN;
   520	}
   521	

---
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" (72520 bytes)

Powered by blists - more mailing lists