CC: kbuild-all(a)lists.01.org CC: linux-kernel(a)vger.kernel.org TO: Luc Van Oostenryck CC: Andrew Morton CC: Linux Memory Management List tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 136057256686de39cc3a07c2e39ef6bc43003ff6 commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*() date: 7 months ago :::::: branch date: 28 hours ago :::::: commit date: 7 months ago config: x86_64-randconfig-m001-20211122 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c:374 opa_vnic_get_sc() warn: potential spectre issue 'info->vport.pcp_to_sc_mc' [r] drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c:376 opa_vnic_get_sc() warn: potential spectre issue 'info->vport.pcp_to_sc_uc' [r] drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c:384 opa_vnic_get_sc() warn: possible spectre second half. 'sc' drivers/infiniband/sw/siw/iwarp.h:114 __ddp_get_version() warn: mask and shift to zero vim +374 drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 361 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 362 /* opa_vnic_get_sc - return the service class */ 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 363 static u8 opa_vnic_get_sc(struct __opa_veswport_info *info, 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 364 struct sk_buff *skb) 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 365 { 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 366 struct ethhdr *mac_hdr = (struct ethhdr *)skb_mac_header(skb); 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 367 u16 vlan_tci; 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 368 u8 sc; 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 369 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 370 if (!__vlan_get_tag(skb, &vlan_tci)) { 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 371 u8 pcp = OPA_VNIC_VLAN_PCP(vlan_tci); 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 372 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 373 if (is_multicast_ether_addr(mac_hdr->h_dest)) 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 @374 sc = info->vport.pcp_to_sc_mc[pcp]; 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 375 else 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 @376 sc = info->vport.pcp_to_sc_uc[pcp]; 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 377 } else { 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 378 if (is_multicast_ether_addr(mac_hdr->h_dest)) 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 379 sc = info->vport.non_vlan_sc_mc; 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 380 else 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 381 sc = info->vport.non_vlan_sc_uc; 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 382 } 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 383 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 @384 return sc; 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 385 } 7d6f728c677e9d Vishwanathapura, Niranjana 2017-04-12 386 :::::: The code at line 374 was first introduced by commit :::::: 7d6f728c677e9d01b42d3cc9eb9ef40a2de92ea3 IB/opa-vnic: Virtual Network Interface Controller (VNIC) netdev :::::: TO: Vishwanathapura, Niranjana :::::: CC: Doug Ledford --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org