[ammarfaizi2-block:dhowells/linux-fs/netfs-maple 36/43] fs/netfs/crypto.c:76:10: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *'))
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple
head: d40df0841e9f8de3713a19dd3f0ba283c860cb93
commit: dcba644aa7bbb5bfb44d4a5c3abd187c51544bcd [36/43] netfs: Perform content encryption
config: riscv-randconfig-r033-20220214 (https://download.01.org/0day-ci/archive/20220216/202202160929.hhL3XUja-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 37f422f4ac31c8b8041c6b62065263314282dab6)
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/ammarfaizi2/linux-block/commit/dcba644aa7bbb5bfb44d4a5...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple
git checkout dcba644aa7bbb5bfb44d4a5c3abd187c51544bcd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash fs/netfs/
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 >>):
>> fs/netfs/crypto.c:76:10: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << (12)) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
seg = min(len, PAGE_SIZE - offset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +76 fs/netfs/crypto.c
45
46 /*
47 * Populate a scatterlist from folios in an xarray.
48 */
49 static int netfs_xarray_to_sglist(struct xarray *xa, loff_t pos, size_t len,
50 struct scatterlist *sg, unsigned int n_sg)
51 {
52 struct scatterlist *p = sg;
53 struct folio *folio = NULL;
54 size_t seg, offset, skip = 0;
55 loff_t start = pos;
56 pgoff_t index = start >> PAGE_SHIFT;
57 int j;
58
59 XA_STATE(xas, xa, index);
60
61 sg_init_table(sg, n_sg);
62
63 rcu_read_lock();
64
65 xas_for_each(&xas, folio, ULONG_MAX) {
66 if (xas_retry(&xas, folio))
67 continue;
68 if (WARN_ON(xa_is_value(folio)) || WARN_ON(folio_test_hugetlb(folio)))
69 break;
70 for (j = (folio_index(folio) < index) ? index - folio_index(folio) : 0;
71 j < folio_nr_pages(folio); j++
72 ) {
73 struct page *subpage = folio_file_page(folio, j);
74
75 offset = (pos + skip) & ~PAGE_MASK;
> 76 seg = min(len, PAGE_SIZE - offset);
77
78 sg_set_page(p++, subpage, seg, offset);
79
80 len -= seg;
81 skip += seg;
82 if (len == 0)
83 break;
84 }
85 if (len == 0)
86 break;
87 }
88
89 rcu_read_unlock();
90 if (len > 0) {
91 kdebug("*** Insufficient source (%zx)", len);
92 //WARN_ON(len > 0);
93 return -EIO;
94 }
95
96 sg_mark_end(p - 1);
97 return p - sg;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[ammarfaizi2-block:dhowells/linux-fs/netfs-maple 34/43] flush.c:(.text.netfs_flush_get_pages+0x3dc): undefined reference to `xa_store_range'
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple
head: d40df0841e9f8de3713a19dd3f0ba283c860cb93
commit: 4cfd40116179da8d60f57d8e8c0d19a7514bcc66 [34/43] netfs: Generate a buffered writeback from ->writepages()
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220216/202202160912.wh8FxSIx-lk...)
compiler: mips-linux-gcc (GCC) 11.2.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/ammarfaizi2/linux-block/commit/4cfd40116179da8d60f57d8...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple
git checkout 4cfd40116179da8d60f57d8e8c0d19a7514bcc66
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash
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 >>):
arch/mips/kernel/head.o: in function `kernel_entry':
(.ref.text+0xac): relocation truncated to fit: R_MIPS_26 against `start_kernel'
init/main.o: in function `set_reset_devices':
main.c:(.init.text+0x20): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0x30): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
init/main.o: in function `debug_kernel':
main.c:(.init.text+0xa4): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0xb4): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
init/main.o: in function `quiet_kernel':
main.c:(.init.text+0x128): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0x138): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
init/main.o: in function `warn_bootconfig':
main.c:(.init.text+0x1ac): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0x1bc): relocation truncated to fit: R_MIPS_26 against `__sanitizer_cov_trace_pc'
init/main.o: in function `init_setup':
main.c:(.init.text+0x238): relocation truncated to fit: R_MIPS_26 against `_mcount'
main.c:(.init.text+0x258): additional relocation overflows omitted from the output
mips-linux-ld: fs/netfs/flush.o: in function `netfs_flush_get_pages':
>> flush.c:(.text.netfs_flush_get_pages+0x3dc): undefined reference to `xa_store_range'
>> mips-linux-ld: flush.c:(.text.netfs_flush_get_pages+0x614): undefined reference to `xa_store_range'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[ammarfaizi2-block:dhowells/linux-fs/netfs-maple 36/43] fs/netfs/crypto.c:76:10: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12) - offset) *' (aka 'unsigned long *'))
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/netfs-maple
head: d40df0841e9f8de3713a19dd3f0ba283c860cb93
commit: dcba644aa7bbb5bfb44d4a5c3abd187c51544bcd [36/43] netfs: Perform content encryption
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220216/202202160859.rLKL6wYG-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 37f422f4ac31c8b8041c6b62065263314282dab6)
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/ammarfaizi2/linux-block/commit/dcba644aa7bbb5bfb44d4a5...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/netfs-maple
git checkout dcba644aa7bbb5bfb44d4a5c3abd187c51544bcd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/netfs/
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 >>):
>> fs/netfs/crypto.c:76:10: warning: comparison of distinct pointer types ('typeof (len) *' (aka 'unsigned int *') and 'typeof (((1UL) << 12) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
seg = min(len, PAGE_SIZE - offset);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:45:19: note: expanded from macro 'min'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~~~~~~~
include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp'
(__typecheck(x, y) && __no_side_effects(x, y))
^~~~~~~~~~~~~~~~~
include/linux/minmax.h:20:28: note: expanded from macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~
1 warning generated.
vim +76 fs/netfs/crypto.c
45
46 /*
47 * Populate a scatterlist from folios in an xarray.
48 */
49 static int netfs_xarray_to_sglist(struct xarray *xa, loff_t pos, size_t len,
50 struct scatterlist *sg, unsigned int n_sg)
51 {
52 struct scatterlist *p = sg;
53 struct folio *folio = NULL;
54 size_t seg, offset, skip = 0;
55 loff_t start = pos;
56 pgoff_t index = start >> PAGE_SHIFT;
57 int j;
58
59 XA_STATE(xas, xa, index);
60
61 sg_init_table(sg, n_sg);
62
63 rcu_read_lock();
64
65 xas_for_each(&xas, folio, ULONG_MAX) {
66 if (xas_retry(&xas, folio))
67 continue;
68 if (WARN_ON(xa_is_value(folio)) || WARN_ON(folio_test_hugetlb(folio)))
69 break;
70 for (j = (folio_index(folio) < index) ? index - folio_index(folio) : 0;
71 j < folio_nr_pages(folio); j++
72 ) {
73 struct page *subpage = folio_file_page(folio, j);
74
75 offset = (pos + skip) & ~PAGE_MASK;
> 76 seg = min(len, PAGE_SIZE - offset);
77
78 sg_set_page(p++, subpage, seg, offset);
79
80 len -= seg;
81 skip += seg;
82 if (len == 0)
83 break;
84 }
85 if (len == 0)
86 break;
87 }
88
89 rcu_read_unlock();
90 if (len > 0) {
91 kdebug("*** Insufficient source (%zx)", len);
92 //WARN_ON(len > 0);
93 return -EIO;
94 }
95
96 sg_mark_end(p - 1);
97 return p - sg;
98 }
99
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months
[gustavoars:for-next/kspp-fam0-uapi 1/1] ./usr/include/linux/netfilter/x_tables.h:66:25: warning: field 'target' with variable sized type 'struct xt_entry_target' not at the end of a struct or class is a GNU extension
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git for-next/kspp-fam0-uapi
head: d2d045d04ce9d694796e30ae6f8362d2788003a5
commit: d2d045d04ce9d694796e30ae6f8362d2788003a5 [1/1] treewide: uapi: Replace zero-length arrays with flexible-array members
config: i386-randconfig-a002-20220214 (https://download.01.org/0day-ci/archive/20220216/202202160827.ultVqzuo-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 37f422f4ac31c8b8041c6b62065263314282dab6)
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://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/comm...
git remote add gustavoars https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git
git fetch --no-tags gustavoars for-next/kspp-fam0-uapi
git checkout d2d045d04ce9d694796e30ae6f8362d2788003a5
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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 <built-in>:1:
>> ./usr/include/linux/netfilter/x_tables.h:66:25: warning: field 'target' with variable sized type 'struct xt_entry_target' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct xt_entry_target target;
^
./usr/include/linux/netfilter/x_tables.h:71:25: warning: field 'target' with variable sized type 'struct xt_entry_target' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct xt_entry_target target;
^
2 warnings generated.
--
In file included from <built-in>:1:
In file included from ./usr/include/linux/smc_diag.h:7:
>> ./usr/include/rdma/ib_user_verbs.h:436:34: warning: field 'base' with variable sized type 'struct ib_uverbs_create_cq_resp' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct ib_uverbs_create_cq_resp base;
^
>> ./usr/include/rdma/ib_user_verbs.h:644:34: warning: field 'base' with variable sized type 'struct ib_uverbs_create_qp_resp' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct ib_uverbs_create_qp_resp base;
^
>> ./usr/include/rdma/ib_user_verbs.h:740:29: warning: field 'base' with variable sized type 'struct ib_uverbs_modify_qp' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct ib_uverbs_modify_qp base;
^
>> ./usr/include/rdma/ib_user_verbs.h:916:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_eth::(anonymous at ./usr/include/rdma/ib_user_verbs.h:916:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:938:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_ipv4::(anonymous at ./usr/include/rdma/ib_user_verbs.h:938:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:956:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_tcp_udp::(anonymous at ./usr/include/rdma/ib_user_verbs.h:956:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:979:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_ipv6::(anonymous at ./usr/include/rdma/ib_user_verbs.h:979:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:992:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_action_tag::(anonymous at ./usr/include/rdma/ib_user_verbs.h:992:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:1016:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_action_handle::(anonymous at ./usr/include/rdma/ib_user_verbs.h:1016:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:1029:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_action_count::(anonymous at ./usr/include/rdma/ib_user_verbs.h:1029:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:1046:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_tunnel::(anonymous at ./usr/include/rdma/ib_user_verbs.h:1046:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:1064:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_esp::(anonymous at ./usr/include/rdma/ib_user_verbs.h:1064:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:1091:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_gre::(anonymous at ./usr/include/rdma/ib_user_verbs.h:1091:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
>> ./usr/include/rdma/ib_user_verbs.h:1114:2: warning: field '' with variable sized type 'union ib_uverbs_flow_spec_mpls::(anonymous at ./usr/include/rdma/ib_user_verbs.h:1114:2)' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
union {
^
14 warnings generated.
--
In file included from <built-in>:1:
In file included from ./usr/include/linux/netfilter_ipv6/ip6_tables.h:24:
>> ./usr/include/linux/netfilter/x_tables.h:66:25: warning: field 'target' with variable sized type 'struct xt_entry_target' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct xt_entry_target target;
^
./usr/include/linux/netfilter/x_tables.h:71:25: warning: field 'target' with variable sized type 'struct xt_entry_target' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct xt_entry_target target;
^
In file included from <built-in>:1:
>> ./usr/include/linux/netfilter_ipv6/ip6_tables.h:131:20: warning: field 'entry' with variable sized type 'struct ip6t_entry' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct ip6t_entry entry;
^
./usr/include/linux/netfilter_ipv6/ip6_tables.h:136:20: warning: field 'entry' with variable sized type 'struct ip6t_entry' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct ip6t_entry entry;
^
4 warnings generated.
--
In file included from <built-in>:1:
>> ./usr/include/linux/seg6_hmac.h:12:17: warning: field 'tlvhdr' with variable sized type 'struct sr6_tlv' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
struct sr6_tlv tlvhdr;
^
1 warning generated.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months