From: kernel test robot <lkp@intel.com>
To: "Zhangfei, Gao," <zhangfei.gao@linaro.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Herbert Xu <herbert@gondor.apana.org.au>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Zhou Wang <wangzhou1@hisilicon.com>
Subject: drivers/crypto/hisilicon/qm.c:1579:2: warning: 'strncpy' specified bound 64 equals destination size
Date: Wed, 3 Jun 2020 21:32:13 +0800 [thread overview]
Message-ID: <202006032110.BEbKqovX%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2964 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d6f9469a03d832dcd17041ed67774ffb5f3e73b3
commit: 9e00df7156e45e42c695ffc596b4bf1328d00516 crypto: hisilicon - register zip engine to uacce
date: 3 months ago
config: ia64-randconfig-r026-20200603 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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 checkout 9e00df7156e45e42c695ffc596b4bf1328d00516
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In function 'qm_alloc_uacce',
inlined from 'hisi_qm_init' at drivers/crypto/hisilicon/qm.c:1660:8:
>> drivers/crypto/hisilicon/qm.c:1579:2: warning: 'strncpy' specified bound 64 equals destination size [-Wstringop-truncation]
1579 | strncpy(interface.name, pdev->driver->name, sizeof(interface.name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +1579 drivers/crypto/hisilicon/qm.c
1567
1568 static int qm_alloc_uacce(struct hisi_qm *qm)
1569 {
1570 struct pci_dev *pdev = qm->pdev;
1571 struct uacce_device *uacce;
1572 unsigned long mmio_page_nr;
1573 unsigned long dus_page_nr;
1574 struct uacce_interface interface = {
1575 .flags = UACCE_DEV_SVA,
1576 .ops = &uacce_qm_ops,
1577 };
1578
> 1579 strncpy(interface.name, pdev->driver->name, sizeof(interface.name));
1580
1581 uacce = uacce_alloc(&pdev->dev, &interface);
1582 if (IS_ERR(uacce))
1583 return PTR_ERR(uacce);
1584
1585 if (uacce->flags & UACCE_DEV_SVA) {
1586 qm->use_sva = true;
1587 } else {
1588 /* only consider sva case */
1589 uacce_remove(uacce);
1590 qm->uacce = NULL;
1591 return -EINVAL;
1592 }
1593
1594 uacce->is_vf = pdev->is_virtfn;
1595 uacce->priv = qm;
1596 uacce->algs = qm->algs;
1597
1598 if (qm->ver == QM_HW_V1) {
1599 mmio_page_nr = QM_DOORBELL_PAGE_NR;
1600 uacce->api_ver = HISI_QM_API_VER_BASE;
1601 } else {
1602 mmio_page_nr = QM_DOORBELL_PAGE_NR +
1603 QM_DOORBELL_SQ_CQ_BASE_V2 / PAGE_SIZE;
1604 uacce->api_ver = HISI_QM_API_VER2_BASE;
1605 }
1606
1607 dus_page_nr = (PAGE_SIZE - 1 + qm->sqe_size * QM_Q_DEPTH +
1608 sizeof(struct qm_cqe) * QM_Q_DEPTH) >> PAGE_SHIFT;
1609
1610 uacce->qf_pg_num[UACCE_QFRT_MMIO] = mmio_page_nr;
1611 uacce->qf_pg_num[UACCE_QFRT_DUS] = dus_page_nr;
1612
1613 qm->uacce = uacce;
1614
1615 return 0;
1616 }
1617
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37110 bytes --]
next reply other threads:[~2020-06-03 13:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 13:32 kernel test robot [this message]
2020-06-04 3:32 ` [PATCH] crypto: hisilicon - fix strncpy warning with strlcpy Zhangfei Gao
2020-06-04 3:39 ` Herbert Xu
2020-06-04 6:10 ` Zhangfei Gao
2020-06-04 6:18 ` Herbert Xu
2020-06-04 6:44 ` Zhangfei Gao
2020-06-04 6:50 ` Herbert Xu
2020-06-04 13:52 ` Zhou Wang
2020-06-05 9:34 ` Zhangfei Gao
2020-06-05 12:17 ` Herbert Xu
2020-06-05 15:26 ` Zhangfei Gao
2020-06-05 15:49 ` Eric Biggers
2020-06-06 1:42 ` Zhangfei Gao
2020-06-07 13:03 ` David Laight
2020-06-10 6:56 ` Eric Biggers
2020-06-15 3:38 ` [PATCH v2] crypto: hisilicon - fix strncpy warning with strscpy Zhangfei Gao
2020-06-26 6:06 ` Herbert Xu
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=202006032110.BEbKqovX%lkp@intel.com \
--to=lkp@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wangzhou1@hisilicon.com \
--cc=zhangfei.gao@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®