[t-kristo-pm:usi-5.16-v5-bpf 15/19] drivers/hid/hid-bpf.c:87:52: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://github.com/t-kristo/linux-pm usi-5.16-v5-bpf
head: 82a2c7cbd9682f2664179cd7e01647e46272c316
commit: 8f11b49b2cc9d2bf0e94f43218c8e9de47fd960f [15/19] HID: bpf: change hid_bpf_prog_attach/detach_rdesc to be more generic
config: arm64-randconfig-s031-20211216 (https://download.01.org/0day-ci/archive/20211217/202112170956.AkNj0dHk-lk...)
compiler: aarch64-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://github.com/t-kristo/linux-pm/commit/8f11b49b2cc9d2bf0e94f43218c8e...
git remote add t-kristo-pm https://github.com/t-kristo/linux-pm
git fetch --no-tags t-kristo-pm usi-5.16-v5-bpf
git checkout 8f11b49b2cc9d2bf0e94f43218c8e9de47fd960f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/hid/ drivers/pinctrl/
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/hid/hid-bpf.c:38:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:38:21: sparse: struct bpf_prog_array [noderef] __rcu *
drivers/hid/hid-bpf.c:38:21: sparse: struct bpf_prog_array *
drivers/hid/hid-bpf.c:48:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:48:9: sparse: struct bpf_prog_array [noderef] __rcu *
drivers/hid/hid-bpf.c:48:9: sparse: struct bpf_prog_array *
drivers/hid/hid-bpf.c:68:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:68:20: sparse: struct bpf_prog [noderef] __rcu *
drivers/hid/hid-bpf.c:68:20: sparse: struct bpf_prog *
drivers/hid/hid-bpf.c:68:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:68:20: sparse: struct bpf_prog [noderef] __rcu *
drivers/hid/hid-bpf.c:68:20: sparse: struct bpf_prog *
drivers/hid/hid-bpf.c:83:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct bpf_prog_array **array @@ got struct bpf_prog_array [noderef] __rcu ** @@
drivers/hid/hid-bpf.c:83:59: sparse: expected struct bpf_prog_array **array
drivers/hid/hid-bpf.c:83:59: sparse: got struct bpf_prog_array [noderef] __rcu **
drivers/hid/hid-bpf.c:85:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct bpf_prog_array **array @@ got struct bpf_prog_array [noderef] __rcu ** @@
drivers/hid/hid-bpf.c:85:59: sparse: expected struct bpf_prog_array **array
drivers/hid/hid-bpf.c:85:59: sparse: got struct bpf_prog_array [noderef] __rcu **
>> drivers/hid/hid-bpf.c:87:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct bpf_prog **target @@ got struct bpf_prog [noderef] __rcu ** @@
drivers/hid/hid-bpf.c:87:52: sparse: expected struct bpf_prog **target
drivers/hid/hid-bpf.c:87:52: sparse: got struct bpf_prog [noderef] __rcu **
drivers/hid/hid-bpf.c:109:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:109:21: sparse: struct bpf_prog_array [noderef] __rcu *
drivers/hid/hid-bpf.c:109:21: sparse: struct bpf_prog_array *
drivers/hid/hid-bpf.c:119:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:119:9: sparse: struct bpf_prog_array [noderef] __rcu *
drivers/hid/hid-bpf.c:119:9: sparse: struct bpf_prog_array *
drivers/hid/hid-bpf.c:138:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:138:20: sparse: struct bpf_prog [noderef] __rcu *
drivers/hid/hid-bpf.c:138:20: sparse: struct bpf_prog *
drivers/hid/hid-bpf.c:138:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:138:20: sparse: struct bpf_prog [noderef] __rcu *
drivers/hid/hid-bpf.c:138:20: sparse: struct bpf_prog *
drivers/hid/hid-bpf.c:154:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct bpf_prog_array **array @@ got struct bpf_prog_array [noderef] __rcu ** @@
drivers/hid/hid-bpf.c:154:59: sparse: expected struct bpf_prog_array **array
drivers/hid/hid-bpf.c:154:59: sparse: got struct bpf_prog_array [noderef] __rcu **
drivers/hid/hid-bpf.c:156:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct bpf_prog_array **array @@ got struct bpf_prog_array [noderef] __rcu ** @@
drivers/hid/hid-bpf.c:156:59: sparse: expected struct bpf_prog_array **array
drivers/hid/hid-bpf.c:156:59: sparse: got struct bpf_prog_array [noderef] __rcu **
drivers/hid/hid-bpf.c:158:26: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/hid/hid-bpf.c:158:26: sparse: struct bpf_prog *
drivers/hid/hid-bpf.c:158:26: sparse: struct bpf_prog [noderef] __rcu *
drivers/hid/hid-bpf.c:221:27: sparse: sparse: symbol 'hid_prog_ops' was not declared. Should it be static?
drivers/hid/hid-bpf.c:236:23: sparse: sparse: symbol 'hid_bpf_add_report' was not declared. Should it be static?
drivers/hid/hid-bpf.c:264:6: sparse: sparse: symbol 'hid_bpf_free_reports' was not declared. Should it be static?
drivers/hid/hid-bpf.c:622:31: sparse: sparse: symbol 'hid_verifier_ops' was not declared. Should it be static?
drivers/hid/hid-bpf.c:816:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct bpf_prog const *prog @@ got struct bpf_prog [noderef] __rcu *rdesc_fixup_prog @@
drivers/hid/hid-bpf.c:868:39: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct bpf_prog *prog @@ got struct bpf_prog [noderef] __rcu *rdesc_fixup_prog @@
vim +87 drivers/hid/hid-bpf.c
76
77 static int hid_bpf_prog_attach(struct hid_device *hdev, const union bpf_attr *attr, struct bpf_prog *prog)
78 {
79 int ret;
80
81 switch (attr->attach_type) {
82 case BPF_HID_RAW_EVENT:
83 return __hid_bpf_prog_attach_array(hdev, &hdev->bpf.event_progs, prog);
84 case BPF_HID_KERNEL_EVENT:
85 return __hid_bpf_prog_attach_array(hdev, &hdev->bpf.kevent_progs, prog);
86 case BPF_HID_RDESC_FIXUP:
> 87 ret = __hid_bpf_prog_attach(hdev, &hdev->bpf.rdesc_fixup_prog, prog);
88 if (ret)
89 return ret;
90
91 return hid_reconnect(hdev);
92 }
93
94 return -EINVAL;
95 }
96
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[jimc:v4 1/6] include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared
by kernel test robot
tree: https://github.com/jimc/linux.git v4
head: 89f19988c1d662bed597c2a0f406eaae0841c32e
commit: babbf20e143278c56529e84aa7af61dfb01ff25c [1/6] dyndbg: add _DPRINTK_FLAGS_ENABLED
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20211217/202112170926.nYljKSqG-lk...)
compiler: alpha-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/jimc/linux/commit/babbf20e143278c56529e84aa7af61dfb01f...
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc v4
git checkout babbf20e143278c56529e84aa7af61dfb01ff25c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash lib/
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/linux/string.h:5,
from lib/decompress.c:19:
lib/decompress.c: In function 'decompress_method':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
lib/decompress.c:74:9: note: in expansion of macro 'pr_debug'
74 | pr_debug("Compressed data magic: %#.2x %#.2x\n", inbuf[0], inbuf[1]);
| ^~~~~~~~
include/linux/dynamic_debug.h:128:37: note: each undeclared identifier is reported only once for each function it appears in
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
lib/decompress.c:74:9: note: in expansion of macro 'pr_debug'
74 | pr_debug("Compressed data magic: %#.2x %#.2x\n", inbuf[0], inbuf[1]);
| ^~~~~~~~
--
In file included from include/linux/build_bug.h:5,
from lib/vsprintf.c:21:
include/net/inet_connection_sock.h: In function 'inet_csk_clear_xmit_timer':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
include/net/inet_connection_sock.h:209:17: note: in expansion of macro 'pr_debug'
209 | pr_debug("inet_csk BUG: unknown timer value\n");
| ^~~~~~~~
include/linux/dynamic_debug.h:128:37: note: each undeclared identifier is reported only once for each function it appears in
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
include/net/inet_connection_sock.h:209:17: note: in expansion of macro 'pr_debug'
209 | pr_debug("inet_csk BUG: unknown timer value\n");
| ^~~~~~~~
include/net/inet_connection_sock.h: In function 'inet_csk_reset_xmit_timer':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
include/net/inet_connection_sock.h:223:17: note: in expansion of macro 'pr_debug'
223 | pr_debug("reset_xmit_timer: sk=%p %d when=0x%lx, caller=%p\n",
| ^~~~~~~~
lib/vsprintf.c: In function 'va_format':
lib/vsprintf.c:1694:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1694 | buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
| ^~~
--
In file included from include/linux/kernel.h:11,
from lib/test_kmod.c:27:
lib/test_kmod.c: In function 'kmod_test_done_check':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:168:9: note: in expansion of macro '_dynamic_func_call'
168 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
lib/test_kmod.c:185:9: note: in expansion of macro 'dev_dbg'
185 | dev_dbg(test_dev->dev, "Done thread count: %u\n", test_dev->done);
| ^~~~~~~
include/linux/dynamic_debug.h:128:37: note: each undeclared identifier is reported only once for each function it appears in
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:168:9: note: in expansion of macro '_dynamic_func_call'
168 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
lib/test_kmod.c:185:9: note: in expansion of macro 'dev_dbg'
185 | dev_dbg(test_dev->dev, "Done thread count: %u\n", test_dev->done);
| ^~~~~~~
lib/test_kmod.c: In function 'run_request':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:168:9: note: in expansion of macro '_dynamic_func_call'
168 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
lib/test_kmod.c:237:9: note: in expansion of macro 'dev_dbg'
237 | dev_dbg(test_dev->dev, "Ran thread %u\n", info->thread_idx);
| ^~~~~~~
lib/test_kmod.c: In function 'try_one_request':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:168:9: note: in expansion of macro '_dynamic_func_call'
168 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
lib/test_kmod.c:337:17: note: in expansion of macro 'dev_dbg'
337 | dev_dbg(test_dev->dev, "Kicked off thread %u\n", idx);
| ^~~~~~~
--
In file included from include/linux/init.h:5,
from lib/test_blackhole_dev.c:12:
include/net/inet_connection_sock.h: In function 'inet_csk_clear_xmit_timer':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
include/net/inet_connection_sock.h:209:17: note: in expansion of macro 'pr_debug'
209 | pr_debug("inet_csk BUG: unknown timer value\n");
| ^~~~~~~~
include/linux/dynamic_debug.h:128:37: note: each undeclared identifier is reported only once for each function it appears in
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
include/net/inet_connection_sock.h:209:17: note: in expansion of macro 'pr_debug'
209 | pr_debug("inet_csk BUG: unknown timer value\n");
| ^~~~~~~~
include/net/inet_connection_sock.h: In function 'inet_csk_reset_xmit_timer':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
include/net/inet_connection_sock.h:223:17: note: in expansion of macro 'pr_debug'
223 | pr_debug("reset_xmit_timer: sk=%p %d when=0x%lx, caller=%p\n",
| ^~~~~~~~
lib/test_blackhole_dev.c: In function 'test_blackholedev_init':
lib/test_blackhole_dev.c:32:24: warning: variable 'ethh' set but not used [-Wunused-but-set-variable]
32 | struct ethhdr *ethh;
| ^~~~
--
In file included from include/linux/kernel.h:11,
from lib/percpu-refcount.c:4:
lib/percpu-refcount.c: In function 'percpu_ref_switch_to_atomic_rcu':
>> include/linux/dynamic_debug.h:128:37: error: '_DPRINTK_FLAGS_ENABLE' undeclared (first use in this function)
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
lib/percpu-refcount.c:179:9: note: in expansion of macro 'pr_debug'
179 | pr_debug("global %lu percpu %lu\n",
| ^~~~~~~~
include/linux/dynamic_debug.h:128:37: note: each undeclared identifier is reported only once for each function it appears in
128 | unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/dynamic_debug.h:135:13: note: in expansion of macro 'DYNAMIC_DEBUG_BRANCH'
135 | if (DYNAMIC_DEBUG_BRANCH(id)) \
| ^~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:154:9: note: in expansion of macro '__dynamic_func_call'
154 | __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:164:9: note: in expansion of macro '_dynamic_func_call'
164 | _dynamic_func_call(fmt, __dynamic_pr_debug, \
| ^~~~~~~~~~~~~~~~~~
include/linux/printk.h:574:9: note: in expansion of macro 'dynamic_pr_debug'
574 | dynamic_pr_debug(fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~
lib/percpu-refcount.c:179:9: note: in expansion of macro 'pr_debug'
179 | pr_debug("global %lu percpu %lu\n",
| ^~~~~~~~
..
vim +/_DPRINTK_FLAGS_ENABLE +128 include/linux/dynamic_debug.h
122
123 #ifdef DEBUG
124 #define DYNAMIC_DEBUG_BRANCH(descriptor) \
125 likely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
126 #else
127 #define DYNAMIC_DEBUG_BRANCH(descriptor) \
> 128 unlikely(descriptor.flags & _DPRINTK_FLAGS_ENABLE)
129 #endif
130
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[helgaas-pci:pci/driver-cleanup 14/27] drivers/pci/controller/pcie-mediatek-gen3.c:151: warning: expecting prototype for struct mtk_pcie_port. Prototype was for struct mtk_gen3_pcie instead
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/driver-cleanup
head: aa9d693603e587626f4e7835e5a5585defe7d52f
commit: 54980de2f55d759e2ee0ba80040f7aa4ccac643c [14/27] PCI: mediatek-gen3: Rename struct mtk_pcie_port to mtk_gen_pcie
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20211217/202112170916.II7BBAEo-lk...)
compiler: alpha-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://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?i...
git remote add helgaas-pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
git fetch --no-tags helgaas-pci pci/driver-cleanup
git checkout 54980de2f55d759e2ee0ba80040f7aa4ccac643c
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/pci/controller/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/pcie-mediatek-gen3.c:151: warning: expecting prototype for struct mtk_pcie_port. Prototype was for struct mtk_gen3_pcie instead
vim +151 drivers/pci/controller/pcie-mediatek-gen3.c
1bdafba538be70 Jianjun Wang 2021-04-20 111
d3bf75b579b980 Jianjun Wang 2021-04-20 112 /**
d3bf75b579b980 Jianjun Wang 2021-04-20 113 * struct mtk_pcie_port - PCIe port information
d3bf75b579b980 Jianjun Wang 2021-04-20 114 * @dev: pointer to PCIe device
d3bf75b579b980 Jianjun Wang 2021-04-20 115 * @base: IO mapped register base
d3bf75b579b980 Jianjun Wang 2021-04-20 116 * @reg_base: physical register base
d3bf75b579b980 Jianjun Wang 2021-04-20 117 * @mac_reset: MAC reset control
d3bf75b579b980 Jianjun Wang 2021-04-20 118 * @phy_reset: PHY reset control
d3bf75b579b980 Jianjun Wang 2021-04-20 119 * @phy: PHY controller block
d3bf75b579b980 Jianjun Wang 2021-04-20 120 * @clks: PCIe clocks
d3bf75b579b980 Jianjun Wang 2021-04-20 121 * @num_clks: PCIe clocks count for this port
814cceebba9b7d Jianjun Wang 2021-04-20 122 * @irq: PCIe controller interrupt number
d537dc125f0756 Jianjun Wang 2021-04-20 123 * @saved_irq_state: IRQ enable state saved at suspend time
814cceebba9b7d Jianjun Wang 2021-04-20 124 * @irq_lock: lock protecting IRQ register access
814cceebba9b7d Jianjun Wang 2021-04-20 125 * @intx_domain: legacy INTx IRQ domain
1bdafba538be70 Jianjun Wang 2021-04-20 126 * @msi_domain: MSI IRQ domain
1bdafba538be70 Jianjun Wang 2021-04-20 127 * @msi_bottom_domain: MSI IRQ bottom domain
1bdafba538be70 Jianjun Wang 2021-04-20 128 * @msi_sets: MSI sets information
1bdafba538be70 Jianjun Wang 2021-04-20 129 * @lock: lock protecting IRQ bit map
1bdafba538be70 Jianjun Wang 2021-04-20 130 * @msi_irq_in_use: bit map for assigned MSI IRQ
d3bf75b579b980 Jianjun Wang 2021-04-20 131 */
54980de2f55d75 Fan Fei 2021-11-27 132 struct mtk_gen3_pcie {
d3bf75b579b980 Jianjun Wang 2021-04-20 133 struct device *dev;
d3bf75b579b980 Jianjun Wang 2021-04-20 134 void __iomem *base;
d3bf75b579b980 Jianjun Wang 2021-04-20 135 phys_addr_t reg_base;
d3bf75b579b980 Jianjun Wang 2021-04-20 136 struct reset_control *mac_reset;
d3bf75b579b980 Jianjun Wang 2021-04-20 137 struct reset_control *phy_reset;
d3bf75b579b980 Jianjun Wang 2021-04-20 138 struct phy *phy;
d3bf75b579b980 Jianjun Wang 2021-04-20 139 struct clk_bulk_data *clks;
d3bf75b579b980 Jianjun Wang 2021-04-20 140 int num_clks;
814cceebba9b7d Jianjun Wang 2021-04-20 141
814cceebba9b7d Jianjun Wang 2021-04-20 142 int irq;
d537dc125f0756 Jianjun Wang 2021-04-20 143 u32 saved_irq_state;
814cceebba9b7d Jianjun Wang 2021-04-20 144 raw_spinlock_t irq_lock;
814cceebba9b7d Jianjun Wang 2021-04-20 145 struct irq_domain *intx_domain;
1bdafba538be70 Jianjun Wang 2021-04-20 146 struct irq_domain *msi_domain;
1bdafba538be70 Jianjun Wang 2021-04-20 147 struct irq_domain *msi_bottom_domain;
1bdafba538be70 Jianjun Wang 2021-04-20 148 struct mtk_msi_set msi_sets[PCIE_MSI_SET_NUM];
1bdafba538be70 Jianjun Wang 2021-04-20 149 struct mutex lock;
1bdafba538be70 Jianjun Wang 2021-04-20 150 DECLARE_BITMAP(msi_irq_in_use, PCIE_MSI_IRQS_NUM);
d3bf75b579b980 Jianjun Wang 2021-04-20 @151 };
d3bf75b579b980 Jianjun Wang 2021-04-20 152
:::::: The code at line 151 was first introduced by commit
:::::: d3bf75b579b980b9d83a76d3b4d8bfb9f55b24ca PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192
:::::: TO: Jianjun Wang <jianjun.wang(a)mediatek.com>
:::::: CC: Lorenzo Pieralisi <lorenzo.pieralisi(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[RFC PATCH intel-tdx] KVM: TDX: fix duplicated inclusion
by kernel test robot
Generated by: scripts/checkincludes.pl
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
tdx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/tdx.c b/arch/x86/kvm/vmx/tdx.c
index 559e06a6420aa..26bbda183b2f3 100644
--- a/arch/x86/kvm/vmx/tdx.c
+++ b/arch/x86/kvm/vmx/tdx.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/cpu.h>
-#include <linux/mmu_context.h>
#include <linux/kvm_host.h>
#include <linux/jump_label.h>
#include <linux/trace_events.h>
@@ -9,7 +8,6 @@
#include <linux/perf_event.h>
#include <linux/freelist.h>
-#include <asm/fpu/xcr.h>
#include <asm/virtext.h>
#include <asm/fpu/xcr.h>
9 months, 1 week
[intel-tdx:kvm-upstream 124/152] arch/x86/kvm/vmx/tdx_stubs.c:20:6: error: no previous prototype for 'tdx_is_emulated_msr'
by kernel test robot
tree: https://github.com/intel/tdx.git kvm-upstream
head: bdfe06c17daab60c196ff80c1d98467a1d3734fa
commit: 99eb8f4e0badbe0b353a53c07bbb43879cbd10a9 [124/152] KVM: TDX: Implement callbacks for MSR operations for TDX
config: i386-randconfig-m021-20211216 (https://download.01.org/0day-ci/archive/20211217/202112170856.QcwFDYIN-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/99eb8f4e0badbe0b353a53c07bbb43879cbd10a9
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream
git checkout 99eb8f4e0badbe0b353a53c07bbb43879cbd10a9
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/kvm/vmx/tdx_stubs.c:4:13: error: no previous prototype for 'tdx_pre_kvm_init' [-Werror=missing-prototypes]
4 | void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:6:12: error: no previous prototype for 'tdx_hardware_setup' [-Werror=missing-prototypes]
6 | int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:7:6: error: no previous prototype for 'tdx_hardware_enable' [-Werror=missing-prototypes]
7 | void tdx_hardware_enable(void) {}
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:8:6: error: no previous prototype for 'tdx_hardware_disable' [-Werror=missing-prototypes]
8 | void tdx_hardware_disable(void) {}
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:10:5: error: no previous prototype for 'tdx_vcpu_create' [-Werror=missing-prototypes]
10 | int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:11:6: error: no previous prototype for 'tdx_vcpu_free' [-Werror=missing-prototypes]
11 | void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:12:6: error: no previous prototype for 'tdx_vcpu_reset' [-Werror=missing-prototypes]
12 | void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
| ^~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:13:12: error: no previous prototype for 'tdx_vcpu_run' [-Werror=missing-prototypes]
13 | fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
| ^~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:14:6: error: no previous prototype for 'tdx_vcpu_load' [-Werror=missing-prototypes]
14 | void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
| ^~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:15:6: error: no previous prototype for 'tdx_vcpu_put' [-Werror=missing-prototypes]
15 | void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:16:6: error: no previous prototype for 'tdx_prepare_switch_to_guest' [-Werror=missing-prototypes]
16 | void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:17:6: error: no previous prototype for 'tdx_handle_exit_irqoff' [-Werror=missing-prototypes]
17 | void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:18:5: error: no previous prototype for 'tdx_handle_exit' [-Werror=missing-prototypes]
18 | int tdx_handle_exit(struct kvm_vcpu *vcpu,
| ^~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:20:6: error: no previous prototype for 'tdx_is_emulated_msr' [-Werror=missing-prototypes]
20 | bool tdx_is_emulated_msr(u32 index, bool write) { return false; }
| ^~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:21:5: error: no previous prototype for 'tdx_get_msr' [-Werror=missing-prototypes]
21 | int tdx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
| ^~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:22:5: error: no previous prototype for 'tdx_set_msr' [-Werror=missing-prototypes]
22 | int tdx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
| ^~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:24:6: error: no previous prototype for 'tdx_apicv_post_state_restore' [-Werror=missing-prototypes]
24 | void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:25:5: error: no previous prototype for 'tdx_deliver_posted_interrupt' [-Werror=missing-prototypes]
25 | int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:26:6: error: no previous prototype for 'tdx_get_exit_info' [-Werror=missing-prototypes]
26 | void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason,
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:29:5: error: no previous prototype for 'tdx_dev_ioctl' [-Werror=missing-prototypes]
29 | int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:30:5: error: no previous prototype for 'tdx_vm_ioctl' [-Werror=missing-prototypes]
30 | int tdx_vm_ioctl(struct kvm *kvm, void __user *argp) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:31:5: error: no previous prototype for 'tdx_vcpu_ioctl' [-Werror=missing-prototypes]
31 | int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
| ^~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c: In function 'tdx_vcpu_ioctl':
arch/x86/kvm/vmx/tdx_stubs.c:31:72: error: 'ENOPNOTSUPP' undeclared (first use in this function); did you mean 'EOPNOTSUPP'?
31 | int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
| ^~~~~~~~~~~
| EOPNOTSUPP
arch/x86/kvm/vmx/tdx_stubs.c:31:72: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/kvm/vmx/tdx_stubs.c: At top level:
arch/x86/kvm/vmx/tdx_stubs.c:33:6: error: no previous prototype for 'tdx_flush_tlb' [-Werror=missing-prototypes]
33 | void tdx_flush_tlb(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:34:6: error: no previous prototype for 'tdx_load_mmu_pgd' [-Werror=missing-prototypes]
34 | void tdx_load_mmu_pgd(struct kvm_vcpu *vcpu, hpa_t root_hpa, int root_level) {}
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c: In function 'tdx_vcpu_ioctl':
arch/x86/kvm/vmx/tdx_stubs.c:31:85: error: control reaches end of non-void function [-Werror=return-type]
31 | int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
| ^
cc1: all warnings being treated as errors
vim +/tdx_is_emulated_msr +20 arch/x86/kvm/vmx/tdx_stubs.c
9
10 int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
11 void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
12 void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
13 fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
14 void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
15 void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
> 16 void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
> 17 void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
> 18 int tdx_handle_exit(struct kvm_vcpu *vcpu,
19 enum exit_fastpath_completion fastpath) { return 0; }
> 20 bool tdx_is_emulated_msr(u32 index, bool write) { return false; }
> 21 int tdx_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
> 22 int tdx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr) { return 1; }
23
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH nf v3] netfilter: nat: force port remap to prevent shadowing well-known ports
by kernel test robot
Hi Florian,
I love your patch! Yet something to improve:
[auto build test ERROR on nf/master]
url: https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-nat-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: arm-randconfig-r005-20211216 (https://download.01.org/0day-ci/archive/20211217/202112170757.knetsZWh-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dd245bab9fbb364faa1581e4f92ba3119a872fba)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/cc216934b951862fcd3ea10c9bef2eecd...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Florian-Westphal/netfilter-nat-force-port-remap-to-prevent-shadowing-well-known-ports/20211216-232930
git checkout cc216934b951862fcd3ea10c9bef2eecd84d8e6f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm 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/nf_nat_core.c:550:11: error: no member named 'local_origin' in 'struct nf_conn'
!ct->local_origin)
~~ ^
1 error generated.
vim +550 net/netfilter/nf_nat_core.c
528
529 /* Manipulate the tuple into the range given. For NF_INET_POST_ROUTING,
530 * we change the source to map into the range. For NF_INET_PRE_ROUTING
531 * and NF_INET_LOCAL_OUT, we change the destination to map into the
532 * range. It might not be possible to get a unique tuple, but we try.
533 * At worst (or if we race), we will end up with a final duplicate in
534 * __nf_conntrack_confirm and drop the packet. */
535 static void
536 get_unique_tuple(struct nf_conntrack_tuple *tuple,
537 const struct nf_conntrack_tuple *orig_tuple,
538 const struct nf_nat_range2 *range,
539 struct nf_conn *ct,
540 enum nf_nat_manip_type maniptype)
541 {
542 bool random_port = range->flags & NF_NAT_RANGE_PROTO_RANDOM_ALL;
543 const struct nf_conntrack_zone *zone;
544 struct net *net = nf_ct_net(ct);
545
546 zone = nf_ct_zone(ct);
547
548 if (maniptype == NF_NAT_MANIP_SRC &&
549 !random_port &&
> 550 !ct->local_origin)
551 random_port = tuple_force_port_remap(orig_tuple);
552
553 /* 1) If this srcip/proto/src-proto-part is currently mapped,
554 * and that same mapping gives a unique tuple within the given
555 * range, use that.
556 *
557 * This is only required for source (ie. NAT/masq) mappings.
558 * So far, we don't do local source mappings, so multiple
559 * manips not an issue.
560 */
561 if (maniptype == NF_NAT_MANIP_SRC && !random_port) {
562 /* try the original tuple first */
563 if (in_range(orig_tuple, range)) {
564 if (!nf_nat_used_tuple(orig_tuple, ct)) {
565 *tuple = *orig_tuple;
566 return;
567 }
568 } else if (find_appropriate_src(net, zone,
569 orig_tuple, tuple, range)) {
570 pr_debug("get_unique_tuple: Found current src map\n");
571 if (!nf_nat_used_tuple(tuple, ct))
572 return;
573 }
574 }
575
576 /* 2) Select the least-used IP/proto combination in the given range */
577 *tuple = *orig_tuple;
578 find_best_ips_proto(zone, tuple, range, ct, maniptype);
579
580 /* 3) The per-protocol part of the manip is made to map into
581 * the range to make a unique tuple.
582 */
583
584 /* Only bother mapping if it's not already in range and unique */
585 if (!random_port) {
586 if (range->flags & NF_NAT_RANGE_PROTO_SPECIFIED) {
587 if (!(range->flags & NF_NAT_RANGE_PROTO_OFFSET) &&
588 l4proto_in_range(tuple, maniptype,
589 &range->min_proto,
590 &range->max_proto) &&
591 (range->min_proto.all == range->max_proto.all ||
592 !nf_nat_used_tuple(tuple, ct)))
593 return;
594 } else if (!nf_nat_used_tuple(tuple, ct)) {
595 return;
596 }
597 }
598
599 /* Last chance: get protocol to try to obtain unique tuple. */
600 nf_nat_l4proto_unique_tuple(tuple, range, maniptype, ct);
601 }
602
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH] c/r: prctl: Remove PR_SET_MM_EXE_FILE old file mapping restriction
by kernel test robot
Hi Keno,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on hnaz-mm/master linus/master v5.16-rc5 next-20211215]
[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/Keno-Fischer/c-r-prctl-Remove-PR...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 136057256686de39cc3a07c2e39ef6bc43003ff6
config: mips-randconfig-s031-20211216 (https://download.01.org/0day-ci/archive/20211217/202112170623.8IdZgt6d-lk...)
compiler: mips64el-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://github.com/0day-ci/linux/commit/08f30df401c936e27733e3b37765c2b7d...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Keno-Fischer/c-r-prctl-Remove-PR_SET_MM_EXE_FILE-old-file-mapping-restriction/20211215-142515
git checkout 08f30df401c936e27733e3b37765c2b7d35fe0e7
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
>> kernel/fork.c:1215:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct file *old_exe_file @@ got struct file [noderef] __rcu *[assigned] __res @@
kernel/fork.c:1215:22: sparse: expected struct file *old_exe_file
kernel/fork.c:1215:22: sparse: got struct file [noderef] __rcu *[assigned] __res
kernel/fork.c:1572:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:1572:38: sparse: expected struct refcount_struct [usertype] *r
kernel/fork.c:1572:38: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:1581:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1581:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1581:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1582:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *q @@ got struct k_sigaction [noderef] __rcu * @@
kernel/fork.c:1582:36: sparse: expected void const *q
kernel/fork.c:1582:36: sparse: got struct k_sigaction [noderef] __rcu *
kernel/fork.c:1583:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1583:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1583:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1676:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct qspinlock *lock @@ got struct qspinlock [noderef] __rcu * @@
kernel/fork.c:1676:9: sparse: expected struct qspinlock *lock
kernel/fork.c:1676:9: sparse: got struct qspinlock [noderef] __rcu *
kernel/fork.c:1995:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1995:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1995:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:1999:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:1999:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:1999:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2304:32: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct [noderef] __rcu *real_parent @@ got struct task_struct *task @@
kernel/fork.c:2304:32: sparse: expected struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2304:32: sparse: got struct task_struct *task
kernel/fork.c:2313:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2313:27: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2313:27: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2362:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct list_head *head @@ got struct list_head [noderef] __rcu * @@
kernel/fork.c:2362:54: sparse: expected struct list_head *head
kernel/fork.c:2362:54: sparse: got struct list_head [noderef] __rcu *
kernel/fork.c:2383:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2383:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2383:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2401:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2401:29: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2401:29: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2428:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sighand_struct *sighand @@ got struct sighand_struct [noderef] __rcu *sighand @@
kernel/fork.c:2428:28: sparse: expected struct sighand_struct *sighand
kernel/fork.c:2428:28: sparse: got struct sighand_struct [noderef] __rcu *sighand
kernel/fork.c:2456:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2456:31: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2456:31: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2458:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct spinlock [usertype] *lock @@ got struct spinlock [noderef] __rcu * @@
kernel/fork.c:2458:33: sparse: expected struct spinlock [usertype] *lock
kernel/fork.c:2458:33: sparse: got struct spinlock [noderef] __rcu *
kernel/fork.c:2867:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *[assigned] parent @@ got struct task_struct [noderef] __rcu *real_parent @@
kernel/fork.c:2867:24: sparse: expected struct task_struct *[assigned] parent
kernel/fork.c:2867:24: sparse: got struct task_struct [noderef] __rcu *real_parent
kernel/fork.c:2948:43: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct refcount_struct const [usertype] *r @@ got struct refcount_struct [noderef] __rcu * @@
kernel/fork.c:2948:43: sparse: expected struct refcount_struct const [usertype] *r
kernel/fork.c:2948:43: sparse: got struct refcount_struct [noderef] __rcu *
kernel/fork.c:2039:22: sparse: sparse: dereference of noderef expression
kernel/fork.c: note: in included file (through include/uapi/asm-generic/bpf_perf_event.h, arch/mips/include/generated/uapi/asm/bpf_perf_event.h, ...):
include/linux/ptrace.h:218:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *new_parent @@ got struct task_struct [noderef] __rcu *parent @@
include/linux/ptrace.h:218:45: sparse: expected struct task_struct *new_parent
include/linux/ptrace.h:218:45: sparse: got struct task_struct [noderef] __rcu *parent
include/linux/ptrace.h:218:62: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct cred const *ptracer_cred @@ got struct cred const [noderef] __rcu *ptracer_cred @@
include/linux/ptrace.h:218:62: sparse: expected struct cred const *ptracer_cred
include/linux/ptrace.h:218:62: sparse: got struct cred const [noderef] __rcu *ptracer_cred
kernel/fork.c:2360:59: sparse: sparse: dereference of noderef expression
kernel/fork.c:2361:59: sparse: sparse: dereference of noderef expression
vim +1215 kernel/fork.c
3864601387cf419 Jiri Slaby 2011-05-26 1194
35d7bdc86031a2c David Hildenbrand 2021-04-23 1195 /**
35d7bdc86031a2c David Hildenbrand 2021-04-23 1196 * replace_mm_exe_file - replace a reference to the mm's executable file
35d7bdc86031a2c David Hildenbrand 2021-04-23 1197 *
35d7bdc86031a2c David Hildenbrand 2021-04-23 1198 * This changes mm's executable file (shown as symlink /proc/[pid]/exe),
35d7bdc86031a2c David Hildenbrand 2021-04-23 1199 * dealing with concurrent invocation and without grabbing the mmap lock in
35d7bdc86031a2c David Hildenbrand 2021-04-23 1200 * write mode.
35d7bdc86031a2c David Hildenbrand 2021-04-23 1201 *
35d7bdc86031a2c David Hildenbrand 2021-04-23 1202 * Main user is sys_prctl(PR_SET_MM_MAP/EXE_FILE).
35d7bdc86031a2c David Hildenbrand 2021-04-23 1203 */
35d7bdc86031a2c David Hildenbrand 2021-04-23 1204 int replace_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file)
35d7bdc86031a2c David Hildenbrand 2021-04-23 1205 {
35d7bdc86031a2c David Hildenbrand 2021-04-23 1206 struct file *old_exe_file;
35d7bdc86031a2c David Hildenbrand 2021-04-23 1207 int ret = 0;
35d7bdc86031a2c David Hildenbrand 2021-04-23 1208
35d7bdc86031a2c David Hildenbrand 2021-04-23 1209 /* set the new file, lockless */
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1210 ret = deny_write_access(new_exe_file);
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1211 if (ret)
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1212 return -EACCES;
35d7bdc86031a2c David Hildenbrand 2021-04-23 1213 get_file(new_exe_file);
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1214
35d7bdc86031a2c David Hildenbrand 2021-04-23 @1215 old_exe_file = xchg(&mm->exe_file, new_exe_file);
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1216 if (old_exe_file) {
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1217 /*
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1218 * Don't race with dup_mmap() getting the file and disallowing
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1219 * write access while someone might open the file writable.
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1220 */
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1221 mmap_read_lock(mm);
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1222 allow_write_access(old_exe_file);
35d7bdc86031a2c David Hildenbrand 2021-04-23 1223 fput(old_exe_file);
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1224 mmap_read_unlock(mm);
fe69d560b5bd9ec David Hildenbrand 2021-04-23 1225 }
35d7bdc86031a2c David Hildenbrand 2021-04-23 1226 return 0;
35d7bdc86031a2c David Hildenbrand 2021-04-23 1227 }
3864601387cf419 Jiri Slaby 2011-05-26 1228
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[intel-tdx:kvm-upstream 116/152] arch/x86/kvm/vmx/tdx_stubs.c:17:6: error: no previous prototype for 'tdx_handle_exit_irqoff'
by kernel test robot
tree: https://github.com/intel/tdx.git kvm-upstream
head: bdfe06c17daab60c196ff80c1d98467a1d3734fa
commit: 23fe81f995e342b4152daa56cad4105a72277d4f [116/152] KVM: TDX: Add a place holder to handle TDX VM exit
config: i386-randconfig-m021-20211216 (https://download.01.org/0day-ci/archive/20211217/202112170620.S56iYOua-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/23fe81f995e342b4152daa56cad4105a72277d4f
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream
git checkout 23fe81f995e342b4152daa56cad4105a72277d4f
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/kvm/vmx/tdx_stubs.c:4:13: error: no previous prototype for 'tdx_pre_kvm_init' [-Werror=missing-prototypes]
4 | void __init tdx_pre_kvm_init(unsigned int *vcpu_size,
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:6:12: error: no previous prototype for 'tdx_hardware_setup' [-Werror=missing-prototypes]
6 | int __init tdx_hardware_setup(struct kvm_x86_ops *x86_ops) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:7:6: error: no previous prototype for 'tdx_hardware_enable' [-Werror=missing-prototypes]
7 | void tdx_hardware_enable(void) {}
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:8:6: error: no previous prototype for 'tdx_hardware_disable' [-Werror=missing-prototypes]
8 | void tdx_hardware_disable(void) {}
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:10:5: error: no previous prototype for 'tdx_vcpu_create' [-Werror=missing-prototypes]
10 | int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:11:6: error: no previous prototype for 'tdx_vcpu_free' [-Werror=missing-prototypes]
11 | void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:12:6: error: no previous prototype for 'tdx_vcpu_reset' [-Werror=missing-prototypes]
12 | void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
| ^~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:13:12: error: no previous prototype for 'tdx_vcpu_run' [-Werror=missing-prototypes]
13 | fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
| ^~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:14:6: error: no previous prototype for 'tdx_vcpu_load' [-Werror=missing-prototypes]
14 | void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
| ^~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:15:6: error: no previous prototype for 'tdx_vcpu_put' [-Werror=missing-prototypes]
15 | void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:16:6: error: no previous prototype for 'tdx_prepare_switch_to_guest' [-Werror=missing-prototypes]
16 | void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:17:6: error: no previous prototype for 'tdx_handle_exit_irqoff' [-Werror=missing-prototypes]
17 | void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:18:5: error: no previous prototype for 'tdx_handle_exit' [-Werror=missing-prototypes]
18 | int tdx_handle_exit(struct kvm_vcpu *vcpu,
| ^~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:21:6: error: no previous prototype for 'tdx_apicv_post_state_restore' [-Werror=missing-prototypes]
21 | void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:22:5: error: no previous prototype for 'tdx_deliver_posted_interrupt' [-Werror=missing-prototypes]
22 | int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/vmx/tdx_stubs.c:23:6: error: no previous prototype for 'tdx_get_exit_info' [-Werror=missing-prototypes]
23 | void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason,
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:26:5: error: no previous prototype for 'tdx_dev_ioctl' [-Werror=missing-prototypes]
26 | int tdx_dev_ioctl(void __user *argp) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:27:5: error: no previous prototype for 'tdx_vm_ioctl' [-Werror=missing-prototypes]
27 | int tdx_vm_ioctl(struct kvm *kvm, void __user *argp) { return -EOPNOTSUPP; }
| ^~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:28:5: error: no previous prototype for 'tdx_vcpu_ioctl' [-Werror=missing-prototypes]
28 | int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
| ^~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c: In function 'tdx_vcpu_ioctl':
arch/x86/kvm/vmx/tdx_stubs.c:28:72: error: 'ENOPNOTSUPP' undeclared (first use in this function); did you mean 'EOPNOTSUPP'?
28 | int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
| ^~~~~~~~~~~
| EOPNOTSUPP
arch/x86/kvm/vmx/tdx_stubs.c:28:72: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/kvm/vmx/tdx_stubs.c: At top level:
arch/x86/kvm/vmx/tdx_stubs.c:30:6: error: no previous prototype for 'tdx_flush_tlb' [-Werror=missing-prototypes]
30 | void tdx_flush_tlb(struct kvm_vcpu *vcpu) {}
| ^~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c:31:6: error: no previous prototype for 'tdx_load_mmu_pgd' [-Werror=missing-prototypes]
31 | void tdx_load_mmu_pgd(struct kvm_vcpu *vcpu, hpa_t root_hpa, int root_level) {}
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/vmx/tdx_stubs.c: In function 'tdx_vcpu_ioctl':
arch/x86/kvm/vmx/tdx_stubs.c:28:85: error: control reaches end of non-void function [-Werror=return-type]
28 | int tdx_vcpu_ioctl(struct kvm_vcpu *vcpu, void __user *argp) { return -ENOPNOTSUPP; }
| ^
cc1: all warnings being treated as errors
vim +/tdx_handle_exit_irqoff +17 arch/x86/kvm/vmx/tdx_stubs.c
9
10 int tdx_vcpu_create(struct kvm_vcpu *vcpu) { return -EOPNOTSUPP; }
11 void tdx_vcpu_free(struct kvm_vcpu *vcpu) {}
12 void tdx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event) {}
13 fastpath_t tdx_vcpu_run(struct kvm_vcpu *vcpu) { return EXIT_FASTPATH_NONE; }
> 14 void tdx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) {}
> 15 void tdx_vcpu_put(struct kvm_vcpu *vcpu) {}
16 void tdx_prepare_switch_to_guest(struct kvm_vcpu *vcpu) {}
> 17 void tdx_handle_exit_irqoff(struct kvm_vcpu *vcpu) {}
> 18 int tdx_handle_exit(struct kvm_vcpu *vcpu,
19 enum exit_fastpath_completion fastpath) { return 0; }
20
21 void tdx_apicv_post_state_restore(struct kvm_vcpu *vcpu) {}
22 int tdx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector) { return 0; }
> 23 void tdx_get_exit_info(struct kvm_vcpu *vcpu, u32 *reason,
24 u64 *info1, u64 *info2, u32 *intr_info, u32 *error_code) {}
25
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week