[bigeasy-staging:seqcount 9/10] net/core/gen_stats.c:121:11: error: assigning to 'u64_stats_t' from incompatible type 'int'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/staging.git seqcount
head: 53a2ea564d8a37a032c879a9e9bfa88b8e0e5ecd
commit: 2ed461d3554b6c9a468ee601dfc1152faac92408 [9/10] net: sched: Merge Qdisc::bstats and Qdisc::cpu_bstats data types
config: hexagon-randconfig-r041-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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/bigeasy/staging.git/commi...
git remote add bigeasy-staging https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/staging.git
git fetch --no-tags bigeasy-staging seqcount
git checkout 2ed461d3554b6c9a468ee601dfc1152faac92408
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash net/core/
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 >>):
>> net/core/gen_stats.c:121:11: error: assigning to 'u64_stats_t' from incompatible type 'int'
b->bytes = 0;
^ ~
net/core/gen_stats.c:122:13: error: assigning to 'u64_stats_t' from incompatible type 'int'
b->packets = 0;
^ ~
2 errors generated.
vim +121 net/core/gen_stats.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 116
34165a95d97fbc Ahmed S. Darwish 2021-09-17 117 #ifdef CONFIG_LOCKDEP
34165a95d97fbc Ahmed S. Darwish 2021-09-17 118 /* Must not be inlined, due to u64_stats seqcount_t lockdep key */
2ed461d3554b6c Ahmed S. Darwish 2021-09-17 119 void gnet_stats_basic_sync_init(struct gnet_stats_basic_sync *b)
34165a95d97fbc Ahmed S. Darwish 2021-09-17 120 {
34165a95d97fbc Ahmed S. Darwish 2021-09-17 @121 b->bytes = 0;
34165a95d97fbc Ahmed S. Darwish 2021-09-17 122 b->packets = 0;
34165a95d97fbc Ahmed S. Darwish 2021-09-17 123 u64_stats_init(&b->syncp);
34165a95d97fbc Ahmed S. Darwish 2021-09-17 124 }
2ed461d3554b6c Ahmed S. Darwish 2021-09-17 125 EXPORT_SYMBOL(gnet_stats_basic_sync_init);
34165a95d97fbc Ahmed S. Darwish 2021-09-17 126 #endif
34165a95d97fbc Ahmed S. Darwish 2021-09-17 127
:::::: The code at line 121 was first introduced by commit
:::::: 34165a95d97fbc4acdb090de432bdda12dfdbed9 net: sched: Protect Qdisc::bstats with u64_stats
:::::: TO: Ahmed S. Darwish <a.darwish(a)linutronix.de>
:::::: CC: Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[kdave-btrfs-devel:for-next 138/150] fs/btrfs/volumes.c:2334: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
by kernel test robot
tree: https://github.com/kdave/btrfs-devel.git for-next
head: 00c9626f46bece739cb413d1399ead6473809c54
commit: ea57e6e833a234ebe22efbb68e31c252f2478d15 [138/150] btrfs: add a btrfs_get_dev_args_from_path helper
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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/kdave/btrfs-devel/commit/ea57e6e833a234ebe22efbb68e31c...
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel for-next
git checkout ea57e6e833a234ebe22efbb68e31c252f2478d15
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 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 >>):
>> fs/btrfs/volumes.c:2334: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Populate args from device at path
vim +2334 fs/btrfs/volumes.c
2332
2333 /**
> 2334 * Populate args from device at path
2335 *
2336 * @fs_info: the filesystem
2337 * @args: the args to populate
2338 * @path: the path to the device
2339 *
2340 * This will read the super block of the device at @path and populate @args with
2341 * the devid, fsid, and uuid. This is meant to be used for ioctls that need to
2342 * lookup a device to operate on, but need to do it before we take any locks.
2343 * This properly handles the special case of "missing" that a user may pass in,
2344 * and does some basic sanity checks. The caller must make sure that @path is
2345 * properly NUL terminated before calling in, and must call
2346 * btrfs_put_dev_args_from_path() in order to free up the temporary fsid and
2347 * uuid buffers.
2348 *
2349 * Return: 0 for success, -errno for failure
2350 */
2351 int btrfs_get_dev_args_from_path(struct btrfs_fs_info *fs_info,
2352 struct btrfs_dev_lookup_args *args,
2353 const char *path)
2354 {
2355 struct btrfs_super_block *disk_super;
2356 struct block_device *bdev;
2357 int ret;
2358
2359 if (!path || !path[0])
2360 return -EINVAL;
2361 if (!strcmp(path, "missing")) {
2362 args->missing = true;
2363 return 0;
2364 }
2365
2366 args->uuid = kzalloc(BTRFS_UUID_SIZE, GFP_KERNEL);
2367 args->fsid = kzalloc(BTRFS_FSID_SIZE, GFP_KERNEL);
2368 if (!args->uuid || !args->fsid) {
2369 btrfs_put_dev_args_from_path(args);
2370 return -ENOMEM;
2371 }
2372
2373 ret = btrfs_get_bdev_and_sb(path, FMODE_READ, fs_info->bdev_holder, 0,
2374 &bdev, &disk_super);
2375 if (ret)
2376 return ret;
2377 args->devid = btrfs_stack_device_id(&disk_super->dev_item);
2378 memcpy(args->uuid, disk_super->dev_item.uuid, BTRFS_UUID_SIZE);
2379 if (btrfs_fs_incompat(fs_info, METADATA_UUID))
2380 memcpy(args->fsid, disk_super->metadata_uuid, BTRFS_FSID_SIZE);
2381 else
2382 memcpy(args->fsid, disk_super->fsid, BTRFS_FSID_SIZE);
2383 btrfs_release_disk_super(disk_super);
2384 blkdev_put(bdev, FMODE_READ);
2385 return 0;
2386 }
2387
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH v3 3/3] virt: Add efi_secret module to expose confidential computing secrets
by kernel test robot
Hi Dov,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 60a9483534ed0d99090a2ee1d4bb0b8179195f51]
url: https://github.com/0day-ci/linux/commits/Dov-Murik/Allow-guest-access-to-...
base: 60a9483534ed0d99090a2ee1d4bb0b8179195f51
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-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/0day-ci/linux/commit/666035eb88583c145049b34282634d7ba...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dov-Murik/Allow-guest-access-to-EFI-confidential-computing-secret-area/20211014-211522
git checkout 666035eb88583c145049b34282634d7ba716dc12
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 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 >>):
drivers/virt/coco/efi_secret/efi_secret.c: In function 'wipe_memory':
>> drivers/virt/coco/efi_secret/efi_secret.c:117:9: error: implicit declaration of function 'clflush_cache_range'; did you mean 'flush_cache_range'? [-Werror=implicit-function-declaration]
117 | clflush_cache_range(addr, size);
| ^~~~~~~~~~~~~~~~~~~
| flush_cache_range
cc1: all warnings being treated as errors
vim +117 drivers/virt/coco/efi_secret/efi_secret.c
109
110 /*
111 * Overwrite memory content with zeroes, and ensure that dirty cache lines are
112 * actually written back to memory, to clear out the secret.
113 */
114 static void wipe_memory(void *addr, size_t size)
115 {
116 memzero_explicit(addr, size);
> 117 clflush_cache_range(addr, size);
118 }
119
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[jimc:dd-drm-next 14/20] lib/dynamic_debug.c:1272:33: error: cast from pointer to integer of different size
by kernel test robot
tree: https://github.com/jimc/linux.git dd-drm-next
head: 2eec9300d730ad634b967a853579f0b5dffecc01
commit: 8819a72010473e6a18e27cb4a464fb921b1afbc0 [14/20] dyndbg: add print-to-tracefs, selftest with it - RFC
config: arm-buildonly-randconfig-r005-20211014 (attached as .config)
compiler: arm-linux-gnueabi-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/jimc/linux/commit/8819a72010473e6a18e27cb4a464fb921b1a...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 8819a72010473e6a18e27cb4a464fb921b1afbc0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 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 >>):
lib/dynamic_debug.c: In function 'ddebug_tracer_find':
>> lib/dynamic_debug.c:1272:33: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
1272 | if (trc->key == (u64)modname)
| ^
In file included from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'ddebug_tracer_add':
lib/dynamic_debug.c:1308:62: error: invalid use of undefined type 'struct module'
1308 | pr_warn("tracer-fn already set for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:499:9: note: in expansion of macro 'printk'
499 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:1308:17: note: in expansion of macro 'pr_warn'
1308 | pr_warn("tracer-fn already set for %s\n", mod->name);
| ^~~~~~~
lib/dynamic_debug.c:1316:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
1316 | trc->key = (u64)dt->ddebugs[0].modname;
| ^
In file included from include/linux/netdevice.h:49,
from lib/dynamic_debug.c:38:
lib/dynamic_debug.c:1317:56: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hashtable.h:32:17: note: in definition of macro 'hash_min'
32 | (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits))
| ^~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
lib/dynamic_debug.c:1317:56: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hashtable.h:32:37: note: in definition of macro 'hash_min'
32 | (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits))
| ^~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
In file included from include/linux/stringhash.h:7,
from include/linux/dcache.h:15,
from include/linux/fs.h:8,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:727,
from include/linux/kallsyms.h:13,
from lib/dynamic_debug.c:19:
lib/dynamic_debug.c:1317:56: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hash.h:16:38: note: in definition of macro 'hash_long'
16 | #define hash_long(val, bits) hash_32(val, bits)
| ^~~
include/linux/hashtable.h:61:41: note: in expansion of macro 'hash_min'
61 | hlist_add_head(node, &hashtable[hash_min(key, HASH_BITS(hashtable))])
| ^~~~~~~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
In file included from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'ddebug_tracer_del':
lib/dynamic_debug.c:1331:65: error: invalid use of undefined type 'struct module'
1331 | pr_warn("delete: cant find tracer for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:499:9: note: in expansion of macro 'printk'
499 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:1331:17: note: in expansion of macro 'pr_warn'
1331 | pr_warn("delete: cant find tracer for %s\n", mod->name);
| ^~~~~~~
lib/dynamic_debug.c:1335:48: error: invalid use of undefined type 'struct module'
1335 | vpr_info("deleted tracer for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:519:9: note: in expansion of macro 'printk'
519 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:132:17: note: in expansion of macro 'pr_info'
132 | pr_info(fmt, ##__VA_ARGS__); \
| ^~~~~~~
lib/dynamic_debug.c:135:33: note: in expansion of macro 'vnpr_info'
135 | #define vpr_info(fmt, ...) vnpr_info(1, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
lib/dynamic_debug.c:1335:9: note: in expansion of macro 'vpr_info'
1335 | vpr_info("deleted tracer for %s\n", mod->name);
| ^~~~~~~~
lib/dynamic_debug.c: In function '__dynamic_debug_tracer_action':
lib/dynamic_debug.c:1355:24: error: invalid use of undefined type 'struct module'
1355 | if (mod->name == dt->mod_name) {
| ^~
lib/dynamic_debug.c:1359:32: error: invalid use of undefined type 'struct module'
1359 | if (!strcmp(mod->name, dt->mod_name)) {
| ^~
In file included from include/linux/kernel.h:19,
vim +1272 lib/dynamic_debug.c
1266
1267 static struct ddebug_tracer *ddebug_tracer_find(const char *modname)
1268 {
1269 struct ddebug_tracer *trc;
1270
1271 hash_for_each_possible(ddebug_tracer_by_module, trc, hnode, (unsigned long)modname)
> 1272 if (trc->key == (u64)modname)
1273 return trc;
1274
1275 return NULL;
1276 }
1277
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH] drm/msm/dp: Use the connector passed to dp_debug_get()
by kernel test robot
Hi Bjorn,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.15-rc5 next-20211013]
[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/Bjorn-Andersson/drm-msm-dp-Use-t...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7fd2bf83d59a2d32e0d596c5d3e623b9a0e7e2d5
config: arm-qcom_defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/0day-ci/linux/commit/e591869849ae9c71d7db25e6b0df588a3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bjorn-Andersson/drm-msm-dp-Use-the-connector-passed-to-dp_debug_get/20211010-110400
git checkout e591869849ae9c71d7db25e6b0df588a31ca76cf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 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/gpu/drm/msm/dp/dp_display.c: In function 'msm_dp_debugfs_init':
>> drivers/gpu/drm/msm/dp/dp_display.c:1432:65: error: passing argument 5 of 'dp_debug_get' from incompatible pointer type [-Werror=incompatible-pointer-types]
1432 | dp->link, dp->dp_display.connector,
| ~~~~~~~~~~~~~~^~~~~~~~~~
| |
| struct drm_connector *
In file included from drivers/gpu/drm/msm/dp/dp_display.c:28:
drivers/gpu/drm/msm/dp/dp_debug.h:63:40: note: expected 'struct drm_connector **' but argument is of type 'struct drm_connector *'
63 | struct drm_connector **connector, struct drm_minor *minor)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
cc1: some warnings being treated as errors
vim +/dp_debug_get +1432 drivers/gpu/drm/msm/dp/dp_display.c
1421
1422 void msm_dp_debugfs_init(struct msm_dp *dp_display, struct drm_minor *minor)
1423 {
1424 struct dp_display_private *dp;
1425 struct device *dev;
1426 int rc;
1427
1428 dp = container_of(dp_display, struct dp_display_private, dp_display);
1429 dev = &dp->pdev->dev;
1430
1431 dp->debug = dp_debug_get(dev, dp->panel, dp->usbpd,
> 1432 dp->link, dp->dp_display.connector,
1433 minor);
1434 if (IS_ERR(dp->debug)) {
1435 rc = PTR_ERR(dp->debug);
1436 DRM_ERROR("failed to initialize debug, rc = %d\n", rc);
1437 dp->debug = NULL;
1438 }
1439 }
1440
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH RFC nf-next 6/9] netfilter: add bpf base hook program generator
by kernel test robot
Hi Florian,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on nf-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-bpf-b...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: openrisc-buildonly-randconfig-r004-20211014 (attached as .config)
compiler: or1k-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/0day-ci/linux/commit/2d7f7c3f2aa0c1933f06cfb066511f4cd...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Florian-Westphal/netfilter-bpf-base-hook-program-generator/20211014-201309
git checkout 2d7f7c3f2aa0c1933f06cfb066511f4cdefd6ff7
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=openrisc SHELL=/bin/bash net/netfilter/
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 >>):
net/netfilter/core.c: In function 'nf_hook_entries_grow':
>> net/netfilter/core.c:195:20: error: 'struct nf_hook_entries' has no member named 'hook_prog'
195 | new->hook_prog = hook_bpf_prog;
| ^~
>> net/netfilter/core.c:198:39: error: 'const struct nf_hook_entries' has no member named 'hook_prog'
198 | old_prog = old->hook_prog;
| ^~
net/netfilter/core.c: In function '__nf_hook_entries_try_shrink':
net/netfilter/core.c:321:42: error: 'struct nf_hook_entries' has no member named 'hook_prog'
321 | old ? old->hook_prog : NULL, hook_bpf_prog);
| ^~
vim +195 net/netfilter/core.c
123
124 static struct nf_hook_entries *
125 nf_hook_entries_grow(const struct nf_hook_entries *old,
126 const struct nf_hook_ops *reg)
127 {
128 unsigned int i, alloc_entries, nhooks, old_entries;
129 struct nf_hook_ops **orig_ops = NULL;
130 struct bpf_prog *hook_bpf_prog;
131 struct nf_hook_ops **new_ops;
132 struct nf_hook_entries *new;
133 bool inserted = false;
134
135 alloc_entries = 1;
136 old_entries = old ? old->num_hook_entries : 0;
137
138 if (old) {
139 orig_ops = nf_hook_entries_get_hook_ops(old);
140
141 for (i = 0; i < old_entries; i++) {
142 if (orig_ops[i] != &dummy_ops)
143 alloc_entries++;
144 }
145 }
146
147 if (alloc_entries > MAX_HOOK_COUNT)
148 return ERR_PTR(-E2BIG);
149
150 new = allocate_hook_entries_size(alloc_entries);
151 if (!new)
152 return ERR_PTR(-ENOMEM);
153
154 new_ops = nf_hook_entries_get_hook_ops(new);
155
156 i = 0;
157 nhooks = 0;
158 while (i < old_entries) {
159 if (orig_ops[i] == &dummy_ops) {
160 ++i;
161 continue;
162 }
163
164 if (inserted || reg->priority > orig_ops[i]->priority) {
165 new_ops[nhooks] = (void *)orig_ops[i];
166 new->hooks[nhooks] = old->hooks[i];
167 i++;
168 } else {
169 new_ops[nhooks] = (void *)reg;
170 new->hooks[nhooks].hook = reg->hook;
171 new->hooks[nhooks].priv = reg->priv;
172 inserted = true;
173 }
174 nhooks++;
175 }
176
177 if (!inserted) {
178 new_ops[nhooks] = (void *)reg;
179 new->hooks[nhooks].hook = reg->hook;
180 new->hooks[nhooks].priv = reg->priv;
181 }
182
183 hook_bpf_prog = nf_hook_bpf_create(new);
184
185 /* XXX: jit failure handling?
186 * We could refuse hook registration.
187 *
188 * For now, allocate_hook_entries_size() sets
189 * ->hook_prog to a small fallback program that
190 * calls nf_hook_slow().
191 */
192 if (hook_bpf_prog) {
193 struct bpf_prog *old_prog = NULL;
194
> 195 new->hook_prog = hook_bpf_prog;
196
197 if (old)
> 198 old_prog = old->hook_prog;
199
200 nf_hook_bpf_change_prog(BPF_DISPATCHER_PTR(nf_hook_base),
201 old_prog, hook_bpf_prog);
202 }
203
204 return new;
205 }
206
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH RFC nf-next 4/9] netfilter: make hook functions accept only one argument
by kernel test robot
Hi Florian,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on nf-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-bpf-b...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: hexagon-randconfig-r041-20211014 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6c76d0101193aa4eb891a6954ff047eda2f9cf71)
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/95fd31a5f5e86a1918a80e1b99333877a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Florian-Westphal/netfilter-bpf-base-hook-program-generator/20211014-201309
git checkout 95fd31a5f5e86a1918a80e1b99333877a09e1a4e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
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 >>):
>> net/ipv6/ila/ila_xlat.c:197:11: error: incompatible function pointer types initializing 'nf_hookfn *' (aka 'unsigned int (*)(const struct nf_hook_state *)') with an expression of type 'unsigned int (void *, struct sk_buff *, const struct nf_hook_state *)' [-Werror,-Wincompatible-function-pointer-types]
.hook = ila_nf_input,
^~~~~~~~~~~~
1 error generated.
vim +197 net/ipv6/ila/ila_xlat.c
7f00feaf107645 Tom Herbert 2015-12-15 194
591bb2789bc2a9 Florian Westphal 2017-07-26 195 static const struct nf_hook_ops ila_nf_hook_ops[] = {
7f00feaf107645 Tom Herbert 2015-12-15 196 {
7f00feaf107645 Tom Herbert 2015-12-15 @197 .hook = ila_nf_input,
7f00feaf107645 Tom Herbert 2015-12-15 198 .pf = NFPROTO_IPV6,
7f00feaf107645 Tom Herbert 2015-12-15 199 .hooknum = NF_INET_PRE_ROUTING,
7f00feaf107645 Tom Herbert 2015-12-15 200 .priority = -1,
7f00feaf107645 Tom Herbert 2015-12-15 201 },
7f00feaf107645 Tom Herbert 2015-12-15 202 };
7f00feaf107645 Tom Herbert 2015-12-15 203
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
Re: [PATCH RFC nf-next 4/9] netfilter: make hook functions accept only one argument
by kernel test robot
Hi Florian,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on nf-next/master]
url: https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-bpf-b...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: openrisc-buildonly-randconfig-r004-20211014 (attached as .config)
compiler: or1k-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/0day-ci/linux/commit/95fd31a5f5e86a1918a80e1b99333877a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Florian-Westphal/netfilter-bpf-base-hook-program-generator/20211014-201309
git checkout 95fd31a5f5e86a1918a80e1b99333877a09e1a4e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=openrisc
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 >>):
>> net/ipv6/ila/ila_xlat.c:197:25: error: initialization of 'unsigned int (*)(const struct nf_hook_state *)' from incompatible pointer type 'unsigned int (*)(void *, struct sk_buff *, const struct nf_hook_state *)' [-Werror=incompatible-pointer-types]
197 | .hook = ila_nf_input,
| ^~~~~~~~~~~~
net/ipv6/ila/ila_xlat.c:197:25: note: (near initialization for 'ila_nf_hook_ops[0].hook')
cc1: all warnings being treated as errors
vim +197 net/ipv6/ila/ila_xlat.c
7f00feaf107645 Tom Herbert 2015-12-15 194
591bb2789bc2a9 Florian Westphal 2017-07-26 195 static const struct nf_hook_ops ila_nf_hook_ops[] = {
7f00feaf107645 Tom Herbert 2015-12-15 196 {
7f00feaf107645 Tom Herbert 2015-12-15 @197 .hook = ila_nf_input,
7f00feaf107645 Tom Herbert 2015-12-15 198 .pf = NFPROTO_IPV6,
7f00feaf107645 Tom Herbert 2015-12-15 199 .hooknum = NF_INET_PRE_ROUTING,
7f00feaf107645 Tom Herbert 2015-12-15 200 .priority = -1,
7f00feaf107645 Tom Herbert 2015-12-15 201 },
7f00feaf107645 Tom Herbert 2015-12-15 202 };
7f00feaf107645 Tom Herbert 2015-12-15 203
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week
[jimc:dd-drm-next 14/20] lib/dynamic_debug.c:1308:62: error: invalid use of undefined type 'struct module'
by kernel test robot
tree: https://github.com/jimc/linux.git dd-drm-next
head: 2eec9300d730ad634b967a853579f0b5dffecc01
commit: 8819a72010473e6a18e27cb4a464fb921b1afbc0 [14/20] dyndbg: add print-to-tracefs, selftest with it - RFC
config: arc-randconfig-r043-20211014 (attached as .config)
compiler: arceb-elf-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/jimc/linux/commit/8819a72010473e6a18e27cb4a464fb921b1a...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc dd-drm-next
git checkout 8819a72010473e6a18e27cb4a464fb921b1afbc0
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc 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 >>):
lib/dynamic_debug.c: In function 'ddebug_tracer_find':
lib/dynamic_debug.c:1272:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1272 | if (trc->key == (u64)modname)
| ^
In file included from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'ddebug_tracer_add':
>> lib/dynamic_debug.c:1308:62: error: invalid use of undefined type 'struct module'
1308 | pr_warn("tracer-fn already set for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:499:9: note: in expansion of macro 'printk'
499 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:1308:17: note: in expansion of macro 'pr_warn'
1308 | pr_warn("tracer-fn already set for %s\n", mod->name);
| ^~~~~~~
lib/dynamic_debug.c:1316:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1316 | trc->key = (u64)dt->ddebugs[0].modname;
| ^
In file included from include/linux/netdevice.h:49,
from lib/dynamic_debug.c:38:
lib/dynamic_debug.c:1317:56: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hashtable.h:32:17: note: in definition of macro 'hash_min'
32 | (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits))
| ^~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
lib/dynamic_debug.c:1317:56: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hashtable.h:32:37: note: in definition of macro 'hash_min'
32 | (sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits))
| ^~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
In file included from include/linux/stringhash.h:7,
from include/linux/dcache.h:15,
from include/linux/fs.h:8,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:727,
from include/linux/kallsyms.h:13,
from lib/dynamic_debug.c:19:
lib/dynamic_debug.c:1317:56: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^
include/linux/hash.h:16:38: note: in definition of macro 'hash_long'
16 | #define hash_long(val, bits) hash_32(val, bits)
| ^~~
include/linux/hashtable.h:61:41: note: in expansion of macro 'hash_min'
61 | hlist_add_head(node, &hashtable[hash_min(key, HASH_BITS(hashtable))])
| ^~~~~~~~
lib/dynamic_debug.c:1317:9: note: in expansion of macro 'hash_add'
1317 | hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
| ^~~~~~~~
In file included from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'ddebug_tracer_del':
lib/dynamic_debug.c:1331:65: error: invalid use of undefined type 'struct module'
1331 | pr_warn("delete: cant find tracer for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:499:9: note: in expansion of macro 'printk'
499 | printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:1331:17: note: in expansion of macro 'pr_warn'
1331 | pr_warn("delete: cant find tracer for %s\n", mod->name);
| ^~~~~~~
lib/dynamic_debug.c:1335:48: error: invalid use of undefined type 'struct module'
1335 | vpr_info("deleted tracer for %s\n", mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:519:9: note: in expansion of macro 'printk'
519 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
lib/dynamic_debug.c:132:17: note: in expansion of macro 'pr_info'
132 | pr_info(fmt, ##__VA_ARGS__); \
| ^~~~~~~
lib/dynamic_debug.c:135:33: note: in expansion of macro 'vnpr_info'
135 | #define vpr_info(fmt, ...) vnpr_info(1, fmt, ##__VA_ARGS__)
| ^~~~~~~~~
lib/dynamic_debug.c:1335:9: note: in expansion of macro 'vpr_info'
1335 | vpr_info("deleted tracer for %s\n", mod->name);
| ^~~~~~~~
lib/dynamic_debug.c: In function '__dynamic_debug_tracer_action':
lib/dynamic_debug.c:1355:24: error: invalid use of undefined type 'struct module'
1355 | if (mod->name == dt->mod_name) {
| ^~
lib/dynamic_debug.c:1359:32: error: invalid use of undefined type 'struct module'
1359 | if (!strcmp(mod->name, dt->mod_name)) {
| ^~
In file included from include/linux/kernel.h:19,
from lib/dynamic_debug.c:16:
lib/dynamic_debug.c: In function 'dynamic_debug_register_tracer':
lib/dynamic_debug.c:1378:42: error: invalid use of undefined type 'struct module'
1378 | vpr_info("%s %s\n", __func__, mod->name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
vim +1308 lib/dynamic_debug.c
1295
1296 /*
1297 * key computation is done on insert, such that lookup is trivial.
1298 * We use the modname ref in the 1st ddebug descriptor, the others in
1299 * the table are identical, giving us the module-scope lookup we want.
1300 */
1301 static int ddebug_tracer_add(void (*tracer)(const char *lbl, struct va_format *vaf),
1302 struct module *mod, struct ddebug_table *dt)
1303 {
1304 struct ddebug_tracer *trc;
1305
1306 trc = ddebug_tracer_find(dt->ddebugs[0].modname);
1307 if (trc) {
> 1308 pr_warn("tracer-fn already set for %s\n", mod->name);
1309 return -1;
1310 }
1311 trc = kmalloc(sizeof(*trc), GFP_ATOMIC);
1312 if (!trc)
1313 return -ENOMEM;
1314
1315 trc->tracefn = tracer;
1316 trc->key = (u64)dt->ddebugs[0].modname;
1317 hash_add(ddebug_tracer_by_module, &trc->hnode, (u64)dt->ddebugs[0].modname);
1318
1319 vpr_info("added tracer-fn for module %s\n", dt->ddebugs[0].modname);
1320
1321 return 0;
1322 }
1323
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
11 months, 1 week