From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5467 rtl8xxxu_c2hcmd_callback() warn: potential spectre issue 'rtl8xxxu_legacy_ratetable' (local cap)
Date: Thu, 11 Jun 2020 17:36:45 +0800 [thread overview]
Message-ID: <202006111741.z7sku0bs%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6589 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Chris Chiu <chiu@endlessm.com>
CC: Kalle Valo <kvalo@codeaurora.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: 0985d3a410ace005ce62666b67c9372dfc14bd7f rtl8xxxu: Feed current txrate information for mac80211
date: 3 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-m031-20200611 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5467 rtl8xxxu_c2hcmd_callback() warn: potential spectre issue 'rtl8xxxu_legacy_ratetable' [r] (local cap)
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0985d3a410ace005ce62666b67c9372dfc14bd7f
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 0985d3a410ace005ce62666b67c9372dfc14bd7f
vim +/rtl8xxxu_legacy_ratetable +5467 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
0985d3a410ace0 Chris Chiu 2020-03-20 5420
e542e66b7c2ee2 Chris Chiu 2019-10-05 5421 static void rtl8xxxu_c2hcmd_callback(struct work_struct *work)
e542e66b7c2ee2 Chris Chiu 2019-10-05 5422 {
e542e66b7c2ee2 Chris Chiu 2019-10-05 5423 struct rtl8xxxu_priv *priv;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5424 struct rtl8723bu_c2h *c2h;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5425 struct sk_buff *skb = NULL;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5426 unsigned long flags;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5427 u8 bt_info = 0;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5428 struct rtl8xxxu_btcoex *btcoex;
0985d3a410ace0 Chris Chiu 2020-03-20 5429 struct rtl8xxxu_ra_report *rarpt;
0985d3a410ace0 Chris Chiu 2020-03-20 5430 u8 rate, sgi, bw;
0985d3a410ace0 Chris Chiu 2020-03-20 5431 u32 bit_rate;
0985d3a410ace0 Chris Chiu 2020-03-20 5432 u8 mcs = 0, nss = 0;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5433
e542e66b7c2ee2 Chris Chiu 2019-10-05 5434 priv = container_of(work, struct rtl8xxxu_priv, c2hcmd_work);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5435 btcoex = &priv->bt_coex;
0985d3a410ace0 Chris Chiu 2020-03-20 5436 rarpt = &priv->ra_report;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5437
e542e66b7c2ee2 Chris Chiu 2019-10-05 5438 if (priv->rf_paths > 1)
e542e66b7c2ee2 Chris Chiu 2019-10-05 5439 goto out;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5440
e542e66b7c2ee2 Chris Chiu 2019-10-05 5441 while (!skb_queue_empty(&priv->c2hcmd_queue)) {
e542e66b7c2ee2 Chris Chiu 2019-10-05 5442 spin_lock_irqsave(&priv->c2hcmd_lock, flags);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5443 skb = __skb_dequeue(&priv->c2hcmd_queue);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5444 spin_unlock_irqrestore(&priv->c2hcmd_lock, flags);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5445
e542e66b7c2ee2 Chris Chiu 2019-10-05 5446 c2h = (struct rtl8723bu_c2h *)skb->data;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5447
e542e66b7c2ee2 Chris Chiu 2019-10-05 5448 switch (c2h->id) {
e542e66b7c2ee2 Chris Chiu 2019-10-05 5449 case C2H_8723B_BT_INFO:
e542e66b7c2ee2 Chris Chiu 2019-10-05 5450 bt_info = c2h->bt_info.bt_info;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5451
e542e66b7c2ee2 Chris Chiu 2019-10-05 5452 rtl8723bu_update_bt_link_info(priv, bt_info);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5453 if (btcoex->c2h_bt_inquiry) {
e542e66b7c2ee2 Chris Chiu 2019-10-05 5454 rtl8723bu_handle_bt_inquiry(priv);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5455 break;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5456 }
e542e66b7c2ee2 Chris Chiu 2019-10-05 5457 rtl8723bu_handle_bt_info(priv);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5458 break;
0985d3a410ace0 Chris Chiu 2020-03-20 5459 case C2H_8723B_RA_REPORT:
0985d3a410ace0 Chris Chiu 2020-03-20 5460 rarpt->txrate.flags = 0;
0985d3a410ace0 Chris Chiu 2020-03-20 5461 rate = c2h->ra_report.rate;
0985d3a410ace0 Chris Chiu 2020-03-20 5462 sgi = c2h->ra_report.sgi;
0985d3a410ace0 Chris Chiu 2020-03-20 5463 bw = c2h->ra_report.bw;
0985d3a410ace0 Chris Chiu 2020-03-20 5464
0985d3a410ace0 Chris Chiu 2020-03-20 5465 if (rate < DESC_RATE_MCS0) {
0985d3a410ace0 Chris Chiu 2020-03-20 5466 rarpt->txrate.legacy =
0985d3a410ace0 Chris Chiu 2020-03-20 @5467 rtl8xxxu_legacy_ratetable[rate].bitrate;
0985d3a410ace0 Chris Chiu 2020-03-20 5468 } else {
0985d3a410ace0 Chris Chiu 2020-03-20 5469 rtl8xxxu_desc_to_mcsrate(rate, &mcs, &nss);
0985d3a410ace0 Chris Chiu 2020-03-20 5470 rarpt->txrate.flags |= RATE_INFO_FLAGS_MCS;
0985d3a410ace0 Chris Chiu 2020-03-20 5471
0985d3a410ace0 Chris Chiu 2020-03-20 5472 rarpt->txrate.mcs = mcs;
0985d3a410ace0 Chris Chiu 2020-03-20 5473 rarpt->txrate.nss = nss;
0985d3a410ace0 Chris Chiu 2020-03-20 5474
0985d3a410ace0 Chris Chiu 2020-03-20 5475 if (sgi) {
0985d3a410ace0 Chris Chiu 2020-03-20 5476 rarpt->txrate.flags |=
0985d3a410ace0 Chris Chiu 2020-03-20 5477 RATE_INFO_FLAGS_SHORT_GI;
0985d3a410ace0 Chris Chiu 2020-03-20 5478 }
0985d3a410ace0 Chris Chiu 2020-03-20 5479
0985d3a410ace0 Chris Chiu 2020-03-20 5480 if (bw == RATE_INFO_BW_20)
0985d3a410ace0 Chris Chiu 2020-03-20 5481 rarpt->txrate.bw |= RATE_INFO_BW_20;
0985d3a410ace0 Chris Chiu 2020-03-20 5482 }
0985d3a410ace0 Chris Chiu 2020-03-20 5483 bit_rate = cfg80211_calculate_bitrate(&rarpt->txrate);
0985d3a410ace0 Chris Chiu 2020-03-20 5484 rarpt->bit_rate = bit_rate;
0985d3a410ace0 Chris Chiu 2020-03-20 5485 rarpt->desc_rate = rate;
0985d3a410ace0 Chris Chiu 2020-03-20 5486 break;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5487 default:
e542e66b7c2ee2 Chris Chiu 2019-10-05 5488 break;
e542e66b7c2ee2 Chris Chiu 2019-10-05 5489 }
e542e66b7c2ee2 Chris Chiu 2019-10-05 5490 }
e542e66b7c2ee2 Chris Chiu 2019-10-05 5491
e542e66b7c2ee2 Chris Chiu 2019-10-05 5492 out:
e542e66b7c2ee2 Chris Chiu 2019-10-05 5493 dev_kfree_skb(skb);
e542e66b7c2ee2 Chris Chiu 2019-10-05 5494 }
e542e66b7c2ee2 Chris Chiu 2019-10-05 5495
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36960 bytes --]
next reply other threads:[~2020-06-11 9:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 9:36 kernel test robot [this message]
2020-07-29 0:44 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:5467 rtl8xxxu_c2hcmd_callback() warn: potential spectre issue 'rtl8xxxu_legacy_ratetable' (local cap) kernel test robot
2020-10-11 3:31 kernel test robot
2020-12-31 17:49 kernel test robot
2021-02-22 1:44 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202006111741.z7sku0bs%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.