[peterz-queue:locking/futex 4/8] kernel/futex/core.c:2804:23: warning: cast to pointer from integer of different size
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/futex
head: 3e6fb0c7cd6f4839a2ac03396781247f7e902875
commit: 038e21d9eaa0a4bc011f9d4e8d006e8072a48422 [4/8] futex: Implement sys_futex_waitv()
config: um-i386_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue locking/futex
git checkout 038e21d9eaa0a4bc011f9d4e8d006e8072a48422
# save the attached .config to linux build tree
make W=1 ARCH=um SUBARCH=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 >>):
kernel/futex/core.c: In function 'futex_wait_multiple_setup':
>> kernel/futex/core.c:2804:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2804 | u32 __user *uaddr = (u32 __user *)vs[i].w.uaddr;
| ^
vim +2804 kernel/futex/core.c
2750
2751 /**
2752 * futex_wait_multiple_setup - Prepare to wait and enqueue multiple futexes
2753 * @vs: The futex list to wait on
2754 * @count: The size of the list
2755 * @awaken: Index of the last awoken futex, if any. Used to notify the
2756 * caller that it can return this index to userspace (return parameter)
2757 *
2758 * Prepare multiple futexes in a single step and enqueue them. This may fail if
2759 * the futex list is invalid or if any futex was already awoken. On success the
2760 * task is ready to interruptible sleep.
2761 *
2762 * Return:
2763 * - 1 - One of the futexes was awaken by another thread
2764 * - 0 - Success
2765 * - <0 - -EFAULT, -EWOULDBLOCK or -EINVAL
2766 */
2767 static int futex_wait_multiple_setup(struct futex_vector *vs, int count, int *awaken)
2768 {
2769 struct futex_hash_bucket *hb;
2770 bool retry = false;
2771 int ret, i;
2772 u32 uval;
2773
2774 /*
2775 * Enqueuing multiple futexes is tricky, because we need to enqueue
2776 * each futex in the list before dealing with the next one to avoid
2777 * deadlocking on the hash bucket. But, before enqueuing, we need to
2778 * make sure that current->state is TASK_INTERRUPTIBLE, so we don't
2779 * absorb any awake events, which cannot be done before the
2780 * get_futex_key of the next key, because it calls get_user_pages,
2781 * which can sleep. Thus, we fetch the list of futexes keys in two
2782 * steps, by first pinning all the memory keys in the futex key, and
2783 * only then we read each key and queue the corresponding futex.
2784 *
2785 * Private futexes doesn't need to recalculate hash in retry, so skip
2786 * get_futex_key() when retrying.
2787 */
2788 retry:
2789 for (i = 0; i < count; i++) {
2790 if ((vs[i].w.flags & FUTEX_PRIVATE_FLAG) && retry)
2791 continue;
2792
2793 ret = get_futex_key(u64_to_user_ptr(vs[i].w.uaddr),
2794 !(vs[i].w.flags & FUTEX_PRIVATE_FLAG),
2795 &vs[i].q.key, FUTEX_READ);
2796
2797 if (unlikely(ret))
2798 return ret;
2799 }
2800
2801 set_current_state(TASK_INTERRUPTIBLE);
2802
2803 for (i = 0; i < count; i++) {
> 2804 u32 __user *uaddr = (u32 __user *)vs[i].w.uaddr;
2805 struct futex_q *q = &vs[i].q;
2806 u32 val = (u32)vs[i].w.val;
2807
2808 hb = queue_lock(q);
2809 ret = get_futex_value_locked(&uval, uaddr);
2810
2811 if (!ret && uval == val) {
2812 /*
2813 * The bucket lock can't be held while dealing with the
2814 * next futex. Queue each futex at this moment so hb can
2815 * be unlocked.
2816 */
2817 queue_me(q, hb);
2818 continue;
2819 }
2820
2821 queue_unlock(hb);
2822 __set_current_state(TASK_RUNNING);
2823
2824 /*
2825 * Even if something went wrong, if we find out that a futex
2826 * was awaken, we don't return error and return this index to
2827 * userspace
2828 */
2829 *awaken = unqueue_multiple(vs, i);
2830 if (*awaken >= 0)
2831 return 1;
2832
2833 if (uval != val)
2834 return -EWOULDBLOCK;
2835
2836 if (ret) {
2837 /*
2838 * If we need to handle a page fault, we need to do so
2839 * without any lock and any enqueued futex (otherwise
2840 * we could lose some wakeup). So we do it here, after
2841 * undoing all the work done so far. In success, we
2842 * retry all the work.
2843 */
2844 if (get_user(uval, uaddr))
2845 return -EFAULT;
2846
2847 retry = true;
2848 goto retry;
2849 }
2850 }
2851
2852 return 0;
2853 }
2854
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
arch/powerpc/platforms/44x/ppc476.c:241:34: 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: 3ca706c189db861b2ca2019a0901b94050ca49d8
commit: 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e powerpc: inline iomap accessors
date: 10 months ago
config: powerpc-randconfig-s031-20210915 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 11.2.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.4-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 894fa235eb4ca0bfa692dbe4932c2f940cdc8c1e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc
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 >>)
arch/powerpc/platforms/44x/ppc476.c:236:17: sparse: sparse: cast removes address space '__iomem' of expression
>> arch/powerpc/platforms/44x/ppc476.c:241:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned char [usertype] * @@
arch/powerpc/platforms/44x/ppc476.c:241:34: sparse: expected void const volatile [noderef] __iomem *addr
arch/powerpc/platforms/44x/ppc476.c:241:34: sparse: got unsigned char [usertype] *
arch/powerpc/platforms/44x/ppc476.c:243:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned char [usertype] *[assigned] fpga @@
arch/powerpc/platforms/44x/ppc476.c:243:17: sparse: expected void volatile [noderef] __iomem *addr
arch/powerpc/platforms/44x/ppc476.c:243:17: sparse: got unsigned char [usertype] *[assigned] fpga
vim +241 arch/powerpc/platforms/44x/ppc476.c
228d55053397e6 arch/powerpc/platforms/44x/currituck.c Tony Breeds 2011-11-30 217
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 218 static int board_rev = -1;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 219 static int __init ppc47x_get_board_rev(void)
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 220 {
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 221 int reg;
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 222 u8 *fpga;
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 223 struct device_node *np = NULL;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 224
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 225 if (of_machine_is_compatible("ibm,currituck")) {
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 226 np = of_find_compatible_node(NULL, NULL, "ibm,currituck-fpga");
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 227 reg = 0;
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 228 } else if (of_machine_is_compatible("ibm,akebono")) {
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 229 np = of_find_compatible_node(NULL, NULL, "ibm,akebono-fpga");
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 230 reg = 2;
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 231 }
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 232
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 233 if (!np)
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 234 goto fail;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 235
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 @236 fpga = (u8 *) of_iomap(np, 0);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 237 of_node_put(np);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 238 if (!fpga)
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 239 goto fail;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 240
2a2c74b2efcb1a arch/powerpc/platforms/44x/ppc476.c Alistair Popple 2014-03-06 @241 board_rev = ioread8(fpga + reg) & 0x03;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 242 pr_info("%s: Found board revision %d\n", __func__, board_rev);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 243 iounmap(fpga);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 244 return 0;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 245
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 246 fail:
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 247 pr_info("%s: Unable to find board revision\n", __func__);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 248 return 0;
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 249 }
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 250 machine_arch_initcall(ppc47x, ppc47x_get_board_rev);
ab9a4183fddf23 arch/powerpc/platforms/44x/currituck.c Alistair Popple 2013-05-09 251
:::::: The code at line 241 was first introduced by commit
:::::: 2a2c74b2efcb1a0ca3fdcb5fbb96ad8de6a29177 IBM Akebono: Add the Akebono platform
:::::: TO: Alistair Popple <alistair(a)popple.id.au>
:::::: CC: Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[android-common:android-5.4 1/6] include/keys/asymmetric-type.h:72:12: error: dereferencing pointer to incomplete type 'const struct key'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-5.4
head: 383f53ee186a22c3d04cc6809e3b5e13bc2b571d
commit: 1be052b20ba04b635cf87bcff80de5314697953e [1/6] ANDROID: Initial commit of Incremental FS
config: i386-randconfig-a015-20210915 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-5.4
git checkout 1be052b20ba04b635cf87bcff80de5314697953e
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash crypto/asymmetric_keys/
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 include/keys/asymmetric-subtype.h:14,
from crypto/asymmetric_keys/asymmetric_type.c:9:
include/keys/asymmetric-type.h: In function 'asymmetric_key_ids':
>> include/keys/asymmetric-type.h:72:12: error: dereferencing pointer to incomplete type 'const struct key'
72 | return key->payload.data[asym_key_ids];
| ^~
In file included from crypto/asymmetric_keys/asymmetric_type.c:10:
include/keys/asymmetric-parser.h: At top level:
include/keys/asymmetric-parser.h:27:22: warning: 'struct key_preparsed_payload' declared inside parameter list will not be visible outside of this definition or declaration
27 | int (*parse)(struct key_preparsed_payload *prep);
| ^~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c: In function 'find_asymmetric_key':
crypto/asymmetric_keys/asymmetric_type.c:52:2: error: unknown type name 'key_ref_t'; did you mean 'key_ref_put'?
52 | key_ref_t ref;
| ^~~~~~~~~
| key_ref_put
crypto/asymmetric_keys/asymmetric_type.c:85:8: error: implicit declaration of function 'keyring_search' [-Werror=implicit-function-declaration]
85 | ref = keyring_search(make_key_ref(keyring, 1),
| ^~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:87:13: warning: passing argument 1 of 'IS_ERR' makes pointer from integer without a cast [-Wint-conversion]
87 | if (IS_ERR(ref))
| ^~~
| |
| int
In file included from arch/x86/include/asm/processor.h:32,
from include/linux/mutex.h:19,
from include/linux/seq_file.h:8,
from include/keys/asymmetric-subtype.h:13,
from crypto/asymmetric_keys/asymmetric_type.c:9:
include/linux/err.h:34:60: note: expected 'const void *' but argument is of type 'int'
34 | static inline bool __must_check IS_ERR(__force const void *ptr)
| ~~~~~~~~~~~~^~~
In file included from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/seq_file.h:7,
from include/keys/asymmetric-subtype.h:13,
from crypto/asymmetric_keys/asymmetric_type.c:9:
crypto/asymmetric_keys/asymmetric_type.c:88:59: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion]
88 | pr_debug("Request for key '%s' err %ld\n", req, PTR_ERR(ref));
| ^~~
| |
| int
include/linux/printk.h:137:17: note: in definition of macro 'no_printk'
137 | printk(fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:88:3: note: in expansion of macro 'pr_debug'
88 | pr_debug("Request for key '%s' err %ld\n", req, PTR_ERR(ref));
| ^~~~~~~~
In file included from arch/x86/include/asm/processor.h:32,
from include/linux/mutex.h:19,
from include/linux/seq_file.h:8,
from include/keys/asymmetric-subtype.h:13,
from crypto/asymmetric_keys/asymmetric_type.c:9:
include/linux/err.h:29:61: note: expected 'const void *' but argument is of type 'int'
29 | static inline long __must_check PTR_ERR(__force const void *ptr)
| ~~~~~~~~~~~~^~~
crypto/asymmetric_keys/asymmetric_type.c:91:13: warning: passing argument 1 of 'IS_ERR' makes pointer from integer without a cast [-Wint-conversion]
91 | if (IS_ERR(ref)) {
| ^~~
| |
| int
In file included from arch/x86/include/asm/processor.h:32,
from include/linux/mutex.h:19,
from include/linux/seq_file.h:8,
from include/keys/asymmetric-subtype.h:13,
from crypto/asymmetric_keys/asymmetric_type.c:9:
include/linux/err.h:34:60: note: expected 'const void *' but argument is of type 'int'
34 | static inline bool __must_check IS_ERR(__force const void *ptr)
| ~~~~~~~~~~~~^~~
crypto/asymmetric_keys/asymmetric_type.c:92:19: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion]
92 | switch (PTR_ERR(ref)) {
| ^~~
| |
| int
In file included from arch/x86/include/asm/processor.h:32,
from include/linux/mutex.h:19,
from include/linux/seq_file.h:8,
from include/keys/asymmetric-subtype.h:13,
from crypto/asymmetric_keys/asymmetric_type.c:9:
include/linux/err.h:29:61: note: expected 'const void *' but argument is of type 'int'
29 | static inline long __must_check PTR_ERR(__force const void *ptr)
| ~~~~~~~~~~~~^~~
crypto/asymmetric_keys/asymmetric_type.c:99:20: warning: passing argument 1 of 'ERR_CAST' makes pointer from integer without a cast [-Wint-conversion]
99 | return ERR_CAST(ref);
| ^~~
| |
| int
In file included from arch/x86/include/asm/processor.h:32,
from include/linux/mutex.h:19,
from include/linux/seq_file.h:8,
from include/keys/asymmetric-subtype.h:13,
from crypto/asymmetric_keys/asymmetric_type.c:9:
include/linux/err.h:51:64: note: expected 'const void *' but argument is of type 'int'
51 | static inline void * __must_check ERR_CAST(__force const void *ptr)
| ~~~~~~~~~~~~^~~
crypto/asymmetric_keys/asymmetric_type.c: At top level:
crypto/asymmetric_keys/asymmetric_type.c:248:24: warning: 'struct key_match_data' declared inside parameter list will not be visible outside of this definition or declaration
248 | const struct key_match_data *match_data)
| ^~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c: In function 'asymmetric_key_cmp':
>> crypto/asymmetric_keys/asymmetric_type.c:251:55: error: dereferencing pointer to incomplete type 'const struct key_match_data'
251 | const struct asymmetric_key_id *match_id = match_data->preparsed;
| ^~
crypto/asymmetric_keys/asymmetric_type.c: At top level:
crypto/asymmetric_keys/asymmetric_type.c:261:25: warning: 'struct key_match_data' declared inside parameter list will not be visible outside of this definition or declaration
261 | const struct key_match_data *match_data)
| ^~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c: In function 'asymmetric_key_cmp_partial':
crypto/asymmetric_keys/asymmetric_type.c:264:55: error: dereferencing pointer to incomplete type 'const struct key_match_data'
264 | const struct asymmetric_key_id *match_id = match_data->preparsed;
| ^~
crypto/asymmetric_keys/asymmetric_type.c: At top level:
crypto/asymmetric_keys/asymmetric_type.c:283:49: warning: 'struct key_match_data' declared inside parameter list will not be visible outside of this definition or declaration
283 | static int asymmetric_key_match_preparse(struct key_match_data *match_data)
| ^~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c: In function 'asymmetric_key_match_preparse':
>> crypto/asymmetric_keys/asymmetric_type.c:286:31: error: dereferencing pointer to incomplete type 'struct key_match_data'
286 | const char *spec = match_data->raw_data;
| ^~
crypto/asymmetric_keys/asymmetric_type.c:289:3: error: initialization of 'bool (*)(const struct key *, const struct key_match_data *)' {aka '_Bool (*)(const struct key *, const struct key_match_data *)'} from incompatible pointer type 'bool (*)(const struct key *, const struct key_match_data *)' {aka '_Bool (*)(const struct key *, const struct key_match_data *)'} [-Werror=incompatible-pointer-types]
289 | asymmetric_key_cmp;
| ^~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:297:7: error: assignment to 'bool (*)(const struct key *, const struct key_match_data *)' {aka '_Bool (*)(const struct key *, const struct key_match_data *)'} from incompatible pointer type 'bool (*)(const struct key *, const struct key_match_data *)' {aka '_Bool (*)(const struct key *, const struct key_match_data *)'} [-Werror=incompatible-pointer-types]
297 | cmp = asymmetric_key_cmp_partial;
| ^
crypto/asymmetric_keys/asymmetric_type.c:312:28: error: 'KEYRING_SEARCH_LOOKUP_ITERATE' undeclared (first use in this function)
312 | match_data->lookup_type = KEYRING_SEARCH_LOOKUP_ITERATE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:312:28: note: each undeclared identifier is reported only once for each function it appears in
crypto/asymmetric_keys/asymmetric_type.c: At top level:
crypto/asymmetric_keys/asymmetric_type.c:322:46: warning: 'struct key_match_data' declared inside parameter list will not be visible outside of this definition or declaration
322 | static void asymmetric_key_match_free(struct key_match_data *match_data)
| ^~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c: In function 'asymmetric_key_match_free':
crypto/asymmetric_keys/asymmetric_type.c:324:18: error: dereferencing pointer to incomplete type 'struct key_match_data'
324 | kfree(match_data->preparsed);
| ^~
crypto/asymmetric_keys/asymmetric_type.c: At top level:
crypto/asymmetric_keys/asymmetric_type.c:369:43: warning: 'struct key_preparsed_payload' declared inside parameter list will not be visible outside of this definition or declaration
369 | static int asymmetric_key_preparse(struct key_preparsed_payload *prep)
| ^~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c: In function 'asymmetric_key_preparse':
>> crypto/asymmetric_keys/asymmetric_type.c:376:10: error: dereferencing pointer to incomplete type 'struct key_preparsed_payload'
376 | if (prep->datalen == 0)
| ^~
crypto/asymmetric_keys/asymmetric_type.c:385:23: error: passing argument 1 of 'parser->parse' from incompatible pointer type [-Werror=incompatible-pointer-types]
385 | ret = parser->parse(prep);
| ^~~~
| |
| struct key_preparsed_payload *
crypto/asymmetric_keys/asymmetric_type.c:385:23: note: expected 'struct key_preparsed_payload *' but argument is of type 'struct key_preparsed_payload *'
crypto/asymmetric_keys/asymmetric_type.c: At top level:
crypto/asymmetric_keys/asymmetric_type.c:415:49: warning: 'struct key_preparsed_payload' declared inside parameter list will not be visible outside of this definition or declaration
415 | static void asymmetric_key_free_preparse(struct key_preparsed_payload *prep)
| ^~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c: In function 'asymmetric_key_free_preparse':
crypto/asymmetric_keys/asymmetric_type.c:417:47: error: dereferencing pointer to incomplete type 'struct key_preparsed_payload'
417 | struct asymmetric_key_subtype *subtype = prep->payload.data[asym_subtype];
| ^~
crypto/asymmetric_keys/asymmetric_type.c: In function 'asymmetric_key_destroy':
>> crypto/asymmetric_keys/asymmetric_type.c:437:39: error: dereferencing pointer to incomplete type 'struct key'
437 | struct asymmetric_key_ids *kids = key->payload.data[asym_key_ids];
| ^~
crypto/asymmetric_keys/asymmetric_type.c: At top level:
crypto/asymmetric_keys/asymmetric_type.c:455:2: error: unknown type name 'key_restrict_link_func_t'
455 | key_restrict_link_func_t check,
| ^~~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c: In function 'asymmetric_lookup_restriction':
crypto/asymmetric_keys/asymmetric_type.c:483:10: error: implicit declaration of function 'asymmetric_restriction_alloc' [-Werror=implicit-function-declaration]
483 | return asymmetric_restriction_alloc(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from crypto/asymmetric_keys/asymmetric_type.c:16:
include/keys/system_keyring.h:21:42: error: 'restrict_link_reject' undeclared (first use in this function)
21 | #define restrict_link_by_builtin_trusted restrict_link_reject
| ^~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:484:4: note: in expansion of macro 'restrict_link_by_builtin_trusted'
484 | restrict_link_by_builtin_trusted, NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:501:3: error: unknown type name 'key_restrict_link_func_t'
501 | key_restrict_link_func_t link_fn =
| ^~~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:502:4: warning: initialization of 'int' from 'int (*)(struct key *, const struct key_type *, const union key_payload *, struct key *)' makes integer from pointer without a cast [-Wint-conversion]
502 | restrict_link_by_key_or_keyring;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:511:12: warning: assignment to 'int' from 'int (*)(struct key *, const struct key_type *, const union key_payload *, struct key *)' makes integer from pointer without a cast [-Wint-conversion]
511 | link_fn = restrict_link_by_key_or_keyring_chain;
| ^
crypto/asymmetric_keys/asymmetric_type.c:521:10: error: implicit declaration of function 'key_lookup'; did you mean 'd_lookup'? [-Werror=implicit-function-declaration]
521 | key = key_lookup(serial);
| ^~~~~~~~~~
| d_lookup
crypto/asymmetric_keys/asymmetric_type.c:521:8: warning: assignment to 'struct key *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
521 | key = key_lookup(serial);
| ^
crypto/asymmetric_keys/asymmetric_type.c:528:7: warning: assignment to 'struct key_restriction *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
528 | ret = asymmetric_restriction_alloc(link_fn, key);
| ^
crypto/asymmetric_keys/asymmetric_type.c: At top level:
crypto/asymmetric_keys/asymmetric_type.c:577:8: error: variable 'key_type_asymmetric' has initializer but incomplete type
577 | struct key_type key_type_asymmetric = {
| ^~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:578:3: error: 'struct key_type' has no member named 'name'
578 | .name = "asymmetric",
| ^~~~
crypto/asymmetric_keys/asymmetric_type.c:578:12: warning: excess elements in struct initializer
578 | .name = "asymmetric",
| ^~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:578:12: note: (near initialization for 'key_type_asymmetric')
crypto/asymmetric_keys/asymmetric_type.c:579:3: error: 'struct key_type' has no member named 'preparse'
579 | .preparse = asymmetric_key_preparse,
| ^~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:579:15: warning: excess elements in struct initializer
579 | .preparse = asymmetric_key_preparse,
| ^~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:579:15: note: (near initialization for 'key_type_asymmetric')
crypto/asymmetric_keys/asymmetric_type.c:580:3: error: 'struct key_type' has no member named 'free_preparse'
580 | .free_preparse = asymmetric_key_free_preparse,
| ^~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:580:20: warning: excess elements in struct initializer
580 | .free_preparse = asymmetric_key_free_preparse,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:580:20: note: (near initialization for 'key_type_asymmetric')
crypto/asymmetric_keys/asymmetric_type.c:581:3: error: 'struct key_type' has no member named 'instantiate'
581 | .instantiate = generic_key_instantiate,
| ^~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:581:18: error: 'generic_key_instantiate' undeclared here (not in a function)
581 | .instantiate = generic_key_instantiate,
| ^~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:581:18: warning: excess elements in struct initializer
crypto/asymmetric_keys/asymmetric_type.c:581:18: note: (near initialization for 'key_type_asymmetric')
crypto/asymmetric_keys/asymmetric_type.c:582:3: error: 'struct key_type' has no member named 'match_preparse'
582 | .match_preparse = asymmetric_key_match_preparse,
| ^~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:582:21: warning: excess elements in struct initializer
582 | .match_preparse = asymmetric_key_match_preparse,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:582:21: note: (near initialization for 'key_type_asymmetric')
crypto/asymmetric_keys/asymmetric_type.c:583:3: error: 'struct key_type' has no member named 'match_free'
583 | .match_free = asymmetric_key_match_free,
| ^~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:583:17: warning: excess elements in struct initializer
583 | .match_free = asymmetric_key_match_free,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:583:17: note: (near initialization for 'key_type_asymmetric')
crypto/asymmetric_keys/asymmetric_type.c:584:3: error: 'struct key_type' has no member named 'destroy'
584 | .destroy = asymmetric_key_destroy,
| ^~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:584:14: warning: excess elements in struct initializer
584 | .destroy = asymmetric_key_destroy,
| ^~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:584:14: note: (near initialization for 'key_type_asymmetric')
crypto/asymmetric_keys/asymmetric_type.c:585:3: error: 'struct key_type' has no member named 'describe'
585 | .describe = asymmetric_key_describe,
| ^~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:585:15: warning: excess elements in struct initializer
585 | .describe = asymmetric_key_describe,
| ^~~~~~~~~~~~~~~~~~~~~~~
crypto/asymmetric_keys/asymmetric_type.c:585:15: note: (near initialization for 'key_type_asymmetric')
crypto/asymmetric_keys/asymmetric_type.c:586:3: error: 'struct key_type' has no member named 'lookup_restriction'
586 | .lookup_restriction = asymmetric_lookup_restriction,
| ^~~~~~~~~~~~~~~~~~
--
In file included from crypto/asymmetric_keys/asymmetric_keys.h:8,
from crypto/asymmetric_keys/restrict.c:13:
include/keys/asymmetric-type.h: In function 'asymmetric_key_ids':
>> include/keys/asymmetric-type.h:72:12: error: dereferencing pointer to incomplete type 'const struct key'
72 | return key->payload.data[asym_key_ids];
| ^~
crypto/asymmetric_keys/restrict.c: In function 'restrict_link_by_signature':
>> crypto/asymmetric_keys/restrict.c:87:15: error: dereferencing pointer to incomplete type 'const union key_payload'
87 | sig = payload->data[asym_auth];
| ^~
crypto/asymmetric_keys/restrict.c:103:36: error: 'KEY_FLAG_BUILTIN' undeclared (first use in this function)
103 | if (use_builtin_keys && !test_bit(KEY_FLAG_BUILTIN, &key->flags))
| ^~~~~~~~~~~~~~~~
crypto/asymmetric_keys/restrict.c:103:36: note: each undeclared identifier is reported only once for each function it appears in
>> crypto/asymmetric_keys/restrict.c:103:58: error: dereferencing pointer to incomplete type 'struct key'
103 | if (use_builtin_keys && !test_bit(KEY_FLAG_BUILTIN, &key->flags))
| ^~
crypto/asymmetric_keys/restrict.c: In function 'key_or_keyring_common':
crypto/asymmetric_keys/restrict.c:131:34: error: 'key_type_keyring' undeclared (first use in this function); did you mean 'dest_keyring'?
131 | else if (dest_keyring->type != &key_type_keyring)
| ^~~~~~~~~~~~~~~~
| dest_keyring
crypto/asymmetric_keys/restrict.c:180:12: error: implicit declaration of function '__key_get'; did you mean 'key_get'? [-Werror=implicit-function-declaration]
180 | key = __key_get(trusted);
| ^~~~~~~~~
| key_get
crypto/asymmetric_keys/restrict.c:180:10: warning: assignment to 'struct key *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
180 | key = __key_get(trusted);
| ^
crypto/asymmetric_keys/restrict.c:186:9: warning: assignment to 'struct key *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
186 | key = __key_get(trusted);
| ^
cc1: some warnings being treated as errors
--
In file included from include/keys/asymmetric-subtype.h:14,
from crypto/asymmetric_keys/signature.c:11:
include/keys/asymmetric-type.h: In function 'asymmetric_key_ids':
>> include/keys/asymmetric-type.h:72:12: error: dereferencing pointer to incomplete type 'const struct key'
72 | return key->payload.data[asym_key_ids];
| ^~
crypto/asymmetric_keys/signature.c: In function 'query_asymmetric_key':
>> crypto/asymmetric_keys/signature.c:51:9: error: dereferencing pointer to incomplete type 'struct key'
51 | if (key->type != &key_type_asymmetric)
| ^~
In file included from crypto/asymmetric_keys/signature.c:11:
include/keys/asymmetric-subtype.h: In function 'asymmetric_key_subtype':
include/keys/asymmetric-subtype.h:58:1: warning: control reaches end of non-void function [-Wreturn-type]
58 | }
| ^
..
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ASYMMETRIC_KEY_TYPE
Depends on CRYPTO && KEYS
Selected by
- INCREMENTAL_FS && BLOCK
vim +72 include/keys/asymmetric-type.h
7901c1a8effbe5 David Howells 2014-09-16 58
7901c1a8effbe5 David Howells 2014-09-16 59 extern bool asymmetric_key_id_same(const struct asymmetric_key_id *kid1,
7901c1a8effbe5 David Howells 2014-09-16 60 const struct asymmetric_key_id *kid2);
7901c1a8effbe5 David Howells 2014-09-16 61
f1b731dbc2530c Dmitry Kasatkin 2014-10-06 62 extern bool asymmetric_key_id_partial(const struct asymmetric_key_id *kid1,
f1b731dbc2530c Dmitry Kasatkin 2014-10-06 63 const struct asymmetric_key_id *kid2);
f1b731dbc2530c Dmitry Kasatkin 2014-10-06 64
7901c1a8effbe5 David Howells 2014-09-16 65 extern struct asymmetric_key_id *asymmetric_key_generate_id(const void *val_1,
7901c1a8effbe5 David Howells 2014-09-16 66 size_t len_1,
7901c1a8effbe5 David Howells 2014-09-16 67 const void *val_2,
7901c1a8effbe5 David Howells 2014-09-16 68 size_t len_2);
146aa8b1453bd8 David Howells 2015-10-21 69 static inline
146aa8b1453bd8 David Howells 2015-10-21 70 const struct asymmetric_key_ids *asymmetric_key_ids(const struct key *key)
146aa8b1453bd8 David Howells 2015-10-21 71 {
146aa8b1453bd8 David Howells 2015-10-21 @72 return key->payload.data[asym_key_ids];
146aa8b1453bd8 David Howells 2015-10-21 73 }
7901c1a8effbe5 David Howells 2014-09-16 74
:::::: The code at line 72 was first introduced by commit
:::::: 146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc KEYS: Merge the type-specific data with the payload data
:::::: TO: David Howells <dhowells(a)redhat.com>
:::::: CC: David Howells <dhowells(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[android-common:android12-5.4 4/9] drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4/9] ANDROID: dma-buf: system_heap: Add pagepool support to system heap
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout 44008f99d9ca0793e2562967e1da01fa74ee4a41
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma-buf/heaps/ tools/virtio/vhost_test/vhost_test.ko
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/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
drivers/dma-buf/heaps/page_pool.c:243:5: sparse: sparse: symbol 'dmabuf_page_pool_init_shrinker' was not declared. Should it be static?
vim +/pool_shrinker +236 drivers/dma-buf/heaps/page_pool.c
bd4db96bfc247a John Stultz 2020-10-02 235
bd4db96bfc247a John Stultz 2020-10-02 @236 struct shrinker pool_shrinker = {
bd4db96bfc247a John Stultz 2020-10-02 237 .count_objects = dmabuf_page_pool_shrink_count,
bd4db96bfc247a John Stultz 2020-10-02 238 .scan_objects = dmabuf_page_pool_shrink_scan,
bd4db96bfc247a John Stultz 2020-10-02 239 .seeks = DEFAULT_SEEKS,
bd4db96bfc247a John Stultz 2020-10-02 240 .batch = 0,
bd4db96bfc247a John Stultz 2020-10-02 241 };
bd4db96bfc247a John Stultz 2020-10-02 242
:::::: The code at line 236 was first introduced by commit
:::::: bd4db96bfc247afdaf7a4cfde85fd8147522f3e6 ANDROID: dma-buf: heaps: Add a shrinker controlled page pool
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[dhowells-fs:fscache-iter-3 2/8] fs/fscache/io.c:164:5: warning: no previous prototype for '__fscache_deprecated_read_page'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter-3
head: 3af24cee1e80003b6c8993fa8a601cc0ab9fd6c6
commit: b5606e77b36d6218ef5367fcdbebcbfa1af091bc [2/8] fscache: Implement an alternate I/O interface to replace the old API
config: arc-randconfig-r043-20210915 (attached as .config)
compiler: arc-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://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-3
git checkout b5606e77b36d6218ef5367fcdbebcbfa1af091bc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
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/fscache/io.c:164:5: warning: no previous prototype for '__fscache_deprecated_read_page' [-Wmissing-prototypes]
164 | int __fscache_deprecated_read_page(struct fscache_cookie *cookie, struct page *page)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/fscache/io.c:194:5: warning: no previous prototype for '__fscache_deprecated_write_page' [-Wmissing-prototypes]
194 | int __fscache_deprecated_write_page(struct fscache_cookie *cookie, struct page *page)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/io.c: In function '__fscache_deprecated_write_page':
fs/fscache/io.c:200:16: warning: variable 'len' set but not used [-Wunused-but-set-variable]
200 | size_t len;
| ^~~
fs/fscache/io.c:199:16: warning: variable 'start' set but not used [-Wunused-but-set-variable]
199 | loff_t start;
| ^~~~~
vim +/__fscache_deprecated_read_page +164 fs/fscache/io.c
160
161 /*
162 * Deprecated page reading interface.
163 */
> 164 int __fscache_deprecated_read_page(struct fscache_cookie *cookie, struct page *page)
165 {
166 struct netfs_cache_resources cres;
167 struct iov_iter iter;
168 struct bio_vec bvec[1];
169 int ret;
170
171 _enter("%lx", page->index);
172
173 memset(&cres, 0, sizeof(cres));
174 bvec[0].bv_page = page;
175 bvec[0].bv_offset = 0;
176 bvec[0].bv_len = PAGE_SIZE;
177 iov_iter_bvec(&iter, READ, bvec, ARRAY_SIZE(bvec), PAGE_SIZE);
178
179 ret = fscache_begin_read_operation(&cres, cookie);
180 if (ret < 0)
181 return ret;
182
183 ret = fscache_read(&cres, page_offset(page), &iter, NETFS_READ_HOLE_FAIL,
184 NULL, NULL);
185 fscache_end_operation(&cres);
186 _leave(" = %d", ret);
187 return ret;
188 }
189 EXPORT_SYMBOL(__fscache_deprecated_read_page);
190
191 /*
192 * Deprecated page writing interface.
193 */
> 194 int __fscache_deprecated_write_page(struct fscache_cookie *cookie, struct page *page)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[dhowells-fs:fscache-iter-3 2/8] fs/fscache/io.c:200:9: warning: variable 'len' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter-3
head: 3af24cee1e80003b6c8993fa8a601cc0ab9fd6c6
commit: b5606e77b36d6218ef5367fcdbebcbfa1af091bc [2/8] fscache: Implement an alternate I/O interface to replace the old API
config: i386-randconfig-r005-20210915 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.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-3
git checkout b5606e77b36d6218ef5367fcdbebcbfa1af091bc
# 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 >>):
fs/fscache/io.c:164:5: warning: no previous prototype for '__fscache_deprecated_read_page' [-Wmissing-prototypes]
164 | int __fscache_deprecated_read_page(struct fscache_cookie *cookie, struct page *page)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/io.c:194:5: warning: no previous prototype for '__fscache_deprecated_write_page' [-Wmissing-prototypes]
194 | int __fscache_deprecated_write_page(struct fscache_cookie *cookie, struct page *page)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/fscache/io.c: In function '__fscache_deprecated_write_page':
>> fs/fscache/io.c:200:9: warning: variable 'len' set but not used [-Wunused-but-set-variable]
200 | size_t len;
| ^~~
>> fs/fscache/io.c:199:9: warning: variable 'start' set but not used [-Wunused-but-set-variable]
199 | loff_t start;
| ^~~~~
vim +/len +200 fs/fscache/io.c
190
191 /*
192 * Deprecated page writing interface.
193 */
194 int __fscache_deprecated_write_page(struct fscache_cookie *cookie, struct page *page)
195 {
196 struct netfs_cache_resources cres;
197 struct iov_iter iter;
198 struct bio_vec bvec[1];
> 199 loff_t start;
> 200 size_t len;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[bpf-next:master 1/1] libbpf.c:9012:37: error: '%s' directive output may be truncated writing up to 127 bytes into a region of size between 62 and 189
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
head: 467b3225553a7945a896efabffb0b24871561ce3
commit: 467b3225553a7945a896efabffb0b24871561ce3 [1/1] libbpf: Introduce legacy kprobe events support
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?...
git remote add bpf-next https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
git fetch --no-tags bpf-next master
git checkout 467b3225553a7945a896efabffb0b24871561ce3
# 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 >>):
libbpf.c: In function 'poke_kprobe_events':
>> libbpf.c:9012:37: error: '%s' directive output may be truncated writing up to 127 bytes into a region of size between 62 and 189 [-Werror=format-truncation=]
9012 | snprintf(cmd, sizeof(cmd), "%c:%s %s",
| ^~
libbpf.c:9012:3: note: 'snprintf' output between 4 and 258 bytes into a destination of size 192
9012 | snprintf(cmd, sizeof(cmd), "%c:%s %s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9013 | retprobe ? 'r' : 'p',
| ~~~~~~~~~~~~~~~~~~~~~
9014 | probename,
| ~~~~~~~~~~
9015 | offset ? probefunc : name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [tools/build/Makefile.build:96: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf.o] Error 1
make[4]: *** [Makefile:161: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2
make[3]: *** [Makefile:45: tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2
make[2]: *** [Makefile:72: bpf/resolve_btfids] Error 2
make[1]: *** [Makefile:1374: tools/bpf/resolve_btfids] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
libbpf.c: In function 'poke_kprobe_events':
>> libbpf.c:9012:37: error: '%s' directive output may be truncated writing up to 127 bytes into a region of size between 62 and 189 [-Werror=format-truncation=]
9012 | snprintf(cmd, sizeof(cmd), "%c:%s %s",
| ^~
libbpf.c:9012:3: note: 'snprintf' output between 4 and 258 bytes into a destination of size 192
9012 | snprintf(cmd, sizeof(cmd), "%c:%s %s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9013 | retprobe ? 'r' : 'p',
| ~~~~~~~~~~~~~~~~~~~~~
9014 | probename,
| ~~~~~~~~~~
9015 | offset ? probefunc : name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [tools/build/Makefile.build:96: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf.o] Error 1
make[4]: *** [Makefile:161: tools/bpf/resolve_btfids/libbpf/staticobjs/libbpf-in.o] Error 2
make[3]: *** [Makefile:45: tools/bpf/resolve_btfids//libbpf/libbpf.a] Error 2
make[2]: *** [Makefile:72: bpf/resolve_btfids] Error 2
make[1]: *** [Makefile:1374: tools/bpf/resolve_btfids] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __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