[aa:master 15/20] mm/swapfile.c:1649:13: error: implicit declaration of function 'page_mapcount_seq_begin'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git master
head: 34dd03a2fe9af1f1a9dbd7ec65eb1f247bdfe0db
commit: 4e14c9de85753f6debbd4e6559a3036d99696326 [15/20] mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked()
config: powerpc64-randconfig-r014-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git/commit/?id=...
git remote add aa https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git
git fetch --no-tags aa master
git checkout 4e14c9de85753f6debbd4e6559a3036d99696326
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> mm/swapfile.c:1649:13: error: implicit declaration of function 'page_mapcount_seq_begin' [-Werror,-Wimplicit-function-declaration]
seqcount = page_mapcount_seq_begin(page);
^
mm/swapfile.c:1649:13: note: did you mean 'page_mapcount_reset'?
include/linux/mm.h:832:20: note: 'page_mapcount_reset' declared here
static inline void page_mapcount_reset(struct page *page)
^
>> mm/swapfile.c:1680:6: error: implicit declaration of function 'page_mapcount_seq_retry' [-Werror,-Wimplicit-function-declaration]
if (page_mapcount_seq_retry(page, seqcount))
^
mm/swapfile.c:1680:6: note: did you mean 'page_mapcount_seq_begin'?
mm/swapfile.c:1649:13: note: 'page_mapcount_seq_begin' declared here
seqcount = page_mapcount_seq_begin(page);
^
2 errors generated.
vim +/page_mapcount_seq_begin +1649 mm/swapfile.c
1622
1623 static int page_trans_huge_map_swapcount(struct page *page, int *total_mapcount,
1624 int *total_swapcount)
1625 {
1626 int i, map_swapcount, _total_mapcount, _total_swapcount;
1627 unsigned long offset = 0;
1628 struct swap_info_struct *si;
1629 struct swap_cluster_info *ci = NULL;
1630 unsigned char *map = NULL;
1631 int mapcount, swapcount = 0;
1632 unsigned long seqcount;
1633
1634 /* hugetlbfs shouldn't call it */
1635 VM_BUG_ON_PAGE(PageHuge(page), page);
1636
1637 if (!IS_ENABLED(CONFIG_THP_SWAP) || likely(!PageTransCompound(page))) {
1638 mapcount = page_trans_huge_mapcount(page, total_mapcount);
1639 if (PageSwapCache(page))
1640 swapcount = page_swapcount(page);
1641 if (total_swapcount)
1642 *total_swapcount = swapcount;
1643 return mapcount + swapcount;
1644 }
1645
1646 page = compound_head(page);
1647
1648 again:
> 1649 seqcount = page_mapcount_seq_begin(page);
1650
1651 _total_mapcount = _total_swapcount = map_swapcount = 0;
1652 if (PageSwapCache(page)) {
1653 swp_entry_t entry;
1654
1655 entry.val = page_private(page);
1656 si = _swap_info_get(entry);
1657 if (si) {
1658 map = si->swap_map;
1659 offset = swp_offset(entry);
1660 }
1661 }
1662 if (map)
1663 ci = lock_cluster(si, offset);
1664 for (i = 0; i < HPAGE_PMD_NR; i++) {
1665 mapcount = atomic_read(&page[i]._mapcount) + 1;
1666 _total_mapcount += mapcount;
1667 if (map) {
1668 swapcount = swap_count(map[offset + i]);
1669 _total_swapcount += swapcount;
1670 }
1671 map_swapcount = max(map_swapcount, mapcount + swapcount);
1672 }
1673 unlock_cluster(ci);
1674 if (PageDoubleMap(page)) {
1675 map_swapcount -= 1;
1676 _total_mapcount -= HPAGE_PMD_NR;
1677 }
1678 mapcount = compound_mapcount(page);
1679
> 1680 if (page_mapcount_seq_retry(page, seqcount))
1681 goto again;
1682
1683 map_swapcount += mapcount;
1684 _total_mapcount += mapcount;
1685 if (total_mapcount)
1686 *total_mapcount = _total_mapcount;
1687 if (total_swapcount)
1688 *total_swapcount = _total_swapcount;
1689
1690 return map_swapcount;
1691 }
1692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[jfern:coresched 12/12] include/linux/entry-common.h:452:48: warning: 'enum ht_protect_ctx' declared inside parameter list will not be visible outside of this definition or declaration
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git coresched
head: 0cae4d526e66a8aa5f8b3626045be344860e9b8d
commit: 0cae4d526e66a8aa5f8b3626045be344860e9b8d [12/12] FIXUP: Add a ht_protect= kernel cmdline option.
config: i386-randconfig-s002-20210115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/commit/?i...
git remote add jfern https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git
git fetch --no-tags jfern coresched
git checkout 0cae4d526e66a8aa5f8b3626045be344860e9b8d
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from kernel/entry/common.c:4:
>> include/linux/entry-common.h:452:48: warning: 'enum ht_protect_ctx' declared inside parameter list will not be visible outside of this definition or declaration
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
include/linux/entry-common.h:452:63: error: parameter 1 ('ctx') has incomplete type
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
include/linux/entry-common.h:452:20: error: function declaration isn't a prototype [-Werror=strict-prototypes]
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/context_tracking.h:5,
from kernel/entry/common.c:3:
include/linux/entry-common.h: In function 'entry_kernel_protected':
include/linux/sched.h:2099:45: error: expected expression before 'do'
2099 | #define sched_core_kernel_protected(ignore) do { } while (0)
| ^~
include/linux/entry-common.h:456:9: note: in expansion of macro 'sched_core_kernel_protected'
456 | return sched_core_kernel_protected(ctx) && _TIF_UNSAFE_RET != 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c: At top level:
>> kernel/entry/common.c:22:13: warning: 'enum ht_protect_ctx' declared inside parameter list will not be visible outside of this definition or declaration
22 | enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
kernel/entry/common.c:22:28: error: parameter 2 ('ctx') has incomplete type
22 | enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
kernel/entry/common.c:21:29: error: function declaration isn't a prototype [-Werror=strict-prototypes]
21 | static __always_inline void enter_from_user_mode(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c: In function 'syscall_enter_from_user_mode':
kernel/entry/common.c:99:29: error: 'HT_PROTECT_SYSCALL' undeclared (first use in this function)
99 | enter_from_user_mode(regs, HT_PROTECT_SYSCALL);
| ^~~~~~~~~~~~~~~~~~
kernel/entry/common.c:99:29: note: each undeclared identifier is reported only once for each function it appears in
kernel/entry/common.c: In function 'syscall_enter_from_user_mode_prepare':
kernel/entry/common.c:111:29: error: 'HT_PROTECT_SYSCALL' undeclared (first use in this function)
111 | enter_from_user_mode(regs, HT_PROTECT_SYSCALL);
| ^~~~~~~~~~~~~~~~~~
kernel/entry/common.c: At top level:
kernel/entry/common.c:152:49: warning: 'enum ht_protect_ctx' declared inside parameter list will not be visible outside of this definition or declaration
152 | static unsigned long exit_to_user_get_work(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
kernel/entry/common.c:152:64: error: parameter 1 ('ctx') has incomplete type
152 | static unsigned long exit_to_user_get_work(enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
kernel/entry/common.c:152:22: error: function declaration isn't a prototype [-Werror=strict-prototypes]
152 | static unsigned long exit_to_user_get_work(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c:174:15: warning: 'enum ht_protect_ctx' declared inside parameter list will not be visible outside of this definition or declaration
174 | enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
kernel/entry/common.c:174:30: error: parameter 3 ('ctx') has incomplete type
174 | enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
kernel/entry/common.c:172:22: error: function declaration isn't a prototype [-Werror=strict-prototypes]
172 | static unsigned long exit_to_user_mode_loop(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c:217:66: warning: 'enum ht_protect_ctx' declared inside parameter list will not be visible outside of this definition or declaration
217 | static void exit_to_user_mode_prepare(struct pt_regs *regs, enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
kernel/entry/common.c:217:81: error: parameter 2 ('ctx') has incomplete type
217 | static void exit_to_user_mode_prepare(struct pt_regs *regs, enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
kernel/entry/common.c:217:13: error: function declaration isn't a prototype [-Werror=strict-prototypes]
217 | static void exit_to_user_mode_prepare(struct pt_regs *regs, enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c: In function 'syscall_exit_to_user_mode':
kernel/entry/common.c:300:34: error: 'HT_PROTECT_SYSCALL' undeclared (first use in this function)
300 | exit_to_user_mode_prepare(regs, HT_PROTECT_SYSCALL);
| ^~~~~~~~~~~~~~~~~~
kernel/entry/common.c: In function 'irqentry_enter_from_user_mode':
kernel/entry/common.c:307:29: error: 'HT_PROTECT_IRQ' undeclared (first use in this function)
307 | enter_from_user_mode(regs, HT_PROTECT_IRQ);
| ^~~~~~~~~~~~~~
kernel/entry/common.c: In function 'irqentry_exit_to_user_mode':
kernel/entry/common.c:313:34: error: 'HT_PROTECT_IRQ' undeclared (first use in this function)
313 | exit_to_user_mode_prepare(regs, HT_PROTECT_IRQ);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from kernel/sched/idle.c:9:
kernel/sched/sched.h:1287:17: warning: 'struct sched_group' declared inside parameter list will not be visible outside of this definition or declaration
1287 | struct sched_group *group)
| ^~~~~~~~~~~
In file included from kernel/sched/idle.c:11:
>> include/linux/entry-common.h:452:48: warning: 'enum ht_protect_ctx' declared inside parameter list will not be visible outside of this definition or declaration
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
include/linux/entry-common.h:452:63: error: parameter 1 ('ctx') has incomplete type
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
include/linux/entry-common.h:452:20: error: function declaration isn't a prototype [-Werror=strict-prototypes]
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/sched/sched.h:5,
from kernel/sched/idle.c:9:
include/linux/entry-common.h: In function 'entry_kernel_protected':
include/linux/sched.h:2099:45: error: expected expression before 'do'
2099 | #define sched_core_kernel_protected(ignore) do { } while (0)
| ^~
include/linux/entry-common.h:456:9: note: in expansion of macro 'sched_core_kernel_protected'
456 | return sched_core_kernel_protected(ctx) && _TIF_UNSAFE_RET != 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +452 include/linux/entry-common.h
450
451 /* entry_kernel_protected - Is kernel protection on entry/exit into kernel supported? */
> 452 static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
453 {
454 if (!IS_ENABLED(CONFIG_SCHED_CORE))
455 return false;
456 return sched_core_kernel_protected(ctx) && _TIF_UNSAFE_RET != 0;
457 }
458
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH 12/21] objtool: Add CONFIG_CFI_CLANG support
by kernel test robot
Hi Josh,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/master]
[also build test ERROR on linus/master v5.11-rc3 next-20210115]
[cannot apply to xen-tip/linux-next tip/x86/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Josh-Poimboeuf/objtool-vmlinux-o...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2c2adbc40b7276518921864053f3c02034b2290f
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/8bd968235f05d3e12d27c48feea19efdb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Josh-Poimboeuf/objtool-vmlinux-o-and-CLANG-LTO-support/20210115-125439
git checkout 8bd968235f05d3e12d27c48feea19efdb7abeca6
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All errors (new ones prefixed by >>):
elf.c: In function 'read_symbols':
elf.c:414:8: error: unused variable 'coldstr' [-Werror=unused-variable]
414 | char *coldstr;
| ^~~~~~~
elf.c: In function 'elf_open_read':
>> elf.c:640:12: error: 'sym' may be used uninitialized in this function [-Werror=maybe-uninitialized]
640 | sym = find_func_by_offset(sym->sec,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
641 | reloc->addend);
| ~~~~~~~~~~~~~~
elf.c:637:27: note: 'sym' was declared here
637 | struct symbol *func, *sym;
| ^~~
cc1: all warnings being treated as errors
make[4]: *** [tools/build/Makefile.build:96: tools/objtool/elf.o] Error 1
make[3]: *** [Makefile:59: tools/objtool/objtool-in.o] Error 2
--
elf.c: In function 'read_symbols':
elf.c:414:8: error: unused variable 'coldstr' [-Werror=unused-variable]
414 | char *coldstr;
| ^~~~~~~
elf.c: In function 'elf_open_read':
>> elf.c:640:12: error: 'sym' may be used uninitialized in this function [-Werror=maybe-uninitialized]
640 | sym = find_func_by_offset(sym->sec,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
641 | reloc->addend);
| ~~~~~~~~~~~~~~
elf.c:637:27: note: 'sym' was declared here
637 | struct symbol *func, *sym;
| ^~~
cc1: all warnings being treated as errors
make[4]: *** [tools/build/Makefile.build:96: tools/objtool/elf.o] Error 1
make[3]: *** [Makefile:59: tools/objtool/objtool-in.o] Error 2
make[2]: *** [Makefile:68: objtool] Error 2
make[1]: *** [Makefile:1931: tools/objtool] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
elf.c: In function 'read_symbols':
elf.c:414:8: error: unused variable 'coldstr' [-Werror=unused-variable]
414 | char *coldstr;
| ^~~~~~~
elf.c: In function 'elf_open_read':
>> elf.c:640:12: error: 'sym' may be used uninitialized in this function [-Werror=maybe-uninitialized]
640 | sym = find_func_by_offset(sym->sec,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
641 | reloc->addend);
| ~~~~~~~~~~~~~~
elf.c:637:27: note: 'sym' was declared here
637 | struct symbol *func, *sym;
| ^~~
cc1: all warnings being treated as errors
make[4]: *** [tools/build/Makefile.build:96: tools/objtool/elf.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:59: tools/objtool/objtool-in.o] Error 2
make[2]: *** [Makefile:68: objtool] Error 2
make[1]: *** [Makefile:1931: tools/objtool] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[dsahern-linux:nvme-tcp-offload-v2 20/21] drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:143:1: warning: the frame size of 1080 bytes is larger than 1024 bytes
by kernel test robot
tree: https://github.com/dsahern/linux nvme-tcp-offload-v2
head: 04a43a05cc597ec306915c93b223b2cb4682dd08
commit: 8eb351bb71fb9079ec5844a58411f18aa703be13 [20/21] net/mlx5e: NVMEoTCP statistics
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/dsahern/linux/commit/8eb351bb71fb9079ec5844a58411f18aa...
git remote add dsahern-linux https://github.com/dsahern/linux
git fetch --no-tags dsahern-linux nvme-tcp-offload-v2
git checkout 8eb351bb71fb9079ec5844a58411f18aa703be13
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c: In function 'mlx5i_grp_sw_update_stats':
>> drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:143:1: warning: the frame size of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
143 | }
| ^
vim +143 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
48935bbb7ae8bd41 drivers/net/ethernet/mellanox/mlx5/core/ipoib.c Saeed Mahameed 2017-04-13 117
fbb66ad5dcbebc1b drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Wei Yongjun 2018-09-05 118 static void mlx5i_grp_sw_update_stats(struct mlx5e_priv *priv)
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 119 {
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 120 struct mlx5e_sw_stats s = { 0 };
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 121 int i, j;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 122
694826e366349d5b drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Tariq Toukan 2019-07-14 123 for (i = 0; i < priv->max_nch; i++) {
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 124 struct mlx5e_channel_stats *channel_stats;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 125 struct mlx5e_rq_stats *rq_stats;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 126
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 127 channel_stats = &priv->channel_stats[i];
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 128 rq_stats = &channel_stats->rq;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 129
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 130 s.rx_packets += rq_stats->packets;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 131 s.rx_bytes += rq_stats->bytes;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 132
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 133 for (j = 0; j < priv->max_opened_tc; j++) {
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 134 struct mlx5e_sq_stats *sq_stats = &channel_stats->sq[j];
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 135
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 136 s.tx_packets += sq_stats->packets;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 137 s.tx_bytes += sq_stats->bytes;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 138 s.tx_queue_dropped += sq_stats->dropped;
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 139 }
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 140 }
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 141
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 142 memcpy(&priv->stats.sw, &s, sizeof(s));
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 @143 }
c57d2358ff0dfa09 drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c Feras Daoud 2018-09-02 144
:::::: The code at line 143 was first introduced by commit
:::::: c57d2358ff0dfa09a05dea10d0ea1dd0895029b4 net/mlx5e: IPoIB, Add ndo stats support for IPoIB netdevices
:::::: TO: Feras Daoud <ferasda(a)mellanox.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
Re: [PATCH v2 2/9] KVM: arm64: Add a buffer that can pass UBSan data from hyp/nVHE to kernel
by kernel test robot
Hi Elena,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on arm64/for-next/core]
[cannot apply to kvmarm/next soc/for-next arm/for-next xlnx/master v5.11-rc3 next-20210115]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Elena-Petrova/UBSan-Enablement-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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
# https://github.com/0day-ci/linux/commit/aba3219bbab3bb5c7f037fe7b6c6c7839...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Elena-Petrova/UBSan-Enablement-for-hyp-nVHE-code/20210115-112509
git checkout aba3219bbab3bb5c7f037fe7b6c6c783942bc954
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm64/kvm/kvm_ubsan_buffer.c:12:
>> include/kvm/arm_pmu.h:52:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
52 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
include/kvm/arm_pmu.h:54:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
54 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
include/kvm/arm_pmu.h:56:15: warning: 'struct kvm_device_attr' declared inside parameter list will not be visible outside of this definition or declaration
56 | struct kvm_device_attr *attr);
| ^~~~~~~~~~~~~~~
>> arch/arm64/kvm/kvm_ubsan_buffer.c:21:6: warning: no previous prototype for 'iterate_kvm_ubsan_buffer' [-Wmissing-prototypes]
21 | void iterate_kvm_ubsan_buffer(unsigned long left, unsigned long right)
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> arch/arm64/kvm/kvm_ubsan_buffer.c:33:6: warning: no previous prototype for '__kvm_check_ubsan_buffer' [-Wmissing-prototypes]
33 | void __kvm_check_ubsan_buffer(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +52 include/kvm/arm_pmu.h
ab9468340d2bcc2a Shannon Zhao 2015-06-18 31
bb0c70bcca6ba3c8 Shannon Zhao 2016-01-11 32 #define kvm_arm_pmu_irq_initialized(v) ((v)->arch.pmu.irq_num >= VGIC_NR_SGIS)
051ff581ce70e822 Shannon Zhao 2015-12-08 33 u64 kvm_pmu_get_counter_value(struct kvm_vcpu *vcpu, u64 select_idx);
051ff581ce70e822 Shannon Zhao 2015-12-08 34 void kvm_pmu_set_counter_value(struct kvm_vcpu *vcpu, u64 select_idx, u64 val);
96b0eebcc6a14e3b Shannon Zhao 2015-09-08 35 u64 kvm_pmu_valid_counter_mask(struct kvm_vcpu *vcpu);
88865beca90621ae Marc Zyngier 2020-03-12 36 u64 kvm_pmu_get_pmceid(struct kvm_vcpu *vcpu, bool pmceid1);
bca031e2c8aa22a9 Zenghui Yu 2019-07-18 37 void kvm_pmu_vcpu_init(struct kvm_vcpu *vcpu);
2aa36e9840d71710 Shannon Zhao 2015-09-11 38 void kvm_pmu_vcpu_reset(struct kvm_vcpu *vcpu);
5f0a714a2b63c25f Shannon Zhao 2015-09-11 39 void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu);
418e5ca88cc18b7e Andrew Murray 2019-06-17 40 void kvm_pmu_disable_counter_mask(struct kvm_vcpu *vcpu, u64 val);
418e5ca88cc18b7e Andrew Murray 2019-06-17 41 void kvm_pmu_enable_counter_mask(struct kvm_vcpu *vcpu, u64 val);
b02386eb7dac7555 Shannon Zhao 2016-02-26 42 void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu);
b02386eb7dac7555 Shannon Zhao 2016-02-26 43 void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu);
3dbbdf78636e6609 Christoffer Dall 2017-02-01 44 bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu);
3dbbdf78636e6609 Christoffer Dall 2017-02-01 45 void kvm_pmu_update_run(struct kvm_vcpu *vcpu);
7a0adc7064b88609 Shannon Zhao 2015-09-08 46 void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val);
76993739cd6f5b42 Shannon Zhao 2015-10-28 47 void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val);
7f7663587165fe1a Shannon Zhao 2015-07-03 48 void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, u64 data,
7f7663587165fe1a Shannon Zhao 2015-07-03 49 u64 select_idx);
808e738142e7086e Shannon Zhao 2016-01-11 50 bool kvm_arm_support_pmu_v3(void);
bb0c70bcca6ba3c8 Shannon Zhao 2016-01-11 51 int kvm_arm_pmu_v3_set_attr(struct kvm_vcpu *vcpu,
bb0c70bcca6ba3c8 Shannon Zhao 2016-01-11 @52 struct kvm_device_attr *attr);
bb0c70bcca6ba3c8 Shannon Zhao 2016-01-11 53 int kvm_arm_pmu_v3_get_attr(struct kvm_vcpu *vcpu,
bb0c70bcca6ba3c8 Shannon Zhao 2016-01-11 54 struct kvm_device_attr *attr);
bb0c70bcca6ba3c8 Shannon Zhao 2016-01-11 55 int kvm_arm_pmu_v3_has_attr(struct kvm_vcpu *vcpu,
bb0c70bcca6ba3c8 Shannon Zhao 2016-01-11 56 struct kvm_device_attr *attr);
a2befacf50940017 Christoffer Dall 2017-05-02 57 int kvm_arm_pmu_v3_enable(struct kvm_vcpu *vcpu);
04fe472615d0216e Shannon Zhao 2015-09-11 58 #else
04fe472615d0216e Shannon Zhao 2015-09-11 59 struct kvm_pmu {
04fe472615d0216e Shannon Zhao 2015-09-11 60 };
ab9468340d2bcc2a Shannon Zhao 2015-06-18 61
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
drivers/vhost/vdpa.c:361:13: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5ee88057889bbca5f5bb96031b62b3756b33e164
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 5 months ago
config: sh-randconfig-s032-20210115 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
drivers/vhost/vdpa.c:361:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/vhost/vdpa.c:361:13: sparse: expected unsigned int const *__gu_addr
drivers/vhost/vdpa.c:361:13: sparse: got unsigned int [noderef] [usertype] __user *
>> drivers/vhost/vdpa.c:361:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/vhost/vdpa.c:361:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/vhost/vdpa.c:361:13: sparse: got unsigned int const *__gu_addr
--
drivers/net/ppp/pppoe.c:765:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/net/ppp/pppoe.c:765:21: sparse: expected int const *__gu_addr
drivers/net/ppp/pppoe.c:765:21: sparse: got int [noderef] __user *
>> drivers/net/ppp/pppoe.c:765:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/pppoe.c:765:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/pppoe.c:765:21: sparse: got int const *__gu_addr
drivers/net/ppp/pppoe.c:778:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/net/ppp/pppoe.c:778:21: sparse: expected int const *__gu_addr
drivers/net/ppp/pppoe.c:778:21: sparse: got int [noderef] __user *
drivers/net/ppp/pppoe.c:778:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/pppoe.c:778:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/pppoe.c:778:21: sparse: got int const *__gu_addr
--
drivers/net/ppp/ppp_generic.c:925:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:925:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:925:21: sparse: got int [noderef] __user *p
>> drivers/net/ppp/ppp_generic.c:925:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:925:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:925:21: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_generic.c:939:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:939:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:939:21: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_generic.c:939:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:939:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:939:21: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_generic.c:954:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:954:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:954:21: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_generic.c:954:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:954:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:954:21: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_generic.c:651:29: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:651:29: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:651:29: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_generic.c:651:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:651:29: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:651:29: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_generic.c:681:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:681:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:681:21: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_generic.c:681:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:681:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:681:21: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_generic.c:688:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:688:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:688:21: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_generic.c:688:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:688:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:688:21: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_generic.c:726:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:726:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:726:21: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_generic.c:726:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:726:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:726:21: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_generic.c:755:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:755:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:755:21: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_generic.c:755:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:755:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:755:21: sparse: got int const *__gu_addr
drivers/net/ppp/ppp_generic.c:823:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/net/ppp/ppp_generic.c:823:21: sparse: expected int const *__gu_addr
drivers/net/ppp/ppp_generic.c:823:21: sparse: got int [noderef] __user *p
drivers/net/ppp/ppp_generic.c:823:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/ppp_generic.c:823:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/ppp_generic.c:823:21: sparse: got int const *__gu_addr
--
net/atm/pppoatm.c:376:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
net/atm/pppoatm.c:376:24: sparse: expected int const *__gu_addr
net/atm/pppoatm.c:376:24: sparse: got int [noderef] __user *
>> net/atm/pppoatm.c:376:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/atm/pppoatm.c:376:24: sparse: expected void const volatile [noderef] __user *ptr
net/atm/pppoatm.c:376:24: sparse: got int const *__gu_addr
net/atm/pppoatm.c:453:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short const *__gu_addr @@ got unsigned short [noderef] [usertype] __user * @@
net/atm/pppoatm.c:453:21: sparse: expected unsigned short const *__gu_addr
net/atm/pppoatm.c:453:21: sparse: got unsigned short [noderef] [usertype] __user *
>> net/atm/pppoatm.c:453:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short const *__gu_addr @@
net/atm/pppoatm.c:453:21: sparse: expected void const volatile [noderef] __user *ptr
net/atm/pppoatm.c:453:21: sparse: got unsigned short const *__gu_addr
--
net/packet/af_packet.c:3942:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/packet/af_packet.c:3942:13: sparse: expected int const *__gu_addr
net/packet/af_packet.c:3942:13: sparse: got int [noderef] __user *optlen
>> net/packet/af_packet.c:3942:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/packet/af_packet.c:3942:13: sparse: expected void const volatile [noderef] __user *ptr
net/packet/af_packet.c:3942:13: sparse: got int const *__gu_addr
net/packet/af_packet.c:1008:13: sparse: sparse: context imbalance in '__packet_lookup_frame_in_block' - different lock contexts for basic block
net/packet/af_packet.c:2402:17: sparse: sparse: context imbalance in 'tpacket_rcv' - unexpected unlock
--
net/xdp/xsk.c:835:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/xdp/xsk.c:835:13: sparse: expected int const *__gu_addr
net/xdp/xsk.c:835:13: sparse: got int [noderef] __user *optlen
>> net/xdp/xsk.c:835:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/xdp/xsk.c:835:13: sparse: expected void const volatile [noderef] __user *ptr
net/xdp/xsk.c:835:13: sparse: got int const *__gu_addr
vim +361 drivers/vhost/vdpa.c
2cf1ba9a4d15cb78 Zhu Lingshan 2020-07-31 346
4c8cf31885f69e86 Tiwei Bie 2020-03-26 347 static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
4c8cf31885f69e86 Tiwei Bie 2020-03-26 348 void __user *argp)
4c8cf31885f69e86 Tiwei Bie 2020-03-26 349 {
4c8cf31885f69e86 Tiwei Bie 2020-03-26 350 struct vdpa_device *vdpa = v->vdpa;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 351 const struct vdpa_config_ops *ops = vdpa->config;
aac50c0bd434794b Eli Cohen 2020-08-04 352 struct vdpa_vq_state vq_state;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 353 struct vdpa_callback cb;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 354 struct vhost_virtqueue *vq;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 355 struct vhost_vring_state s;
653055b9acd45d60 Jason Wang 2020-08-04 356 u64 __user *featurep = argp;
653055b9acd45d60 Jason Wang 2020-08-04 357 u64 features;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 358 u32 idx;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 359 long r;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 360
4c8cf31885f69e86 Tiwei Bie 2020-03-26 @361 r = get_user(idx, (u32 __user *)argp);
4c8cf31885f69e86 Tiwei Bie 2020-03-26 362 if (r < 0)
4c8cf31885f69e86 Tiwei Bie 2020-03-26 363 return r;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 364
4c8cf31885f69e86 Tiwei Bie 2020-03-26 365 if (idx >= v->nvqs)
4c8cf31885f69e86 Tiwei Bie 2020-03-26 366 return -ENOBUFS;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 367
4c8cf31885f69e86 Tiwei Bie 2020-03-26 368 idx = array_index_nospec(idx, v->nvqs);
4c8cf31885f69e86 Tiwei Bie 2020-03-26 369 vq = &v->vqs[idx];
4c8cf31885f69e86 Tiwei Bie 2020-03-26 370
b0bd82bf729dbd05 Jason Wang 2020-08-04 371 switch (cmd) {
b0bd82bf729dbd05 Jason Wang 2020-08-04 372 case VHOST_VDPA_SET_VRING_ENABLE:
4c8cf31885f69e86 Tiwei Bie 2020-03-26 373 if (copy_from_user(&s, argp, sizeof(s)))
4c8cf31885f69e86 Tiwei Bie 2020-03-26 374 return -EFAULT;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 375 ops->set_vq_ready(vdpa, idx, s.num);
4c8cf31885f69e86 Tiwei Bie 2020-03-26 376 return 0;
b0bd82bf729dbd05 Jason Wang 2020-08-04 377 case VHOST_GET_VRING_BASE:
23750e39d57433d0 Eli Cohen 2020-08-04 378 r = ops->get_vq_state(v->vdpa, idx, &vq_state);
23750e39d57433d0 Eli Cohen 2020-08-04 379 if (r)
23750e39d57433d0 Eli Cohen 2020-08-04 380 return r;
23750e39d57433d0 Eli Cohen 2020-08-04 381
aac50c0bd434794b Eli Cohen 2020-08-04 382 vq->last_avail_idx = vq_state.avail_index;
b0bd82bf729dbd05 Jason Wang 2020-08-04 383 break;
653055b9acd45d60 Jason Wang 2020-08-04 384 case VHOST_GET_BACKEND_FEATURES:
653055b9acd45d60 Jason Wang 2020-08-04 385 features = VHOST_VDPA_BACKEND_FEATURES;
653055b9acd45d60 Jason Wang 2020-08-04 386 if (copy_to_user(featurep, &features, sizeof(features)))
653055b9acd45d60 Jason Wang 2020-08-04 387 return -EFAULT;
653055b9acd45d60 Jason Wang 2020-08-04 388 return 0;
653055b9acd45d60 Jason Wang 2020-08-04 389 case VHOST_SET_BACKEND_FEATURES:
653055b9acd45d60 Jason Wang 2020-08-04 390 if (copy_from_user(&features, featurep, sizeof(features)))
653055b9acd45d60 Jason Wang 2020-08-04 391 return -EFAULT;
653055b9acd45d60 Jason Wang 2020-08-04 392 if (features & ~VHOST_VDPA_BACKEND_FEATURES)
653055b9acd45d60 Jason Wang 2020-08-04 393 return -EOPNOTSUPP;
653055b9acd45d60 Jason Wang 2020-08-04 394 vhost_set_backend_features(&v->vdev, features);
653055b9acd45d60 Jason Wang 2020-08-04 395 return 0;
b0bd82bf729dbd05 Jason Wang 2020-08-04 396 }
4c8cf31885f69e86 Tiwei Bie 2020-03-26 397
4c8cf31885f69e86 Tiwei Bie 2020-03-26 398 r = vhost_vring_ioctl(&v->vdev, cmd, argp);
4c8cf31885f69e86 Tiwei Bie 2020-03-26 399 if (r)
4c8cf31885f69e86 Tiwei Bie 2020-03-26 400 return r;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 401
4c8cf31885f69e86 Tiwei Bie 2020-03-26 402 switch (cmd) {
4c8cf31885f69e86 Tiwei Bie 2020-03-26 403 case VHOST_SET_VRING_ADDR:
4c8cf31885f69e86 Tiwei Bie 2020-03-26 404 if (ops->set_vq_address(vdpa, idx,
4c8cf31885f69e86 Tiwei Bie 2020-03-26 405 (u64)(uintptr_t)vq->desc,
4c8cf31885f69e86 Tiwei Bie 2020-03-26 406 (u64)(uintptr_t)vq->avail,
4c8cf31885f69e86 Tiwei Bie 2020-03-26 407 (u64)(uintptr_t)vq->used))
4c8cf31885f69e86 Tiwei Bie 2020-03-26 408 r = -EINVAL;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 409 break;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 410
4c8cf31885f69e86 Tiwei Bie 2020-03-26 411 case VHOST_SET_VRING_BASE:
aac50c0bd434794b Eli Cohen 2020-08-04 412 vq_state.avail_index = vq->last_avail_idx;
aac50c0bd434794b Eli Cohen 2020-08-04 413 if (ops->set_vq_state(vdpa, idx, &vq_state))
4c8cf31885f69e86 Tiwei Bie 2020-03-26 414 r = -EINVAL;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 415 break;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 416
4c8cf31885f69e86 Tiwei Bie 2020-03-26 417 case VHOST_SET_VRING_CALL:
265a0ad8731dc04f Zhu Lingshan 2020-07-31 418 if (vq->call_ctx.ctx) {
4c8cf31885f69e86 Tiwei Bie 2020-03-26 419 cb.callback = vhost_vdpa_virtqueue_cb;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 420 cb.private = vq;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 421 } else {
4c8cf31885f69e86 Tiwei Bie 2020-03-26 422 cb.callback = NULL;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 423 cb.private = NULL;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 424 }
4c8cf31885f69e86 Tiwei Bie 2020-03-26 425 ops->set_vq_cb(vdpa, idx, &cb);
2cf1ba9a4d15cb78 Zhu Lingshan 2020-07-31 426 vhost_vdpa_setup_vq_irq(v, idx);
4c8cf31885f69e86 Tiwei Bie 2020-03-26 427 break;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 428
4c8cf31885f69e86 Tiwei Bie 2020-03-26 429 case VHOST_SET_VRING_NUM:
4c8cf31885f69e86 Tiwei Bie 2020-03-26 430 ops->set_vq_num(vdpa, idx, vq->num);
4c8cf31885f69e86 Tiwei Bie 2020-03-26 431 break;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 432 }
4c8cf31885f69e86 Tiwei Bie 2020-03-26 433
4c8cf31885f69e86 Tiwei Bie 2020-03-26 434 return r;
4c8cf31885f69e86 Tiwei Bie 2020-03-26 435 }
4c8cf31885f69e86 Tiwei Bie 2020-03-26 436
:::::: The code at line 361 was first introduced by commit
:::::: 4c8cf31885f69e86be0b5b9e6677a26797365e1d vhost: introduce vDPA-based backend
:::::: TO: Tiwei Bie <tiwei.bie(a)intel.com>
:::::: CC: Michael S. Tsirkin <mst(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
ld.lld: error: debug_core.c:(.text+0x1CFC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Peter Zijlstra <peterz(a)infradead.org>
CC: Frederic Weisbecker <frederic(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5ee88057889bbca5f5bb96031b62b3756b33e164
commit: 545b8c8df41f9ecbaf806332d4095bc4bc7c14e8 smp: Cleanup smp_call_function*()
date: 7 weeks ago
config: riscv-randconfig-r012-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 545b8c8df41f9ecbaf806332d4095bc4bc7c14e8
# 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(a)intel.com>
All errors (new ones prefixed by >>):
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0x1CFC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0x1D16): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0x1DB2): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0x1FDA): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0x20D8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x214A): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x2196): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0x21D0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x227E): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0x22A8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x2326): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.init.text+0xCC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.init.text+0x150): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months
[alaahl:netdev-next 265/280] drivers/net/dsa/mv88e6xxx/chip.c:5431:9: error: implicit declaration of function 'mv88e6xxx_g2_trunk_mapping_write'
by kernel test robot
tree: https://github.com/alaahl/linux.git netdev-next
head: 1d9f03c0a15fa01aa14fb295cbc1236403fceb0b
commit: 57e661aae6a823140787dbcc34d92e223e2f71c5 [265/280] net: dsa: mv88e6xxx: Link aggregation support
config: arm-randconfig-r002-20210115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/alaahl/linux/commit/57e661aae6a823140787dbcc34d92e223e...
git remote add alaahl https://github.com/alaahl/linux.git
git fetch --no-tags alaahl netdev-next
git checkout 57e661aae6a823140787dbcc34d92e223e2f71c5
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/dsa/mv88e6xxx/chip.c:5431:9: error: implicit declaration of function 'mv88e6xxx_g2_trunk_mapping_write' [-Werror,-Wimplicit-function-declaration]
return mv88e6xxx_g2_trunk_mapping_write(chip, id, map);
^
drivers/net/dsa/mv88e6xxx/chip.c:5431:9: note: did you mean 'mv88e6xxx_g2_device_mapping_write'?
drivers/net/dsa/mv88e6xxx/global2.h:528:19: note: 'mv88e6xxx_g2_device_mapping_write' declared here
static inline int mv88e6xxx_g2_device_mapping_write(struct mv88e6xxx_chip *chip,
^
>> drivers/net/dsa/mv88e6xxx/chip.c:5524:9: error: implicit declaration of function 'mv88e6xxx_g2_trunk_mask_write' [-Werror,-Wimplicit-function-declaration]
err = mv88e6xxx_g2_trunk_mask_write(chip, i, true, mask[i]);
^
2 errors generated.
vim +/mv88e6xxx_g2_trunk_mapping_write +5431 drivers/net/dsa/mv88e6xxx/chip.c
5414
5415 static int mv88e6xxx_lag_sync_map(struct dsa_switch *ds, struct net_device *lag)
5416 {
5417 struct mv88e6xxx_chip *chip = ds->priv;
5418 struct dsa_port *dp;
5419 u16 map = 0;
5420 int id;
5421
5422 id = dsa_lag_id(ds->dst, lag);
5423
5424 /* Build the map of all ports to distribute flows destined for
5425 * this LAG. This can be either a local user port, or a DSA
5426 * port if the LAG port is on a remote chip.
5427 */
5428 dsa_lag_foreach_port(dp, ds->dst, lag)
5429 map |= BIT(dsa_towards_port(ds, dp->ds->index, dp->index));
5430
> 5431 return mv88e6xxx_g2_trunk_mapping_write(chip, id, map);
5432 }
5433
5434 static const u8 mv88e6xxx_lag_mask_table[8][8] = {
5435 /* Row number corresponds to the number of active members in a
5436 * LAG. Each column states which of the eight hash buckets are
5437 * mapped to the column:th port in the LAG.
5438 *
5439 * Example: In a LAG with three active ports, the second port
5440 * ([2][1]) would be selected for traffic mapped to buckets
5441 * 3,4,5 (0x38).
5442 */
5443 { 0xff, 0, 0, 0, 0, 0, 0, 0 },
5444 { 0x0f, 0xf0, 0, 0, 0, 0, 0, 0 },
5445 { 0x07, 0x38, 0xc0, 0, 0, 0, 0, 0 },
5446 { 0x03, 0x0c, 0x30, 0xc0, 0, 0, 0, 0 },
5447 { 0x03, 0x0c, 0x30, 0x40, 0x80, 0, 0, 0 },
5448 { 0x03, 0x0c, 0x10, 0x20, 0x40, 0x80, 0, 0 },
5449 { 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0 },
5450 { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 },
5451 };
5452
5453 static void mv88e6xxx_lag_set_port_mask(u16 *mask, int port,
5454 int num_tx, int nth)
5455 {
5456 u8 active = 0;
5457 int i;
5458
5459 num_tx = num_tx <= 8 ? num_tx : 8;
5460 if (nth < num_tx)
5461 active = mv88e6xxx_lag_mask_table[num_tx - 1][nth];
5462
5463 for (i = 0; i < 8; i++) {
5464 if (BIT(i) & active)
5465 mask[i] |= BIT(port);
5466 }
5467 }
5468
5469 static int mv88e6xxx_lag_sync_masks(struct dsa_switch *ds)
5470 {
5471 struct mv88e6xxx_chip *chip = ds->priv;
5472 unsigned int id, num_tx;
5473 struct net_device *lag;
5474 struct dsa_port *dp;
5475 int i, err, nth;
5476 u16 mask[8];
5477 u16 ivec;
5478
5479 /* Assume no port is a member of any LAG. */
5480 ivec = BIT(mv88e6xxx_num_ports(chip)) - 1;
5481
5482 /* Disable all masks for ports that _are_ members of a LAG. */
5483 list_for_each_entry(dp, &ds->dst->ports, list) {
5484 if (!dp->lag_dev || dp->ds != ds)
5485 continue;
5486
5487 ivec &= ~BIT(dp->index);
5488 }
5489
5490 for (i = 0; i < 8; i++)
5491 mask[i] = ivec;
5492
5493 /* Enable the correct subset of masks for all LAG ports that
5494 * are in the Tx set.
5495 */
5496 dsa_lags_foreach_id(id, ds->dst) {
5497 lag = dsa_lag_dev(ds->dst, id);
5498 if (!lag)
5499 continue;
5500
5501 num_tx = 0;
5502 dsa_lag_foreach_port(dp, ds->dst, lag) {
5503 if (dp->lag_tx_enabled)
5504 num_tx++;
5505 }
5506
5507 if (!num_tx)
5508 continue;
5509
5510 nth = 0;
5511 dsa_lag_foreach_port(dp, ds->dst, lag) {
5512 if (!dp->lag_tx_enabled)
5513 continue;
5514
5515 if (dp->ds == ds)
5516 mv88e6xxx_lag_set_port_mask(mask, dp->index,
5517 num_tx, nth);
5518
5519 nth++;
5520 }
5521 }
5522
5523 for (i = 0; i < 8; i++) {
> 5524 err = mv88e6xxx_g2_trunk_mask_write(chip, i, true, mask[i]);
5525 if (err)
5526 return err;
5527 }
5528
5529 return 0;
5530 }
5531
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 8 months