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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 11 Oct 2021 21:33:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     Grygorii Strashko <grygorii.strashko@...com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Vignesh Raghavendra <vigneshr@...com>,
        Lokesh Vutla <lokeshvutla@...com>
Subject: [ti:ti-rt-linux-5.10.y 9988/9998]
 drivers/net/ethernet/ti/prueth_core.c:1053:46: warning: variable 'ssh1' set
 but not used

tree:   git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head:   7ff055c5f01acc96255948cdd632c72fd78a1f72
commit: 0dc2edeb42b305ab613187bef89d11f8b167d551 [9988/9998] net: ti: prueth: hsr: add support for packets timestamping
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.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
        git remote add ti git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
        git fetch --no-tags ti ti-rt-linux-5.10.y
        git checkout 0dc2edeb42b305ab613187bef89d11f8b167d551
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/ti/prueth_core.c: In function 'prueth_hsr_ptp_ct_tx_ts_enqueue':
>> drivers/net/ethernet/ti/prueth_core.c:1053:46: warning: variable 'ssh1' set but not used [-Wunused-but-set-variable]
    1053 |                 struct skb_shared_hwtstamps *ssh1;
         |                                              ^~~~
   drivers/net/ethernet/ti/prueth_core.c:1066:110: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    1066 |                 netdev_warn(other_emac->ndev, "Dropped cut through event waiting for tx ts. %d %x\n", event, (u32)skb);
         |                                                                                                              ^


vim +/ssh1 +1053 drivers/net/ethernet/ti/prueth_core.c

  1018	
  1019	static int prueth_hsr_ptp_ct_tx_ts_enqueue(struct prueth_emac *emac, struct sk_buff *skb, u16 type)
  1020	{
  1021		struct prueth_emac *other_emac = emac->prueth->emac[other_port_id(emac->port_id) - 1];
  1022		struct skb_shared_hwtstamps *red_ssh;
  1023		unsigned long flags;
  1024		u8 ptp_type, event;
  1025		int changed = 0;
  1026		u64 ns;
  1027	
  1028		if (type == ETH_P_8021Q) {
  1029			__skb_pull(skb, VLAN_HLEN);
  1030			changed += VLAN_HLEN;
  1031		}
  1032	
  1033		__skb_pull(skb, ICSS_LRE_TAG_RCT_SIZE);
  1034		changed += ICSS_LRE_TAG_RCT_SIZE;
  1035	
  1036		skb_reset_mac_header(skb);
  1037		event = prueth_ptp_ts_event_type(skb, &ptp_type);
  1038	
  1039		__skb_push(skb, changed);
  1040	
  1041		/* Store skbs for only cut through packets */
  1042		if (event == PRUETH_PTP_TS_EVENTS ||
  1043		    (ptp_type != PTP_MSGTYPE_SYNC &&
  1044		    ptp_type != PTP_MSGTYPE_DELAY_REQ))
  1045			return 0;
  1046	
  1047		/* cut through packet might have already be forwarded before the rx packet has reached
  1048		 * the host. In this case tx irq handler ignores the interrupt as there is no skb stored.
  1049		 * So check if ts is already available before storing the skb.
  1050		 */
  1051		ns = prueth_ptp_ts_get(other_emac, prueth_tx_ts_offs_get(other_emac->port_id - 1, event));
  1052		if (ns || !other_emac->link) {
> 1053			struct skb_shared_hwtstamps *ssh1;
  1054	
  1055			ssh1 = skb_hwtstamps(skb);
  1056			/* Save the cut-through tx ts in skb redinfo. */
  1057			red_ssh = skb_redinfo_hwtstamps(skb);
  1058			memset(red_ssh, 0, sizeof(*red_ssh));
  1059			red_ssh->hwtstamp = ns_to_ktime(ns);
  1060			return 0;
  1061		}
  1062	
  1063		/* Store the skb so that tx irq handler will populate the ts */
  1064		spin_lock_irqsave(&other_emac->ptp_skb_lock, flags);
  1065		if (other_emac->ptp_ct_skb[event]) {
  1066			netdev_warn(other_emac->ndev, "Dropped cut through event waiting for tx ts. %d %x\n", event, (u32)skb);
  1067			dev_consume_skb_any(other_emac->ptp_ct_skb[event]);
  1068			prueth_ptp_tx_ts_reset(other_emac, event);
  1069		}
  1070	
  1071		other_emac->ptp_ct_skb[event] = skb;
  1072		spin_unlock_irqrestore(&other_emac->ptp_skb_lock, flags);
  1073	
  1074		return -EAGAIN;
  1075	}
  1076	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ