[dhowells-fs:fscache-iter-2 58/69] fs/afs/write.c:27: undefined reference to `fscache_set_page_dirty'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter-2
head: 589298a2e3fbae71f425089da4afb5a0fd3f939f
commit: a1b4b13a5a0037d49005930b50d186d71e07d74b [58/69] afs: Copy local writes to the cache when writing to the server
config: x86_64-randconfig-m001-20210722 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-iter-2
git checkout a1b4b13a5a0037d49005930b50d186d71e07d74b
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 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 >>):
ld: fs/afs/write.o: in function `afs_set_page_dirty':
>> fs/afs/write.c:27: undefined reference to `fscache_set_page_dirty'
ld: fs/afs/write.o: in function `fscache_write_to_cache':
>> include/linux/fscache.h:557: undefined reference to `__fscache_write_to_cache'
ld: fs/afs/write.o: in function `fscache_clear_page_bits':
>> include/linux/fscache.h:547: undefined reference to `__fscache_clear_page_bits'
vim +27 fs/afs/write.c
17
18 static void afs_write_to_cache(struct afs_vnode *vnode, loff_t start, size_t len,
19 loff_t i_size);
20
21 /*
22 * Mark a page as having been made dirty and thus needing writeback. We also
23 * need to pin the cache object to write back to.
24 */
25 int afs_set_page_dirty(struct page *page)
26 {
> 27 return fscache_set_page_dirty(page, afs_vnode_cache(AFS_FS_I(page->mapping->host)));
28 }
29
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH net-next 2/3] flow_offload: add process to delete offloaded actions from net device
by kernel test robot
Hi Simon,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Simon-Horman/flow_offload-hardwa...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git c2255ff47768c94a0ebc3968f007928bb47ea43b
config: microblaze-randconfig-r011-20210722 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 10.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/a8e2d0acfc98c127ab0b5189f76350495...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Simon-Horman/flow_offload-hardware-offload-of-TC-actions/20210722-172229
git checkout a8e2d0acfc98c127ab0b5189f7635049515c43f3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=microblaze
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 >>):
>> net/sched/act_api.c:1063:5: warning: no previous prototype for 'tcf_action_offload_cmd_pre' [-Wmissing-prototypes]
1063 | int tcf_action_offload_cmd_pre(struct tc_action *actions[],
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/sched/act_api.c:1091:5: warning: no previous prototype for 'tcf_action_offload_cmd_post' [-Wmissing-prototypes]
1091 | int tcf_action_offload_cmd_post(struct flow_offload_action *fl_act,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
net/sched/act_api.c:1105:5: warning: no previous prototype for 'tcf_action_offload_cmd' [-Wmissing-prototypes]
1105 | int tcf_action_offload_cmd(struct tc_action *actions[],
| ^~~~~~~~~~~~~~~~~~~~~~
>> net/sched/act_api.c:1123:5: warning: no previous prototype for 'tcf_action_offload_del_post' [-Wmissing-prototypes]
1123 | int tcf_action_offload_del_post(struct flow_offload_action *fl_act,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/tcf_action_offload_cmd_pre +1063 net/sched/act_api.c
1062
> 1063 int tcf_action_offload_cmd_pre(struct tc_action *actions[],
1064 enum flow_act_command cmd,
1065 struct netlink_ext_ack *extack,
1066 struct flow_offload_action **fl_act)
1067 {
1068 struct flow_offload_action *fl_act_p;
1069 int err = 0;
1070
1071 fl_act_p = flow_action_alloc(tcf_act_num_actions(actions));
1072 if (!fl_act_p)
1073 return -ENOMEM;
1074
1075 fl_act_p->extack = extack;
1076 fl_act_p->command = cmd;
1077 err = tc_setup_action(&fl_act_p->action, actions);
1078 if (err) {
1079 NL_SET_ERR_MSG_MOD(extack,
1080 "Failed to setup tc actions for offload\n");
1081 goto err_out;
1082 }
1083 *fl_act = fl_act_p;
1084 return 0;
1085 err_out:
1086 kfree(fl_act_p);
1087 return err;
1088 }
1089 EXPORT_SYMBOL(tcf_action_offload_cmd_pre);
1090
> 1091 int tcf_action_offload_cmd_post(struct flow_offload_action *fl_act,
1092 struct netlink_ext_ack *extack)
1093 {
1094 if (IS_ERR(fl_act))
1095 return PTR_ERR(fl_act);
1096
1097 flow_indr_dev_setup_offload(NULL, NULL, TC_SETUP_ACT, fl_act, NULL, NULL);
1098
1099 tc_cleanup_flow_action(&fl_act->action);
1100 kfree(fl_act);
1101 return 0;
1102 }
1103
1104 /* offload the tc command after inserted */
1105 int tcf_action_offload_cmd(struct tc_action *actions[],
1106 struct netlink_ext_ack *extack)
1107 {
1108 struct flow_offload_action *fl_act;
1109 int err = 0;
1110
1111 err = tcf_action_offload_cmd_pre(actions,
1112 FLOW_ACT_REPLACE,
1113 extack,
1114 &fl_act);
1115 if (err)
1116 return err;
1117
1118 return tcf_action_offload_cmd_post(fl_act, extack);
1119 }
1120 EXPORT_SYMBOL(tcf_action_offload_cmd);
1121
1122 /* offload the tc command after deleted */
> 1123 int tcf_action_offload_del_post(struct flow_offload_action *fl_act,
1124 struct tc_action *actions[],
1125 struct netlink_ext_ack *extack,
1126 int fallback_num)
1127 {
1128 int fallback_entries = 0;
1129 struct tc_action *act;
1130 int total_entries = 0;
1131 int i;
1132
1133 if (!fl_act)
1134 return -EINVAL;
1135
1136 if (fallback_num) {
1137 /* for each the actions to fallback the action entries remain in the actions */
1138 for (i = 0; i < TCA_ACT_MAX_PRIO; i++) {
1139 act = actions[i];
1140 if (!act)
1141 continue;
1142
1143 fallback_entries += tcf_act_num_actions_single(act);
1144 }
1145 fallback_entries += fallback_num;
1146 }
1147 total_entries = fl_act->action.num_entries;
1148 if (total_entries > fallback_entries) {
1149 /* just offload the actions that is not fallback and start with the actions */
1150 fl_act->action.num_entries -= fallback_entries;
1151 flow_indr_dev_setup_offload(NULL, NULL, TC_SETUP_ACT, fl_act, NULL, NULL);
1152
1153 /* recovery num_entries for cleanup */
1154 fl_act->action.num_entries = total_entries;
1155 } else {
1156 NL_SET_ERR_MSG(extack, "no entries to offload when deleting the tc actions");
1157 }
1158
1159 tc_cleanup_flow_action(&fl_act->action);
1160
1161 kfree(fl_act);
1162 return 0;
1163 }
1164 EXPORT_SYMBOL(tcf_action_offload_del_post);
1165
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [RFC PATCH v1 4/4] ubifs: auth: consult encrypted and trusted keys if no logon key was found
by kernel test robot
Hi Ahmad,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 2734d6c1b1a089fb593ef6a23d4b70903526fe0c]
url: https://github.com/0day-ci/linux/commits/Ahmad-Fatoum/keys-introduce-key_...
base: 2734d6c1b1a089fb593ef6a23d4b70903526fe0c
config: alpha-randconfig-r011-20210722 (attached as .config)
compiler: alpha-linux-gcc (GCC) 10.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/1f09360d0a6ad6d739b7d5195e8c71516...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ahmad-Fatoum/keys-introduce-key_extract_material-helper/20210722-172029
git checkout 1f09360d0a6ad6d739b7d5195e8c71516d0c3381
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=alpha
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/ubifs/auth.c: In function 'ubifs_init_authentication':
>> fs/ubifs/auth.c:285:6: warning: ignoring return value of 'IS_ERR' declared with attribute 'warn_unused_result' [-Wunused-result]
285 | if (IS_ERR(keyring_key) && IS_REACHABLE(CONFIG_TRUSTED_KEYS))
| ^~~~~~~~~~~~~~~~~~~
vim +285 fs/ubifs/auth.c
251
252 /**
253 * ubifs_init_authentication - initialize UBIFS authentication support
254 * @c: UBIFS file-system description object
255 *
256 * This function returns 0 for success or a negative error code otherwise.
257 */
258 int ubifs_init_authentication(struct ubifs_info *c)
259 {
260 struct key *keyring_key;
261 int err;
262 unsigned int len;
263 char hmac_name[CRYPTO_MAX_ALG_NAME];
264 const void *key_material;
265
266 if (!c->auth_hash_name) {
267 ubifs_err(c, "authentication hash name needed with authentication");
268 return -EINVAL;
269 }
270
271 c->auth_hash_algo = match_string(hash_algo_name, HASH_ALGO__LAST,
272 c->auth_hash_name);
273 if ((int)c->auth_hash_algo < 0) {
274 ubifs_err(c, "Unknown hash algo %s specified",
275 c->auth_hash_name);
276 return -EINVAL;
277 }
278
279 snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)",
280 c->auth_hash_name);
281
282 keyring_key = request_key(&key_type_logon, c->auth_key_name, NULL);
283 if (IS_ERR(keyring_key) && IS_REACHABLE(CONFIG_ENCRYPTED_KEYS))
284 keyring_key = request_key(&key_type_encrypted, c->auth_key_name, NULL);
> 285 if (IS_ERR(keyring_key) && IS_REACHABLE(CONFIG_TRUSTED_KEYS))
286 keyring_key = request_key(&key_type_trusted, c->auth_key_name, NULL);
287
288 if (IS_ERR(keyring_key)) {
289 ubifs_err(c, "Failed to request key: %ld",
290 PTR_ERR(keyring_key));
291 return PTR_ERR(keyring_key);
292 }
293
294 down_read(&keyring_key->sem);
295
296 key_material = key_extract_material(keyring_key, &len);
297 err = PTR_ERR_OR_ZERO(key_material);
298 if (err < 0)
299 goto out;
300
301 c->hash_tfm = crypto_alloc_shash(c->auth_hash_name, 0, 0);
302 if (IS_ERR(c->hash_tfm)) {
303 err = PTR_ERR(c->hash_tfm);
304 ubifs_err(c, "Can not allocate %s: %d",
305 c->auth_hash_name, err);
306 goto out;
307 }
308
309 c->hash_len = crypto_shash_digestsize(c->hash_tfm);
310 if (c->hash_len > UBIFS_HASH_ARR_SZ) {
311 ubifs_err(c, "hash %s is bigger than maximum allowed hash size (%d > %d)",
312 c->auth_hash_name, c->hash_len, UBIFS_HASH_ARR_SZ);
313 err = -EINVAL;
314 goto out_free_hash;
315 }
316
317 c->hmac_tfm = crypto_alloc_shash(hmac_name, 0, 0);
318 if (IS_ERR(c->hmac_tfm)) {
319 err = PTR_ERR(c->hmac_tfm);
320 ubifs_err(c, "Can not allocate %s: %d", hmac_name, err);
321 goto out_free_hash;
322 }
323
324 c->hmac_desc_len = crypto_shash_digestsize(c->hmac_tfm);
325 if (c->hmac_desc_len > UBIFS_HMAC_ARR_SZ) {
326 ubifs_err(c, "hmac %s is bigger than maximum allowed hmac size (%d > %d)",
327 hmac_name, c->hmac_desc_len, UBIFS_HMAC_ARR_SZ);
328 err = -EINVAL;
329 goto out_free_hmac;
330 }
331
332 err = crypto_shash_setkey(c->hmac_tfm, key_material, len);
333 if (err)
334 goto out_free_hmac;
335
336 c->authenticated = true;
337
338 c->log_hash = ubifs_hash_get_desc(c);
339 if (IS_ERR(c->log_hash)) {
340 err = PTR_ERR(c->log_hash);
341 goto out_free_hmac;
342 }
343
344 err = 0;
345
346 out_free_hmac:
347 if (err)
348 crypto_free_shash(c->hmac_tfm);
349 out_free_hash:
350 if (err)
351 crypto_free_shash(c->hash_tfm);
352 out:
353 up_read(&keyring_key->sem);
354 key_put(keyring_key);
355
356 return err;
357 }
358
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [PATCH net-next 1/3] flow_offload: allow user to offload tc action to net device
by kernel test robot
Hi Simon,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Simon-Horman/flow_offload-hardwa...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git c2255ff47768c94a0ebc3968f007928bb47ea43b
config: microblaze-randconfig-r011-20210722 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 10.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/9228a8efdbf7a736354b87c0db3260dd7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Simon-Horman/flow_offload-hardware-offload-of-TC-actions/20210722-172229
git checkout 9228a8efdbf7a736354b87c0db3260dd7d2c4abd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=microblaze
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 >>):
>> net/sched/act_api.c:1064:5: warning: no previous prototype for 'tcf_action_offload_cmd' [-Wmissing-prototypes]
1064 | int tcf_action_offload_cmd(struct tc_action *actions[],
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/tcf_action_offload_cmd +1064 net/sched/act_api.c
1062
1063 /* offload the tc command after inserted */
> 1064 int tcf_action_offload_cmd(struct tc_action *actions[],
1065 struct netlink_ext_ack *extack)
1066 {
1067 struct flow_offload_action *fl_act;
1068 int err = 0;
1069
1070 fl_act = flow_action_alloc(tcf_act_num_actions(actions));
1071 if (!fl_act)
1072 return -ENOMEM;
1073
1074 fl_act->extack = extack;
1075 err = tc_setup_action(&fl_act->action, actions);
1076 if (err) {
1077 NL_SET_ERR_MSG_MOD(extack,
1078 "Failed to setup tc actions for offload\n");
1079 goto err_out;
1080 }
1081 fl_act->command = FLOW_ACT_REPLACE;
1082
1083 flow_indr_dev_setup_offload(NULL, NULL, TC_SETUP_ACT, fl_act, NULL, NULL);
1084
1085 tc_cleanup_flow_action(&fl_act->action);
1086
1087 err_out:
1088 kfree(fl_act);
1089 return err;
1090 }
1091 EXPORT_SYMBOL(tcf_action_offload_cmd);
1092
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
Re: [RFC PATCH 1/3] misc_cgroup: add support for nofile limit
by kernel test robot
Hi brookxu,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on cgroup/for-next]
[also build test ERROR on linux/master linus/master v5.14-rc2 next-20210722]
[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/brookxu/misc_cgroup-add-support-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
config: x86_64-randconfig-a003-20210722 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/5f2344b35ac15d834c4b76284f89f68c6...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review brookxu/misc_cgroup-add-support-for-nofile-limit/20210722-174033
git checkout 5f2344b35ac15d834c4b76284f89f68c68634638
# 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>
All errors (new ones prefixed by >>):
fs/file_table.c: In function 'file_free':
>> fs/file_table.c:58:29: error: implicit declaration of function 'css_misc' [-Werror=implicit-function-declaration]
58 | struct misc_cg *misc_cg = css_misc(f->f_css);
| ^~~~~~~~
>> fs/file_table.c:58:39: error: 'struct file' has no member named 'f_css'
58 | struct misc_cg *misc_cg = css_misc(f->f_css);
| ^~
fs/file_table.c: In function 'alloc_empty_file':
fs/file_table.c:170:4: error: 'struct file' has no member named 'f_css'
170 | f->f_css = &misc_cg->css;
| ^~
>> fs/file_table.c:170:22: error: invalid use of undefined type 'struct misc_cg'
170 | f->f_css = &misc_cg->css;
| ^~
cc1: some warnings being treated as errors
vim +/css_misc +58 fs/file_table.c
53
54 static inline void file_free(struct file *f)
55 {
56 security_file_free(f);
57 if (!(f->f_mode & FMODE_NOACCOUNT)) {
> 58 struct misc_cg *misc_cg = css_misc(f->f_css);
59
60 misc_cg_uncharge(MISC_CG_RES_NOFILE, misc_cg, 1);
61 put_misc_cg(misc_cg);
62
63 percpu_counter_dec(&nr_files);
64 }
65 call_rcu(&f->f_u.fu_rcuhead, file_free_rcu);
66 }
67
68 /*
69 * Return the total number of open files in the system
70 */
71 static long get_nr_files(void)
72 {
73 return percpu_counter_read_positive(&nr_files);
74 }
75
76 /*
77 * Return the maximum number of open files in the system
78 */
79 unsigned long get_max_files(void)
80 {
81 return files_stat.max_files;
82 }
83 EXPORT_SYMBOL_GPL(get_max_files);
84
85 /*
86 * Handle nr_files sysctl
87 */
88 #if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
89 int proc_nr_files(struct ctl_table *table, int write,
90 void *buffer, size_t *lenp, loff_t *ppos)
91 {
92 files_stat.nr_files = get_nr_files();
93 return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
94 }
95 #else
96 int proc_nr_files(struct ctl_table *table, int write,
97 void *buffer, size_t *lenp, loff_t *ppos)
98 {
99 return -ENOSYS;
100 }
101 #endif
102
103 static struct file *__alloc_file(int flags, const struct cred *cred)
104 {
105 struct file *f;
106 int error;
107
108 f = kmem_cache_zalloc(filp_cachep, GFP_KERNEL);
109 if (unlikely(!f))
110 return ERR_PTR(-ENOMEM);
111
112 f->f_cred = get_cred(cred);
113 error = security_file_alloc(f);
114 if (unlikely(error)) {
115 file_free_rcu(&f->f_u.fu_rcuhead);
116 return ERR_PTR(error);
117 }
118
119 atomic_long_set(&f->f_count, 1);
120 rwlock_init(&f->f_owner.lock);
121 spin_lock_init(&f->f_lock);
122 mutex_init(&f->f_pos_lock);
123 f->f_flags = flags;
124 f->f_mode = OPEN_FMODE(flags);
125 /* f->f_version: 0 */
126
127 return f;
128 }
129
130 /* Find an unused file structure and return a pointer to it.
131 * Returns an error pointer if some error happend e.g. we over file
132 * structures limit, run out of memory or operation is not permitted.
133 *
134 * Be very careful using this. You are responsible for
135 * getting write access to any mount that you might assign
136 * to this filp, if it is opened for write. If this is not
137 * done, you will imbalance int the mount's writer count
138 * and a warning at __fput() time.
139 */
140 struct file *alloc_empty_file(int flags, const struct cred *cred)
141 {
142 static long old_max;
143 struct file *f;
144
145 /*
146 * Privileged users can go above max_files
147 */
148 if (get_nr_files() >= files_stat.max_files && !capable(CAP_SYS_ADMIN)) {
149 /*
150 * percpu_counters are inaccurate. Do an expensive check before
151 * we go and fail.
152 */
153 if (percpu_counter_sum_positive(&nr_files) >= files_stat.max_files)
154 goto over;
155 }
156
157 f = __alloc_file(flags, cred);
158 if (!IS_ERR(f)) {
159 struct misc_cg *misc_cg = get_current_misc_cg();
160 int ret;
161
162 ret = misc_cg_try_charge(MISC_CG_RES_NOFILE, misc_cg, 1);
163 if (ret < 0) {
164 put_misc_cg(misc_cg);
165 file_free(f);
166 goto out;
167 }
168
169 percpu_counter_inc(&nr_files);
> 170 f->f_css = &misc_cg->css;
171 }
172
173 return f;
174
175 over:
176 /* Ran out of filps - report that */
177 if (get_nr_files() > old_max) {
178 pr_info("VFS: file-max limit %lu reached\n", get_max_files());
179 old_max = get_nr_files();
180 }
181 out:
182 return ERR_PTR(-ENFILE);
183 }
184
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[asm-generic:asm-generic-uaccess-5 1/8] arch/um/kernel/skas/uaccess.c:246:17: error: 'src' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git asm-generic-uaccess-5
head: a8cdb21b715276b7638a636237489f2425c24180
commit: 3a68cb1dbf65aa5c86ae185e5c51c5c26c31a54a [1/8] asm-generic/uaccess.h: remove __strncpy_from_user/__strnlen_user
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/comm...
git remote add asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
git fetch --no-tags asm-generic asm-generic-uaccess-5
git checkout 3a68cb1dbf65aa5c86ae185e5c51c5c26c31a54a
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 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 >>):
In file included from arch/um/include/asm/uaccess.h:39,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/highmem.h:5,
from arch/um/kernel/skas/uaccess.c:7:
arch/um/kernel/skas/uaccess.c: In function 'strnlen_user':
>> arch/um/kernel/skas/uaccess.c:246:17: error: 'src' undeclared (first use in this function)
246 | if (!access_ok(src, 1))
| ^~~
include/asm-generic/uaccess.h:124:59: note: in definition of macro 'access_ok'
124 | #define access_ok(addr, size) __access_ok((unsigned long)(addr),(size))
| ^~~~
arch/um/kernel/skas/uaccess.c:246:17: note: each undeclared identifier is reported only once for each function it appears in
246 | if (!access_ok(src, 1))
| ^~~
include/asm-generic/uaccess.h:124:59: note: in definition of macro 'access_ok'
124 | #define access_ok(addr, size) __access_ok((unsigned long)(addr),(size))
| ^~~~
vim +/src +246 arch/um/kernel/skas/uaccess.c
241
242 long strnlen_user(const void __user *str, long len)
243 {
244 int count = 0, n;
245
> 246 if (!access_ok(src, 1))
247 return -EFAULT;
248
249 if (uaccess_kernel())
250 return strnlen((__force char*)str, len) + 1;
251
252 n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count);
253 if (n == 0)
254 return count + 1;
255 return 0;
256 }
257 EXPORT_SYMBOL(strnlen_user);
258
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months
[linux-next:master 1888/2932] drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:220:35: warning: variable 'hwvf' is uninitialized when used here
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7468cbf5c917ec48c66b0dd157b306f36345cab8
commit: 23109f8dd06d0bd04c9360cf7c501c97b0ab1545 [1888/2932] octeontx2-af: Introduce internal packet switching
config: riscv-randconfig-r012-20210722 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9625ca5b602616b2f5584e8a49ba93c52c141e40)
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/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 23109f8dd06d0bd04c9360cf7c501c97b0ab1545
# 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 warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:8:
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu.h:14:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:8:
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu.h:14:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:8:
In file included from drivers/net/ethernet/marvell/octeontx2/af/rvu.h:14:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:220:35: warning: variable 'hwvf' is uninitialized when used here [-Wuninitialized]
for (vf = 0; vf < numvfs; vf++, hwvf++) {
^~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:201:26: note: initialize the variable 'hwvf' to silence this warning
int pf, vf, numvfs, hwvf;
^
= 0
>> drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:220:21: warning: variable 'numvfs' is uninitialized when used here [-Wuninitialized]
for (vf = 0; vf < numvfs; vf++, hwvf++) {
^~~~~~
drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c:201:20: note: initialize the variable 'numvfs' to silence this warning
int pf, vf, numvfs, hwvf;
^
= 0
9 warnings generated.
vim +/hwvf +220 drivers/net/ethernet/marvell/octeontx2/af/rvu_switch.c
194
195 void rvu_switch_disable(struct rvu *rvu)
196 {
197 struct npc_delete_flow_req uninstall_req = { 0 };
198 struct npc_mcam_free_entry_req free_req = { 0 };
199 struct rvu_switch *rswitch = &rvu->rswitch;
200 struct rvu_hwinfo *hw = rvu->hw;
201 int pf, vf, numvfs, hwvf;
202 struct msg_rsp rsp;
203 u16 pcifunc;
204 int err;
205
206 if (!rswitch->used_entries)
207 return;
208
209 for (pf = 1; pf < hw->total_pfs; pf++) {
210 if (!is_pf_cgxmapped(rvu, pf))
211 continue;
212
213 pcifunc = pf << 10;
214 err = rvu_switch_install_rx_rule(rvu, pcifunc, 0xFFF);
215 if (err)
216 dev_err(rvu->dev,
217 "Reverting RX rule for PF%d failed(%d)\n",
218 pf, err);
219
> 220 for (vf = 0; vf < numvfs; vf++, hwvf++) {
221 pcifunc = pf << 10 | ((vf + 1) & 0x3FF);
222 err = rvu_switch_install_rx_rule(rvu, pcifunc, 0xFFF);
223 if (err)
224 dev_err(rvu->dev,
225 "Reverting RX rule for PF%dVF%d failed(%d)\n",
226 pf, vf, err);
227 }
228 }
229
230 uninstall_req.start = rswitch->start_entry;
231 uninstall_req.end = rswitch->start_entry + rswitch->used_entries - 1;
232 free_req.all = 1;
233 rvu_mbox_handler_npc_delete_flow(rvu, &uninstall_req, &rsp);
234 rvu_mbox_handler_npc_mcam_free_entry(rvu, &free_req, &rsp);
235 rswitch->used_entries = 0;
236 kfree(rswitch->entry2pcifunc);
237 }
238
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 2 months