From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v4 bpf-next 2/6] netdevice: check for net_device::priv_flags bitfield overflow
Date: Tue, 16 Feb 2021 22:18:09 +0800 [thread overview]
Message-ID: <202102162238.YaqyywZz-lkp@intel.com> (raw)
In-Reply-To: <20210216113740.62041-3-alobakin@pm.me>
[-- Attachment #1: Type: text/plain, Size: 4522 bytes --]
Hi Alexander,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Alexander-Lobakin/xsk-build-skb-by-page-aka-generic-zerocopy-xmit/20210216-194634
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: riscv-randconfig-r014-20210216 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/ab71cd66e7a92a19ed9d78686970702fbbf0cd09
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexander-Lobakin/xsk-build-skb-by-page-aka-generic-zerocopy-xmit/20210216-194634
git checkout ab71cd66e7a92a19ed9d78686970702fbbf0cd09
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
In file included from net/8021q/vlanproc.c:26:
include/linux/netdevice.h:1566:1: error: static_assert failed due to requirement 'sizeof(unsigned int) * 8 <= NETDEV_PRIV_FLAG_COUNT' "sizeof(netdev_priv_flags_t) * BITS_PER_BYTE <= NETDEV_PRIV_FLAG_COUNT"
static_assert(sizeof(netdev_priv_flags_t) * BITS_PER_BYTE <=
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
>> net/8021q/vlanproc.c:257:30: warning: format specifies type 'unsigned short' but the argument has type 'netdev_priv_flags_t' (aka 'unsigned int') [-Wformat]
(int)(vlan->flags & 1), vlandev->priv_flags);
^~~~~~~~~~~~~~~~~~~
net/8021q/vlanproc.c:284:22: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
mp->priority, ((mp->vlan_qos >> 13) & 0x7));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
vim +257 net/8021q/vlanproc.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 240
^1da177e4c3f41 Linus Torvalds 2005-04-16 241 static int vlandev_seq_show(struct seq_file *seq, void *offset)
^1da177e4c3f41 Linus Torvalds 2005-04-16 242 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 243 struct net_device *vlandev = (struct net_device *) seq->private;
7da82c06ded105 Jiri Pirko 2011-12-08 244 const struct vlan_dev_priv *vlan = vlan_dev_priv(vlandev);
28172739f0a276 Eric Dumazet 2010-07-07 245 struct rtnl_link_stats64 temp;
be1f3c2c027cc5 Ben Hutchings 2010-06-08 246 const struct rtnl_link_stats64 *stats;
be1f3c2c027cc5 Ben Hutchings 2010-06-08 247 static const char fmt64[] = "%30s %12llu\n";
^1da177e4c3f41 Linus Torvalds 2005-04-16 248 int i;
^1da177e4c3f41 Linus Torvalds 2005-04-16 249
26a25239d7a660 Joonwoo Park 2008-07-08 250 if (!is_vlan_dev(vlandev))
^1da177e4c3f41 Linus Torvalds 2005-04-16 251 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 252
28172739f0a276 Eric Dumazet 2010-07-07 253 stats = dev_get_stats(vlandev, &temp);
2029cc2c84fb11 Patrick McHardy 2008-01-21 254 seq_printf(seq,
2029cc2c84fb11 Patrick McHardy 2008-01-21 255 "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n",
7da82c06ded105 Jiri Pirko 2011-12-08 256 vlandev->name, vlan->vlan_id,
7da82c06ded105 Jiri Pirko 2011-12-08 @257 (int)(vlan->flags & 1), vlandev->priv_flags);
---
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: 44327 bytes --]
next prev parent reply other threads:[~2021-02-16 14:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-16 11:38 [PATCH v4 bpf-next 0/6] xsk: build skb by page (aka generic zerocopy xmit) Alexander Lobakin
2021-02-16 11:38 ` [PATCH v4 bpf-next 1/6] netdev_priv_flags: add missing IFF_PHONY_HEADROOM self-definition Alexander Lobakin
2021-02-16 11:38 ` [PATCH v4 bpf-next 2/6] netdevice: check for net_device::priv_flags bitfield overflow Alexander Lobakin
2021-02-16 14:18 ` kernel test robot [this message]
2021-02-16 11:38 ` [PATCH v4 bpf-next 3/6] net: add priv_flags for allow tx skb without linear Alexander Lobakin
2021-02-16 11:38 ` [PATCH v4 bpf-next 4/6] virtio-net: support IFF_TX_SKB_NO_LINEAR Alexander Lobakin
2021-02-16 11:39 ` [PATCH v4 bpf-next 5/6] xsk: respect device's headroom and tailroom on generic xmit path Alexander Lobakin
2021-02-16 14:08 ` Magnus Karlsson
2021-02-16 11:39 ` [PATCH v4 bpf-next 6/6] xsk: build skb by page (aka generic zerocopy xmit) Alexander Lobakin
2021-02-16 14:08 ` Magnus Karlsson
2021-02-16 14:15 ` Alexander Lobakin
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=202102162238.YaqyywZz-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@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.