[linux-stable-rc:linux-5.6.y 1567/1864] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2623:29: warning: variable 'stream_status' set but not used
by kernel test robot
Hi Anthony,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.6.y
head: 61aba373f5708f2aebc3f72078e51949a068aa6f
commit: 5fc20b04d12c0827dbf498532e8a736a1f88ad6f [1567/1864] drm/amd/display: Split program front end part that occur outside lock
config: i386-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
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/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:72:6: warning: no previous prototype for 'print_microsec' [-Wmissing-prototypes]
72 | void print_microsec(struct dc_context *dc_ctx,
| ^~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:126:6: warning: no previous prototype for 'dcn10_log_hubbub_state' [-Wmissing-prototypes]
126 | void dcn10_log_hubbub_state(struct dc *dc, struct dc_log_buffer_ctx *log_ctx)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:1878:6: warning: no previous prototype for 'dcn10_program_pte_vm' [-Wmissing-prototypes]
1878 | void dcn10_program_pte_vm(struct dce_hwseq *hws, struct hubp *hubp)
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In function 'dcn10_post_unlock_program_front_end':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2623:29: warning: variable 'stream_status' set but not used [-Wunused-but-set-variable]
2623 | struct dc_stream_status *stream_status = NULL;
| ^~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:85,
from drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dc_common.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:28:
At top level:
drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/dpp.h:50:42: warning: 'dpp_input_csc_matrix' defined but not used [-Wunused-const-variable=]
50 | static const struct dpp_input_csc_matrix dpp_input_csc_matrix[] = {
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dc_common.h:29,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:28:
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:124:22: warning: 'DP_DVI_CONVERTER_ID_4' defined but not used [-Wunused-const-variable=]
124 | static const uint8_t DP_DVI_CONVERTER_ID_4[] = "m2DVIa";
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:122:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_3' defined but not used [-Wunused-const-variable=]
122 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_3[] = "dnomlA";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:120:22: warning: 'DP_VGA_LVDS_CONVERTER_ID_2' defined but not used [-Wunused-const-variable=]
120 | static const uint8_t DP_VGA_LVDS_CONVERTER_ID_2[] = "sivarT";
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:37,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:27:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
vim +/stream_status +2623 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c
2608
2609 void dcn10_post_unlock_program_front_end(
2610 struct dc *dc,
2611 struct dc_state *context)
2612 {
2613 int i, j;
2614
2615 DC_LOGGER_INIT(dc->ctx->logger);
2616
2617 for (i = 0; i < dc->res_pool->pipe_count; i++) {
2618 struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
2619
2620 if (!pipe_ctx->top_pipe &&
2621 !pipe_ctx->prev_odm_pipe &&
2622 pipe_ctx->stream) {
> 2623 struct dc_stream_status *stream_status = NULL;
2624 struct timing_generator *tg = pipe_ctx->stream_res.tg;
2625
2626 for (j = 0; j < context->stream_count; j++) {
2627 if (pipe_ctx->stream == context->streams[j])
2628 stream_status = &context->stream_status[j];
2629 }
2630
2631 if (context->stream_status[i].plane_count == 0)
2632 false_optc_underflow_wa(dc, pipe_ctx->stream, tg);
2633 }
2634 }
2635
2636 for (i = 0; i < dc->res_pool->pipe_count; i++)
2637 if (context->res_ctx.pipe_ctx[i].update_flags.bits.disable)
2638 dc->hwss.disable_plane(dc, &dc->current_state->res_ctx.pipe_ctx[i]);
2639
2640 for (i = 0; i < dc->res_pool->pipe_count; i++)
2641 if (context->res_ctx.pipe_ctx[i].update_flags.bits.disable) {
2642 dc->hwss.optimize_bandwidth(dc, context);
2643 break;
2644 }
2645
2646 if (dc->hwseq->wa.DEGVIDCN10_254)
2647 hubbub1_wm_change_req_wa(dc->res_pool->hubbub);
2648 }
2649
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH v2 bpf-next 3/8] bpf, xdp: add bpf_link-based XDP attachment API
by kernel test robot
Hi Andrii,
I love your patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/BPF-XDP-link/202...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-defconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>):
>> net/core/dev.c:8717:18: error: field has incomplete type 'struct bpf_link'
struct bpf_link link;
^
include/net/netns/bpf.h:15:9: note: forward declaration of 'struct bpf_link'
struct bpf_link *links[MAX_NETNS_BPF_ATTACH_TYPE];
^
>> net/core/dev.c:8992:34: error: variable has incomplete type 'const struct bpf_link_ops'
static const struct bpf_link_ops bpf_xdp_link_lops = {
^
net/core/dev.c:8992:21: note: forward declaration of 'struct bpf_link_ops'
static const struct bpf_link_ops bpf_xdp_link_lops = {
^
>> net/core/dev.c:9000:25: error: variable has incomplete type 'struct bpf_link_primer'
struct bpf_link_primer link_primer;
^
net/core/dev.c:9000:9: note: forward declaration of 'struct bpf_link_primer'
struct bpf_link_primer link_primer;
^
>> net/core/dev.c:9015:2: error: implicit declaration of function 'bpf_link_init' [-Werror,-Wimplicit-function-declaration]
bpf_link_init(&link->link, BPF_LINK_TYPE_XDP, &bpf_xdp_link_lops, prog);
^
net/core/dev.c:9015:2: note: did you mean 'bio_list_init'?
include/linux/bio.h:575:20: note: 'bio_list_init' declared here
static inline void bio_list_init(struct bio_list *bl)
^
>> net/core/dev.c:9019:8: error: implicit declaration of function 'bpf_link_prime' [-Werror,-Wimplicit-function-declaration]
err = bpf_link_prime(&link->link, &link_primer);
^
net/core/dev.c:9019:8: note: did you mean 'bpf_link_init'?
net/core/dev.c:9015:2: note: 'bpf_link_init' declared here
bpf_link_init(&link->link, BPF_LINK_TYPE_XDP, &bpf_xdp_link_lops, prog);
^
>> net/core/dev.c:9030:3: error: implicit declaration of function 'bpf_link_cleanup' [-Werror,-Wimplicit-function-declaration]
bpf_link_cleanup(&link_primer);
^
net/core/dev.c:9030:3: note: did you mean 'tcf_idr_cleanup'?
include/net/act_api.h:171:6: note: 'tcf_idr_cleanup' declared here
void tcf_idr_cleanup(struct tc_action_net *tn, u32 index);
^
>> net/core/dev.c:9034:7: error: implicit declaration of function 'bpf_link_settle' [-Werror,-Wimplicit-function-declaration]
fd = bpf_link_settle(&link_primer);
^
7 errors generated.
vim +8717 net/core/dev.c
8715
8716 struct bpf_xdp_link {
> 8717 struct bpf_link link;
8718 struct net_device *dev; /* protected by rtnl_lock, no refcnt held */
8719 int flags;
8720 };
8721
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next 4/4] bpf: try to use existing cgroup storage in bpf_prog_test_run_skb
by kernel test robot
Hi Dmitry,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Dmitry-Yakunin/bpf-cgroup-skb-im...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: microblaze-randconfig-s031-20200714 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.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.2-41-g14e84ffc-dirty
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=microblaze
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 >>)
>> net/bpf/test_run.c:25:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> net/bpf/test_run.c:25:17: sparse: struct bpf_prog_array [noderef] __rcu *
>> net/bpf/test_run.c:25:17: sparse: struct bpf_prog_array *
net/bpf/test_run.c:50:46: sparse: sparse: using member 'effective' in incomplete struct cgroup_bpf
net/bpf/test_run.c:53:54: sparse: sparse: using member 'effective' in incomplete struct cgroup_bpf
net/bpf/test_run.c:67:15: sparse: sparse: undefined identifier 'bpf_cgroup_storages_alloc'
net/bpf/test_run.c:115:9: sparse: sparse: undefined identifier 'bpf_cgroup_storages_free'
vim +25 net/bpf/test_run.c
17
18 static struct bpf_prog_array_item *bpf_prog_find_active(struct bpf_prog *prog,
19 struct bpf_prog_array *effective)
20 {
21 struct bpf_prog_array_item *item;
22 struct bpf_prog_array *array;
23 struct bpf_prog *p;
24
> 25 array = rcu_dereference(effective);
26 if (!array)
27 return NULL;
28
29 item = &array->items[0];
30 while ((p = READ_ONCE(item->prog))) {
31 if (p == prog)
32 return item;
33 item++;
34 }
35
36 return NULL;
37 }
38
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH v2 bpf-next 4/8] bpf, xdp: implement LINK_UPDATE for BPF XDP link
by kernel test robot
Hi Andrii,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/BPF-XDP-link/202...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: alpha-defconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/core/dev.c:8717:18: error: field 'link' has incomplete type
8717 | struct bpf_link link;
| ^~~~
In file included from include/linux/instrumented.h:10,
from include/linux/uaccess.h:5,
from net/core/dev.c:71:
net/core/dev.c: In function 'bpf_xdp_link_release':
include/linux/kernel.h:1003:32: error: dereferencing pointer to incomplete type 'struct bpf_link'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~
include/linux/compiler.h:372:9: note: in definition of macro '__compiletime_assert'
372 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:20: note: in expansion of macro '__same_type'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
net/core/dev.c:8972:34: note: in expansion of macro 'container_of'
8972 | struct bpf_xdp_link *xdp_link = container_of(link, struct bpf_xdp_link, link);
| ^~~~~~~~~~~~
In file included from arch/alpha/include/asm/atomic.h:7,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:6,
from net/core/dev.c:71:
net/core/dev.c: In function 'bpf_xdp_link_update':
>> arch/alpha/include/asm/cmpxchg.h:48:27: warning: initialization of 'int' from 'struct bpf_prog *' makes integer from pointer without a cast [-Wint-conversion]
48 | __typeof__(*(ptr)) _x_ = (x); \
| ^
net/core/dev.c:9026:13: note: in expansion of macro 'xchg'
9026 | old_prog = xchg(&link->prog, new_prog);
| ^~~~
net/core/dev.c:9026:11: warning: assignment to 'struct bpf_prog *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
9026 | old_prog = xchg(&link->prog, new_prog);
| ^
net/core/dev.c: At top level:
net/core/dev.c:9034:21: error: variable 'bpf_xdp_link_lops' has initializer but incomplete type
9034 | static const struct bpf_link_ops bpf_xdp_link_lops = {
| ^~~~~~~~~~~~
net/core/dev.c:9035:3: error: 'const struct bpf_link_ops' has no member named 'release'
9035 | .release = bpf_xdp_link_release,
| ^~~~~~~
net/core/dev.c:9035:13: warning: excess elements in struct initializer
9035 | .release = bpf_xdp_link_release,
| ^~~~~~~~~~~~~~~~~~~~
net/core/dev.c:9035:13: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c:9036:3: error: 'const struct bpf_link_ops' has no member named 'dealloc'
9036 | .dealloc = bpf_xdp_link_dealloc,
| ^~~~~~~
net/core/dev.c:9036:13: warning: excess elements in struct initializer
9036 | .dealloc = bpf_xdp_link_dealloc,
| ^~~~~~~~~~~~~~~~~~~~
net/core/dev.c:9036:13: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c:9037:3: error: 'const struct bpf_link_ops' has no member named 'update_prog'
9037 | .update_prog = bpf_xdp_link_update,
| ^~~~~~~~~~~
net/core/dev.c:9037:17: warning: excess elements in struct initializer
9037 | .update_prog = bpf_xdp_link_update,
| ^~~~~~~~~~~~~~~~~~~
net/core/dev.c:9037:17: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c: In function 'bpf_xdp_link_attach':
net/core/dev.c:9043:25: error: storage size of 'link_primer' isn't known
9043 | struct bpf_link_primer link_primer;
| ^~~~~~~~~~~
net/core/dev.c:9058:2: error: implicit declaration of function 'bpf_link_init'; did you mean 'bio_list_init'? [-Werror=implicit-function-declaration]
9058 | bpf_link_init(&link->link, BPF_LINK_TYPE_XDP, &bpf_xdp_link_lops, prog);
| ^~~~~~~~~~~~~
| bio_list_init
net/core/dev.c:9062:8: error: implicit declaration of function 'bpf_link_prime' [-Werror=implicit-function-declaration]
9062 | err = bpf_link_prime(&link->link, &link_primer);
| ^~~~~~~~~~~~~~
net/core/dev.c:9073:3: error: implicit declaration of function 'bpf_link_cleanup' [-Werror=implicit-function-declaration]
9073 | bpf_link_cleanup(&link_primer);
| ^~~~~~~~~~~~~~~~
net/core/dev.c:9077:7: error: implicit declaration of function 'bpf_link_settle' [-Werror=implicit-function-declaration]
9077 | fd = bpf_link_settle(&link_primer);
| ^~~~~~~~~~~~~~~
net/core/dev.c:9043:25: warning: unused variable 'link_primer' [-Wunused-variable]
9043 | struct bpf_link_primer link_primer;
| ^~~~~~~~~~~
net/core/dev.c: At top level:
net/core/dev.c:9034:34: error: storage size of 'bpf_xdp_link_lops' isn't known
9034 | static const struct bpf_link_ops bpf_xdp_link_lops = {
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +48 arch/alpha/include/asm/cmpxchg.h
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 40
fbfcd019917098 Andrea Parri 2018-02-27 41 /*
fbfcd019917098 Andrea Parri 2018-02-27 42 * The leading and the trailing memory barriers guarantee that these
fbfcd019917098 Andrea Parri 2018-02-27 43 * operations are fully ordered.
fbfcd019917098 Andrea Parri 2018-02-27 44 */
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 45 #define xchg(ptr, x) \
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 46 ({ \
fbfcd019917098 Andrea Parri 2018-02-27 47 __typeof__(*(ptr)) __ret; \
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 @48 __typeof__(*(ptr)) _x_ = (x); \
fbfcd019917098 Andrea Parri 2018-02-27 49 smp_mb(); \
fbfcd019917098 Andrea Parri 2018-02-27 50 __ret = (__typeof__(*(ptr))) \
fbfcd019917098 Andrea Parri 2018-02-27 51 __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
fbfcd019917098 Andrea Parri 2018-02-27 52 smp_mb(); \
fbfcd019917098 Andrea Parri 2018-02-27 53 __ret; \
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 54 })
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 55
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH v2 bpf-next 4/8] bpf, xdp: implement LINK_UPDATE for BPF XDP link
by kernel test robot
Hi Andrii,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/BPF-XDP-link/202...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: parisc-defconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
net/core/dev.c:8717:18: error: field 'link' has incomplete type
8717 | struct bpf_link link;
| ^~~~
In file included from include/linux/instrumented.h:10,
from include/linux/uaccess.h:5,
from net/core/dev.c:71:
net/core/dev.c: In function 'bpf_xdp_link_release':
include/linux/kernel.h:1003:32: error: dereferencing pointer to incomplete type 'struct bpf_link'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~
include/linux/compiler.h:372:9: note: in definition of macro '__compiletime_assert'
372 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:20: note: in expansion of macro '__same_type'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
net/core/dev.c:8972:34: note: in expansion of macro 'container_of'
8972 | struct bpf_xdp_link *xdp_link = container_of(link, struct bpf_xdp_link, link);
| ^~~~~~~~~~~~
In file included from arch/parisc/include/asm/atomic.h:10,
from include/linux/atomic.h:7,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/uaccess.h:6,
from net/core/dev.c:71:
net/core/dev.c: In function 'bpf_xdp_link_update':
>> arch/parisc/include/asm/cmpxchg.h:50:27: warning: initialization of 'int' from 'struct bpf_prog *' makes integer from pointer without a cast [-Wint-conversion]
50 | __typeof__(*(ptr)) _x_ = (x); \
| ^
net/core/dev.c:9026:13: note: in expansion of macro 'xchg'
9026 | old_prog = xchg(&link->prog, new_prog);
| ^~~~
net/core/dev.c:9026:11: warning: assignment to 'struct bpf_prog *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
9026 | old_prog = xchg(&link->prog, new_prog);
| ^
net/core/dev.c: At top level:
net/core/dev.c:9034:21: error: variable 'bpf_xdp_link_lops' has initializer but incomplete type
9034 | static const struct bpf_link_ops bpf_xdp_link_lops = {
| ^~~~~~~~~~~~
net/core/dev.c:9035:3: error: 'const struct bpf_link_ops' has no member named 'release'
9035 | .release = bpf_xdp_link_release,
| ^~~~~~~
net/core/dev.c:9035:13: warning: excess elements in struct initializer
9035 | .release = bpf_xdp_link_release,
| ^~~~~~~~~~~~~~~~~~~~
net/core/dev.c:9035:13: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c:9036:3: error: 'const struct bpf_link_ops' has no member named 'dealloc'
9036 | .dealloc = bpf_xdp_link_dealloc,
| ^~~~~~~
net/core/dev.c:9036:13: warning: excess elements in struct initializer
9036 | .dealloc = bpf_xdp_link_dealloc,
| ^~~~~~~~~~~~~~~~~~~~
net/core/dev.c:9036:13: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c:9037:3: error: 'const struct bpf_link_ops' has no member named 'update_prog'
9037 | .update_prog = bpf_xdp_link_update,
| ^~~~~~~~~~~
net/core/dev.c:9037:17: warning: excess elements in struct initializer
9037 | .update_prog = bpf_xdp_link_update,
| ^~~~~~~~~~~~~~~~~~~
net/core/dev.c:9037:17: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c: In function 'bpf_xdp_link_attach':
net/core/dev.c:9043:25: error: storage size of 'link_primer' isn't known
9043 | struct bpf_link_primer link_primer;
| ^~~~~~~~~~~
net/core/dev.c:9058:2: error: implicit declaration of function 'bpf_link_init'; did you mean 'bio_list_init'? [-Werror=implicit-function-declaration]
9058 | bpf_link_init(&link->link, BPF_LINK_TYPE_XDP, &bpf_xdp_link_lops, prog);
| ^~~~~~~~~~~~~
| bio_list_init
net/core/dev.c:9062:8: error: implicit declaration of function 'bpf_link_prime' [-Werror=implicit-function-declaration]
9062 | err = bpf_link_prime(&link->link, &link_primer);
| ^~~~~~~~~~~~~~
net/core/dev.c:9073:3: error: implicit declaration of function 'bpf_link_cleanup' [-Werror=implicit-function-declaration]
9073 | bpf_link_cleanup(&link_primer);
| ^~~~~~~~~~~~~~~~
net/core/dev.c:9077:7: error: implicit declaration of function 'bpf_link_settle' [-Werror=implicit-function-declaration]
9077 | fd = bpf_link_settle(&link_primer);
| ^~~~~~~~~~~~~~~
net/core/dev.c:9043:25: warning: unused variable 'link_primer' [-Wunused-variable]
9043 | struct bpf_link_primer link_primer;
| ^~~~~~~~~~~
net/core/dev.c: At top level:
net/core/dev.c:9034:34: error: storage size of 'bpf_xdp_link_lops' isn't known
9034 | static const struct bpf_link_ops bpf_xdp_link_lops = {
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +50 arch/parisc/include/asm/cmpxchg.h
9e5228ce0b9619 Paul Gortmaker 2012-04-01 37
9e5228ce0b9619 Paul Gortmaker 2012-04-01 38 /*
9e5228ce0b9619 Paul Gortmaker 2012-04-01 39 ** REVISIT - Abandoned use of LDCW in xchg() for now:
9e5228ce0b9619 Paul Gortmaker 2012-04-01 40 ** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
9e5228ce0b9619 Paul Gortmaker 2012-04-01 41 ** o and while we are at it, could CONFIG_64BIT code use LDCD too?
9e5228ce0b9619 Paul Gortmaker 2012-04-01 42 **
9e5228ce0b9619 Paul Gortmaker 2012-04-01 43 ** if (__builtin_constant_p(x) && (x == NULL))
9e5228ce0b9619 Paul Gortmaker 2012-04-01 44 ** if (((unsigned long)p & 0xf) == 0)
9e5228ce0b9619 Paul Gortmaker 2012-04-01 45 ** return __ldcw(p);
9e5228ce0b9619 Paul Gortmaker 2012-04-01 46 */
9e5228ce0b9619 Paul Gortmaker 2012-04-01 47 #define xchg(ptr, x) \
75cf9797006a3a Helge Deller 2019-12-20 48 ({ \
75cf9797006a3a Helge Deller 2019-12-20 49 __typeof__(*(ptr)) __ret; \
75cf9797006a3a Helge Deller 2019-12-20 @50 __typeof__(*(ptr)) _x_ = (x); \
75cf9797006a3a Helge Deller 2019-12-20 51 __ret = (__typeof__(*(ptr))) \
75cf9797006a3a Helge Deller 2019-12-20 52 __xchg((unsigned long)_x_, (ptr), sizeof(*(ptr))); \
75cf9797006a3a Helge Deller 2019-12-20 53 __ret; \
75cf9797006a3a Helge Deller 2019-12-20 54 })
9e5228ce0b9619 Paul Gortmaker 2012-04-01 55
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH v4 1/5] drm/i915: Add enable/disable flip done and flip done handler
by kernel test robot
Hi Karthik,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next v5.8-rc5 next-20200713]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Karthik-B-S/Asynchronous-flip-im...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
# 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 warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_irq.c:700:5: warning: no previous prototype for 'g4x_get_flip_counter' [-Wmissing-prototypes]
700 | u32 g4x_get_flip_counter(struct drm_crtc *crtc)
| ^~~~~~~~~~~~~~~~~~~~
vim +/g4x_get_flip_counter +700 drivers/gpu/drm/i915/i915_irq.c
699
> 700 u32 g4x_get_flip_counter(struct drm_crtc *crtc)
701 {
702 struct drm_i915_private *dev_priv = to_i915(crtc->dev);
703 enum pipe pipe = to_intel_crtc(crtc)->pipe;
704
705 return I915_READ(PIPE_FLIPCOUNT_G4X(pipe));
706 }
707
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next 3/4] bpf: export some cgroup storages allocation helpers for reusing
by kernel test robot
Hi Dmitry,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Dmitry-Yakunin/bpf-cgroup-skb-im...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: mips-randconfig-r034-20200713 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
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/bpf/test_run.c:26:8: error: implicit declaration of function 'bpf_cgroup_storages_alloc' [-Werror,-Wimplicit-function-declaration]
ret = bpf_cgroup_storages_alloc(storage, prog);
^
net/bpf/test_run.c:26:8: note: did you mean 'bpf_cgroup_storage_alloc'?
include/linux/bpf-cgroup.h:415:42: note: 'bpf_cgroup_storage_alloc' declared here
static inline struct bpf_cgroup_storage *bpf_cgroup_storage_alloc(
^
>> net/bpf/test_run.c:68:2: error: implicit declaration of function 'bpf_cgroup_storages_free' [-Werror,-Wimplicit-function-declaration]
bpf_cgroup_storages_free(storage);
^
net/bpf/test_run.c:68:2: note: did you mean 'bpf_cgroup_storage_free'?
include/linux/bpf-cgroup.h:417:20: note: 'bpf_cgroup_storage_free' declared here
static inline void bpf_cgroup_storage_free(
^
net/bpf/test_run.c:112:14: warning: no previous prototype for function 'bpf_fentry_test1' [-Wmissing-prototypes]
int noinline bpf_fentry_test1(int a)
^
net/bpf/test_run.c:112:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test1(int a)
^
static
net/bpf/test_run.c:117:14: warning: no previous prototype for function 'bpf_fentry_test2' [-Wmissing-prototypes]
int noinline bpf_fentry_test2(int a, u64 b)
^
net/bpf/test_run.c:117:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test2(int a, u64 b)
^
static
net/bpf/test_run.c:122:14: warning: no previous prototype for function 'bpf_fentry_test3' [-Wmissing-prototypes]
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
net/bpf/test_run.c:122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test3(char a, int b, u64 c)
^
static
net/bpf/test_run.c:127:14: warning: no previous prototype for function 'bpf_fentry_test4' [-Wmissing-prototypes]
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
net/bpf/test_run.c:127:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test4(void *a, char b, int c, u64 d)
^
static
net/bpf/test_run.c:132:14: warning: no previous prototype for function 'bpf_fentry_test5' [-Wmissing-prototypes]
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
net/bpf/test_run.c:132:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test5(u64 a, void *b, short c, int d, u64 e)
^
static
net/bpf/test_run.c:137:14: warning: no previous prototype for function 'bpf_fentry_test6' [-Wmissing-prototypes]
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
net/bpf/test_run.c:137:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f)
^
static
net/bpf/test_run.c:142:14: warning: no previous prototype for function 'bpf_modify_return_test' [-Wmissing-prototypes]
int noinline bpf_modify_return_test(int a, int *b)
^
net/bpf/test_run.c:142:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int noinline bpf_modify_return_test(int a, int *b)
^
static
7 warnings and 2 errors generated.
vim +/bpf_cgroup_storages_alloc +26 net/bpf/test_run.c
17
18 static int bpf_test_run(struct bpf_prog *prog, void *ctx, u32 repeat,
19 u32 *retval, u32 *time, bool xdp)
20 {
21 struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE] = { NULL };
22 u64 time_start, time_spent = 0;
23 int ret = 0;
24 u32 i;
25
> 26 ret = bpf_cgroup_storages_alloc(storage, prog);
27 if (ret)
28 return ret;
29
30 if (!repeat)
31 repeat = 1;
32
33 rcu_read_lock();
34 migrate_disable();
35 time_start = ktime_get_ns();
36 for (i = 0; i < repeat; i++) {
37 bpf_cgroup_storage_set(storage);
38
39 if (xdp)
40 *retval = bpf_prog_run_xdp(prog, ctx);
41 else
42 *retval = BPF_PROG_RUN(prog, ctx);
43
44 if (signal_pending(current)) {
45 ret = -EINTR;
46 break;
47 }
48
49 if (need_resched()) {
50 time_spent += ktime_get_ns() - time_start;
51 migrate_enable();
52 rcu_read_unlock();
53
54 cond_resched();
55
56 rcu_read_lock();
57 migrate_disable();
58 time_start = ktime_get_ns();
59 }
60 }
61 time_spent += ktime_get_ns() - time_start;
62 migrate_enable();
63 rcu_read_unlock();
64
65 do_div(time_spent, repeat);
66 *time = time_spent > U32_MAX ? U32_MAX : (u32)time_spent;
67
> 68 bpf_cgroup_storages_free(storage);
69
70 return ret;
71 }
72
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH net-next 04/12] xgbe: convert to new udp_tunnel_nic infra
by kernel test robot
Hi Jakub,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Jakub-Kicinski/udp_tunnel-NIC-RX...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 2be53e0e4690a764b6af18536eb78b811f40eacc
config: arc-allyesconfig (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.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 >>):
drivers/net/ethernet/amd/xgbe/xgbe-drv.c: In function 'xgbe_set_features':
>> drivers/net/ethernet/amd/xgbe/xgbe-drv.c:2234:20: warning: variable 'udp_tunnel' set but not used [-Wunused-but-set-variable]
2234 | netdev_features_t udp_tunnel;
| ^~~~~~~~~~
vim +/udp_tunnel +2234 drivers/net/ethernet/amd/xgbe/xgbe-drv.c
1a510ccf5869a95 Lendacky, Thomas 2017-08-18 2227
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2228 static int xgbe_set_features(struct net_device *netdev,
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2229 netdev_features_t features)
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2230 {
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2231 struct xgbe_prv_data *pdata = netdev_priv(netdev);
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2232 struct xgbe_hw_if *hw_if = &pdata->hw_if;
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2233 netdev_features_t rxhash, rxcsum, rxvlan, rxvlan_filter;
1a510ccf5869a95 Lendacky, Thomas 2017-08-18 @2234 netdev_features_t udp_tunnel;
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2235 int ret = 0;
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2236
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2237 rxhash = pdata->netdev_features & NETIF_F_RXHASH;
801c62d945c6121 Lendacky, Thomas 2014-06-24 2238 rxcsum = pdata->netdev_features & NETIF_F_RXCSUM;
801c62d945c6121 Lendacky, Thomas 2014-06-24 2239 rxvlan = pdata->netdev_features & NETIF_F_HW_VLAN_CTAG_RX;
801c62d945c6121 Lendacky, Thomas 2014-06-24 2240 rxvlan_filter = pdata->netdev_features & NETIF_F_HW_VLAN_CTAG_FILTER;
1a510ccf5869a95 Lendacky, Thomas 2017-08-18 2241 udp_tunnel = pdata->netdev_features & NETIF_F_GSO_UDP_TUNNEL;
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2242
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2243 if ((features & NETIF_F_RXHASH) && !rxhash)
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2244 ret = hw_if->enable_rss(pdata);
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2245 else if (!(features & NETIF_F_RXHASH) && rxhash)
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2246 ret = hw_if->disable_rss(pdata);
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2247 if (ret)
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2248 return ret;
5b9dfe299e55604 Lendacky, Thomas 2014-11-04 2249
801c62d945c6121 Lendacky, Thomas 2014-06-24 2250 if ((features & NETIF_F_RXCSUM) && !rxcsum)
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2251 hw_if->enable_rx_csum(pdata);
801c62d945c6121 Lendacky, Thomas 2014-06-24 2252 else if (!(features & NETIF_F_RXCSUM) && rxcsum)
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2253 hw_if->disable_rx_csum(pdata);
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2254
801c62d945c6121 Lendacky, Thomas 2014-06-24 2255 if ((features & NETIF_F_HW_VLAN_CTAG_RX) && !rxvlan)
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2256 hw_if->enable_rx_vlan_stripping(pdata);
801c62d945c6121 Lendacky, Thomas 2014-06-24 2257 else if (!(features & NETIF_F_HW_VLAN_CTAG_RX) && rxvlan)
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2258 hw_if->disable_rx_vlan_stripping(pdata);
801c62d945c6121 Lendacky, Thomas 2014-06-24 2259
801c62d945c6121 Lendacky, Thomas 2014-06-24 2260 if ((features & NETIF_F_HW_VLAN_CTAG_FILTER) && !rxvlan_filter)
801c62d945c6121 Lendacky, Thomas 2014-06-24 2261 hw_if->enable_rx_vlan_filtering(pdata);
801c62d945c6121 Lendacky, Thomas 2014-06-24 2262 else if (!(features & NETIF_F_HW_VLAN_CTAG_FILTER) && rxvlan_filter)
801c62d945c6121 Lendacky, Thomas 2014-06-24 2263 hw_if->disable_rx_vlan_filtering(pdata);
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2264
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2265 pdata->netdev_features = features;
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2266
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2267 DBGPR("<--xgbe_set_features\n");
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2268
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2269 return 0;
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2270 }
c5aa9e3b815645e Lendacky, Thomas 2014-06-05 2271
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[linux-rt-devel:linux-5.6.y-rt-rebase 100/277] include/linux/ww_mutex.h:132:14: error: 'current' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.6.y-rt-rebase
head: 05800d541504f36a893a061ae11ee95ede802ca0
commit: ac209cf70a4bf2efdb4115c6bf05e583b10bdcae [100/277] seqlock: Extend seqcount API with associated locks
config: sparc64-randconfig-r011-20200713 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout ac209cf70a4bf2efdb4115c6bf05e583b10bdcae
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64
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/seqlock_types_internal.h:18,
from include/linux/seqlock.h:680,
from include/linux/time.h:6,
from arch/sparc/vdso/vdso32/../vclock_gettime.c:16,
from arch/sparc/vdso/vdso32/vclock_gettime.c:26:
include/linux/ww_mutex.h: In function 'ww_acquire_init':
>> include/linux/ww_mutex.h:132:14: error: 'current' undeclared (first use in this function); did you mean 'current_set'?
132 | ctx->task = current;
| ^~~~~~~
| current_set
include/linux/ww_mutex.h:132:14: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/sparc/vdso/vdso32/vclock_gettime.c:26:
arch/sparc/vdso/vdso32/../vclock_gettime.c: At top level:
arch/sparc/vdso/vdso32/../vclock_gettime.c:254:1: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes]
254 | __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:282:1: warning: no previous prototype for '__vdso_clock_gettime_stick' [-Wmissing-prototypes]
282 | __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:307:1: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes]
307 | __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
| ^~~~~~~~~~~~~~~~~~~
arch/sparc/vdso/vdso32/../vclock_gettime.c:343:1: warning: no previous prototype for '__vdso_gettimeofday_stick' [-Wmissing-prototypes]
343 | __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +132 include/linux/ww_mutex.h
1b375dc3071018 Maarten Lankhorst 2013-07-05 104
1b375dc3071018 Maarten Lankhorst 2013-07-05 105 /**
1b375dc3071018 Maarten Lankhorst 2013-07-05 106 * ww_acquire_init - initialize a w/w acquire context
1b375dc3071018 Maarten Lankhorst 2013-07-05 107 * @ctx: w/w acquire context to initialize
1b375dc3071018 Maarten Lankhorst 2013-07-05 108 * @ww_class: w/w class of the context
1b375dc3071018 Maarten Lankhorst 2013-07-05 109 *
1b375dc3071018 Maarten Lankhorst 2013-07-05 110 * Initializes an context to acquire multiple mutexes of the given w/w class.
1b375dc3071018 Maarten Lankhorst 2013-07-05 111 *
1b375dc3071018 Maarten Lankhorst 2013-07-05 112 * Context-based w/w mutex acquiring can be done in any order whatsoever within
1b375dc3071018 Maarten Lankhorst 2013-07-05 113 * a given lock class. Deadlocks will be detected and handled with the
55f036ca7e74b8 Peter Ziljstra 2018-06-15 114 * wait/die logic.
1b375dc3071018 Maarten Lankhorst 2013-07-05 115 *
1b375dc3071018 Maarten Lankhorst 2013-07-05 116 * Mixing of context-based w/w mutex acquiring and single w/w mutex locking can
1b375dc3071018 Maarten Lankhorst 2013-07-05 117 * result in undetected deadlocks and is so forbidden. Mixing different contexts
1b375dc3071018 Maarten Lankhorst 2013-07-05 118 * for the same w/w class when acquiring mutexes can also result in undetected
1b375dc3071018 Maarten Lankhorst 2013-07-05 119 * deadlocks, and is hence also forbidden. Both types of abuse will be caught by
1b375dc3071018 Maarten Lankhorst 2013-07-05 120 * enabling CONFIG_PROVE_LOCKING.
1b375dc3071018 Maarten Lankhorst 2013-07-05 121 *
1b375dc3071018 Maarten Lankhorst 2013-07-05 122 * Nesting of acquire contexts for _different_ w/w classes is possible, subject
1b375dc3071018 Maarten Lankhorst 2013-07-05 123 * to the usual locking rules between different lock classes.
1b375dc3071018 Maarten Lankhorst 2013-07-05 124 *
1b375dc3071018 Maarten Lankhorst 2013-07-05 125 * An acquire context must be released with ww_acquire_fini by the same task
1b375dc3071018 Maarten Lankhorst 2013-07-05 126 * before the memory is freed. It is recommended to allocate the context itself
1b375dc3071018 Maarten Lankhorst 2013-07-05 127 * on the stack.
1b375dc3071018 Maarten Lankhorst 2013-07-05 128 */
1b375dc3071018 Maarten Lankhorst 2013-07-05 129 static inline void ww_acquire_init(struct ww_acquire_ctx *ctx,
1b375dc3071018 Maarten Lankhorst 2013-07-05 130 struct ww_class *ww_class)
1b375dc3071018 Maarten Lankhorst 2013-07-05 131 {
1b375dc3071018 Maarten Lankhorst 2013-07-05 @132 ctx->task = current;
f4ec57b632fe15 Peter Zijlstra 2016-11-24 133 ctx->stamp = atomic_long_inc_return_relaxed(&ww_class->stamp);
1b375dc3071018 Maarten Lankhorst 2013-07-05 134 ctx->acquired = 0;
08295b3b5beec9 Thomas Hellstrom 2018-06-15 135 ctx->wounded = false;
08295b3b5beec9 Thomas Hellstrom 2018-06-15 136 ctx->is_wait_die = ww_class->is_wait_die;
1b375dc3071018 Maarten Lankhorst 2013-07-05 137 #ifdef CONFIG_DEBUG_MUTEXES
1b375dc3071018 Maarten Lankhorst 2013-07-05 138 ctx->ww_class = ww_class;
1b375dc3071018 Maarten Lankhorst 2013-07-05 139 ctx->done_acquire = 0;
1b375dc3071018 Maarten Lankhorst 2013-07-05 140 ctx->contending_lock = NULL;
1b375dc3071018 Maarten Lankhorst 2013-07-05 141 #endif
1b375dc3071018 Maarten Lankhorst 2013-07-05 142 #ifdef CONFIG_DEBUG_LOCK_ALLOC
1b375dc3071018 Maarten Lankhorst 2013-07-05 143 debug_check_no_locks_freed((void *)ctx, sizeof(*ctx));
1b375dc3071018 Maarten Lankhorst 2013-07-05 144 lockdep_init_map(&ctx->dep_map, ww_class->acquire_name,
1b375dc3071018 Maarten Lankhorst 2013-07-05 145 &ww_class->acquire_key, 0);
1b375dc3071018 Maarten Lankhorst 2013-07-05 146 mutex_acquire(&ctx->dep_map, 0, 0, _RET_IP_);
1b375dc3071018 Maarten Lankhorst 2013-07-05 147 #endif
1b375dc3071018 Maarten Lankhorst 2013-07-05 148 #ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH
1b375dc3071018 Maarten Lankhorst 2013-07-05 149 ctx->deadlock_inject_interval = 1;
1b375dc3071018 Maarten Lankhorst 2013-07-05 150 ctx->deadlock_inject_countdown = ctx->stamp & 0xf;
1b375dc3071018 Maarten Lankhorst 2013-07-05 151 #endif
1b375dc3071018 Maarten Lankhorst 2013-07-05 152 }
1b375dc3071018 Maarten Lankhorst 2013-07-05 153
:::::: The code at line 132 was first introduced by commit
:::::: 1b375dc30710180c4b88cc59caba6e3481ec5c8b mutex: Move ww_mutex definitions to ww_mutex.h
:::::: TO: Maarten Lankhorst <maarten.lankhorst(a)canonical.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH bpf-next 2/6] bpf: verifier: refactor check_attach_btf_id()
by kernel test robot
Hi "Toke,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on vhost/linux-next ipvs/master v5.8-rc5 next-20200713]
[cannot apply to bpf-next/master bpf/master net/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/bpf-Suppo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 528ae84a34ffd40da5d3fbff740d28d6dc2c8f8a
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/bpf/verifier.c:10876:7: warning: variable 'addr' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (ret)
^~~
kernel/bpf/verifier.c:10923:14: note: uninitialized use occurs here
*tgt_addr = addr;
^~~~
kernel/bpf/verifier.c:10876:3: note: remove the 'if' if its condition is always true
if (ret)
^~~~~~~~
kernel/bpf/verifier.c:10861:7: warning: variable 'addr' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (!btf_type_is_func_proto(t))
^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/verifier.c:10923:14: note: uninitialized use occurs here
*tgt_addr = addr;
^~~~
kernel/bpf/verifier.c:10861:3: note: remove the 'if' if its condition is always true
if (!btf_type_is_func_proto(t))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf/verifier.c:10750:11: note: initialize the variable 'addr' to silence this warning
long addr;
^
= 0
2 warnings generated.
vim +10876 kernel/bpf/verifier.c
10733
10734 int bpf_check_attach_target(struct bpf_verifier_log *log,
10735 const struct bpf_prog *prog,
10736 const struct bpf_prog *tgt_prog,
10737 u32 btf_id,
10738 struct btf_func_model *fmodel,
10739 long *tgt_addr,
10740 const char **tgt_name,
10741 const struct btf_type **tgt_type)
10742 {
10743 bool prog_extension = prog->type == BPF_PROG_TYPE_EXT;
10744 const char prefix[] = "btf_trace_";
10745 int ret = 0, subprog = -1, i;
10746 const struct btf_type *t;
10747 bool conservative = true;
10748 const char *tname;
10749 struct btf *btf;
10750 long addr;
10751
10752 if (!btf_id) {
10753 bpf_log(log, "Tracing programs must provide btf_id\n");
10754 return -EINVAL;
10755 }
10756 btf = bpf_prog_get_target_btf(prog);
10757 if (!btf) {
10758 bpf_log(log,
10759 "FENTRY/FEXIT program can only be attached to another program annotated with BTF\n");
10760 return -EINVAL;
10761 }
10762 t = btf_type_by_id(btf, btf_id);
10763 if (!t) {
10764 bpf_log(log, "attach_btf_id %u is invalid\n", btf_id);
10765 return -EINVAL;
10766 }
10767 tname = btf_name_by_offset(btf, t->name_off);
10768 if (!tname) {
10769 bpf_log(log, "attach_btf_id %u doesn't have a name\n", btf_id);
10770 return -EINVAL;
10771 }
10772 if (tgt_prog) {
10773 struct bpf_prog_aux *aux = tgt_prog->aux;
10774
10775 for (i = 0; i < aux->func_info_cnt; i++)
10776 if (aux->func_info[i].type_id == btf_id) {
10777 subprog = i;
10778 break;
10779 }
10780 if (subprog == -1) {
10781 bpf_log(log, "Subprog %s doesn't exist\n", tname);
10782 return -EINVAL;
10783 }
10784 conservative = aux->func_info_aux[subprog].unreliable;
10785 if (prog_extension) {
10786 if (conservative) {
10787 bpf_log(log,
10788 "Cannot replace static functions\n");
10789 return -EINVAL;
10790 }
10791 if (!prog->jit_requested) {
10792 bpf_log(log,
10793 "Extension programs should be JITed\n");
10794 return -EINVAL;
10795 }
10796 }
10797 if (!tgt_prog->jited) {
10798 bpf_log(log, "Can attach to only JITed progs\n");
10799 return -EINVAL;
10800 }
10801 if (tgt_prog->type == prog->type) {
10802 /* Cannot fentry/fexit another fentry/fexit program.
10803 * Cannot attach program extension to another extension.
10804 * It's ok to attach fentry/fexit to extension program.
10805 */
10806 bpf_log(log, "Cannot recursively attach\n");
10807 return -EINVAL;
10808 }
10809 if (tgt_prog->type == BPF_PROG_TYPE_TRACING &&
10810 prog_extension &&
10811 (tgt_prog->expected_attach_type == BPF_TRACE_FENTRY ||
10812 tgt_prog->expected_attach_type == BPF_TRACE_FEXIT)) {
10813 /* Program extensions can extend all program types
10814 * except fentry/fexit. The reason is the following.
10815 * The fentry/fexit programs are used for performance
10816 * analysis, stats and can be attached to any program
10817 * type except themselves. When extension program is
10818 * replacing XDP function it is necessary to allow
10819 * performance analysis of all functions. Both original
10820 * XDP program and its program extension. Hence
10821 * attaching fentry/fexit to BPF_PROG_TYPE_EXT is
10822 * allowed. If extending of fentry/fexit was allowed it
10823 * would be possible to create long call chain
10824 * fentry->extension->fentry->extension beyond
10825 * reasonable stack size. Hence extending fentry is not
10826 * allowed.
10827 */
10828 bpf_log(log, "Cannot extend fentry/fexit\n");
10829 return -EINVAL;
10830 }
10831 } else {
10832 if (prog_extension) {
10833 bpf_log(log, "Cannot replace kernel functions\n");
10834 return -EINVAL;
10835 }
10836 }
10837
10838 switch (prog->expected_attach_type) {
10839 case BPF_TRACE_RAW_TP:
10840 if (tgt_prog) {
10841 bpf_log(log,
10842 "Only FENTRY/FEXIT progs are attachable to another BPF prog\n");
10843 return -EINVAL;
10844 }
10845 if (!btf_type_is_typedef(t)) {
10846 bpf_log(log, "attach_btf_id %u is not a typedef\n",
10847 btf_id);
10848 return -EINVAL;
10849 }
10850 if (strncmp(prefix, tname, sizeof(prefix) - 1)) {
10851 bpf_log(log, "attach_btf_id %u points to wrong type name %s\n",
10852 btf_id, tname);
10853 return -EINVAL;
10854 }
10855 tname += sizeof(prefix) - 1;
10856 t = btf_type_by_id(btf, t->type);
10857 if (!btf_type_is_ptr(t))
10858 /* should never happen in valid vmlinux build */
10859 return -EINVAL;
10860 t = btf_type_by_id(btf, t->type);
10861 if (!btf_type_is_func_proto(t))
10862 /* should never happen in valid vmlinux build */
10863 return -EINVAL;
10864
10865 break;
10866 case BPF_TRACE_ITER:
10867 if (!btf_type_is_func(t)) {
10868 bpf_log(log, "attach_btf_id %u is not a function\n",
10869 btf_id);
10870 return -EINVAL;
10871 }
10872 t = btf_type_by_id(btf, t->type);
10873 if (!btf_type_is_func_proto(t))
10874 return -EINVAL;
10875 ret = btf_distill_func_proto(log, btf, t, tname, fmodel);
10876 if (ret)
10877 return ret;
10878 break;
10879 default:
10880 if (!prog_extension)
10881 return -EINVAL;
10882 /* fallthrough */
10883 case BPF_MODIFY_RETURN:
10884 case BPF_LSM_MAC:
10885 case BPF_TRACE_FENTRY:
10886 case BPF_TRACE_FEXIT:
10887 if (!btf_type_is_func(t)) {
10888 bpf_log(log, "attach_btf_id %u is not a function\n",
10889 btf_id);
10890 return -EINVAL;
10891 }
10892 if (prog_extension &&
10893 btf_check_type_match(log, prog, btf, t))
10894 return -EINVAL;
10895 t = btf_type_by_id(btf, t->type);
10896 if (!btf_type_is_func_proto(t))
10897 return -EINVAL;
10898
10899 if (tgt_prog && conservative)
10900 t = NULL;
10901
10902 ret = btf_distill_func_proto(log, btf, t, tname, fmodel);
10903 if (ret < 0)
10904 return ret;
10905
10906 if (tgt_prog) {
10907 if (subprog == 0)
10908 addr = (long) tgt_prog->bpf_func;
10909 else
10910 addr = (long) tgt_prog->aux->func[subprog]->bpf_func;
10911 } else {
10912 addr = kallsyms_lookup_name(tname);
10913 if (!addr) {
10914 bpf_log(log,
10915 "The address of function %s cannot be found\n",
10916 tname);
10917 return -ENOENT;
10918 }
10919 }
10920 break;
10921 }
10922
10923 *tgt_addr = addr;
10924 if (tgt_name)
10925 *tgt_name = tname;
10926 if (tgt_type)
10927 *tgt_type = t;
10928 return 0;
10929 }
10930
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months