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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109061159.JYnPdybM-lkp@intel.com>
Date:   Mon, 6 Sep 2021 11:40:12 +0800
From:   kernel test robot <lkp@...el.com>
To:     Wen Gong <wgong@...eaurora.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jouni Malinen <jouni@...eaurora.org>,
        Johannes Berg <johannes.berg@...el.com>
Subject: [linux-stable-rc:linux-5.4.y 6817/6970]
 drivers/net/wireless/ath/ath10k/htt_rx.c:1773:7: warning: variable
 'more_frags' set but not used

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head:   70154d2f82a9058e8316b6e106071c72fcc58718
commit: 6bf449a34c0de8becabc3d3a9f76b32cb287347e [6817/6970] ath10k: add CCMP PN replay protection for fragmented frames for PCIe
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=6bf449a34c0de8becabc3d3a9f76b32cb287347e
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc linux-5.4.y
        git checkout 6bf449a34c0de8becabc3d3a9f76b32cb287347e
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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/wireless/ath/ath10k/htt_rx.c: In function 'ath10k_htt_rx_h_frag_pn_check':
>> drivers/net/wireless/ath/ath10k/htt_rx.c:1773:7: warning: variable 'more_frags' set but not used [-Wunused-but-set-variable]
    1773 |  bool more_frags;
         |       ^~~~~~~~~~


vim +/more_frags +1773 drivers/net/wireless/ath/ath10k/htt_rx.c

  1763	
  1764	static bool ath10k_htt_rx_h_frag_pn_check(struct ath10k *ar,
  1765						  struct sk_buff *skb,
  1766						  u16 peer_id,
  1767						  u16 offset,
  1768						  enum htt_rx_mpdu_encrypt_type enctype)
  1769	{
  1770		struct ath10k_peer *peer;
  1771		union htt_rx_pn_t *last_pn, new_pn = {0};
  1772		struct ieee80211_hdr *hdr;
> 1773		bool more_frags;
  1774		u8 tid, frag_number;
  1775		u32 seq;
  1776	
  1777		peer = ath10k_peer_find_by_id(ar, peer_id);
  1778		if (!peer) {
  1779			ath10k_dbg(ar, ATH10K_DBG_HTT, "invalid peer for frag pn check\n");
  1780			return false;
  1781		}
  1782	
  1783		hdr = (struct ieee80211_hdr *)(skb->data + offset);
  1784		if (ieee80211_is_data_qos(hdr->frame_control))
  1785			tid = ieee80211_get_tid(hdr);
  1786		else
  1787			tid = ATH10K_TXRX_NON_QOS_TID;
  1788	
  1789		last_pn = &peer->frag_tids_last_pn[tid];
  1790		new_pn.pn48 = ath10k_htt_rx_h_get_pn(ar, skb, offset, enctype);
  1791		more_frags = ieee80211_has_morefrags(hdr->frame_control);
  1792		frag_number = le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG;
  1793		seq = (__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
  1794	
  1795		if (frag_number == 0) {
  1796			last_pn->pn48 = new_pn.pn48;
  1797			peer->frag_tids_seq[tid] = seq;
  1798		} else {
  1799			if (seq != peer->frag_tids_seq[tid])
  1800				return false;
  1801	
  1802			if (new_pn.pn48 != last_pn->pn48 + 1)
  1803				return false;
  1804	
  1805			last_pn->pn48 = new_pn.pn48;
  1806		}
  1807	
  1808		return true;
  1809	}
  1810	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ