lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201710170534.sxBKYKpu%fengguang.wu@intel.com>
Date:   Tue, 17 Oct 2017 05:42:37 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     "Steven Rostedt (VMware)" <rostedt@...dmis.org>
Cc:     kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 277/285] include/trace/events/xdp.h:91:17: warning:
 'struct bpf_map' declared inside parameter list

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   e4467f2e2442e15cf047c2e7b91cb44a643cb149
commit: 9185a610f8f7f1b4e4d28c9de27d1969cf58e0f1 [277/285] tracing: bpf: Hide bpf trace events when they are not used
config: x86_64-randconfig-i0-201742 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        git checkout 9185a610f8f7f1b4e4d28c9de27d1969cf58e0f1
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/trace/events/xdp.h:9:0,
                    from include/linux/bpf_trace.h:5,
                    from drivers/net//ethernet/qlogic/qede/qede_fp.c:35:
>> include/trace/events/xdp.h:91:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:256:34: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name(proto)    \
                                     ^
   include/linux/tracepoint.h:352:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:87:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect,
    ^
   include/trace/events/xdp.h:88:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
>> include/trace/events/xdp.h:91:17: warning: its scope is only this definition or declaration, which is probably not what you want
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:256:34: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name(proto)    \
                                     ^
   include/linux/tracepoint.h:352:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:87:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect,
    ^
   include/trace/events/xdp.h:88:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
>> include/trace/events/xdp.h:91:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:258:44: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name##_rcuidle(proto)  \
                                               ^
   include/linux/tracepoint.h:352:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:87:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect,
    ^
   include/trace/events/xdp.h:88:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
>> include/trace/events/xdp.h:91:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:261:38: note: in definition of macro '__DECLARE_TRACE'
     register_trace_##name(void (*probe)(data_proto),  \
                                         ^
   include/linux/tracepoint.h:354:4: note: in expansion of macro 'PARAMS'
       PARAMS(void *__data, proto),   \
       ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:87:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect,
    ^
   include/trace/events/xdp.h:88:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
>> include/trace/events/xdp.h:91:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:267:40: note: in definition of macro '__DECLARE_TRACE'
     unregister_trace_##name(void (*probe)(data_proto),  \
                                           ^
   include/linux/tracepoint.h:354:4: note: in expansion of macro 'PARAMS'
       PARAMS(void *__data, proto),   \
       ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:87:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect,
    ^
   include/trace/events/xdp.h:88:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
>> include/trace/events/xdp.h:91:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:272:65: note: in definition of macro '__DECLARE_TRACE'
     static inline void check_trace_callback_type_##name(void (*cb)(data_proto)) \
                                                                    ^
   include/linux/tracepoint.h:354:4: note: in expansion of macro 'PARAMS'
       PARAMS(void *__data, proto),   \
       ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:87:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect,
    ^
   include/trace/events/xdp.h:88:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
   include/trace/events/xdp.h:99:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:256:34: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name(proto)    \
                                     ^
   include/linux/tracepoint.h:352:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:95:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect_err,
    ^
   include/trace/events/xdp.h:96:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
   include/trace/events/xdp.h:99:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:258:44: note: in definition of macro '__DECLARE_TRACE'
     static inline void trace_##name##_rcuidle(proto)  \
                                               ^
   include/linux/tracepoint.h:352:24: note: in expansion of macro 'PARAMS'
     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),  \
                           ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:95:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect_err,
    ^
   include/trace/events/xdp.h:96:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
   include/trace/events/xdp.h:99:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:261:38: note: in definition of macro '__DECLARE_TRACE'
     register_trace_##name(void (*probe)(data_proto),  \
                                         ^
   include/linux/tracepoint.h:354:4: note: in expansion of macro 'PARAMS'
       PARAMS(void *__data, proto),   \
       ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:95:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect_err,
    ^
   include/trace/events/xdp.h:96:2: note: in expansion of macro 'TP_PROTO'
     TP_PROTO(const struct net_device *dev,
     ^
   include/trace/events/xdp.h:99:17: warning: 'struct bpf_map' declared inside parameter list
       const struct bpf_map *map, u32 map_index),
                    ^
   include/linux/tracepoint.h:267:40: note: in definition of macro '__DECLARE_TRACE'
     unregister_trace_##name(void (*probe)(data_proto),  \
                                           ^
   include/linux/tracepoint.h:354:4: note: in expansion of macro 'PARAMS'
       PARAMS(void *__data, proto),   \
       ^
   include/linux/tracepoint.h:477:2: note: in expansion of macro 'DECLARE_TRACE'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
     ^
   include/linux/tracepoint.h:477:22: note: in expansion of macro 'PARAMS'
     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
                         ^
   include/trace/events/xdp.h:95:1: note: in expansion of macro 'DEFINE_EVENT'
    DEFINE_EVENT(xdp_redirect_template, xdp_redirect_err,

vim +91 include/trace/events/xdp.h

a67edbf4f Daniel Borkmann        2017-01-25   6  
a67edbf4f Daniel Borkmann        2017-01-25   7  #include <linux/netdevice.h>
a67edbf4f Daniel Borkmann        2017-01-25   8  #include <linux/filter.h>
a67edbf4f Daniel Borkmann        2017-01-25  @9  #include <linux/tracepoint.h>
a67edbf4f Daniel Borkmann        2017-01-25  10  
a67edbf4f Daniel Borkmann        2017-01-25  11  #define __XDP_ACT_MAP(FN)	\
a67edbf4f Daniel Borkmann        2017-01-25  12  	FN(ABORTED)		\
a67edbf4f Daniel Borkmann        2017-01-25  13  	FN(DROP)		\
a67edbf4f Daniel Borkmann        2017-01-25  14  	FN(PASS)		\
5acaee0a8 John Fastabend         2017-07-17  15  	FN(TX)			\
5acaee0a8 John Fastabend         2017-07-17  16  	FN(REDIRECT)
a67edbf4f Daniel Borkmann        2017-01-25  17  
a67edbf4f Daniel Borkmann        2017-01-25  18  #define __XDP_ACT_TP_FN(x)	\
a67edbf4f Daniel Borkmann        2017-01-25  19  	TRACE_DEFINE_ENUM(XDP_##x);
a67edbf4f Daniel Borkmann        2017-01-25  20  #define __XDP_ACT_SYM_FN(x)	\
a67edbf4f Daniel Borkmann        2017-01-25  21  	{ XDP_##x, #x },
a67edbf4f Daniel Borkmann        2017-01-25  22  #define __XDP_ACT_SYM_TAB	\
a67edbf4f Daniel Borkmann        2017-01-25  23  	__XDP_ACT_MAP(__XDP_ACT_SYM_FN) { -1, 0 }
a67edbf4f Daniel Borkmann        2017-01-25  24  __XDP_ACT_MAP(__XDP_ACT_TP_FN)
a67edbf4f Daniel Borkmann        2017-01-25  25  
a67edbf4f Daniel Borkmann        2017-01-25  26  TRACE_EVENT(xdp_exception,
a67edbf4f Daniel Borkmann        2017-01-25  27  
a67edbf4f Daniel Borkmann        2017-01-25  28  	TP_PROTO(const struct net_device *dev,
a67edbf4f Daniel Borkmann        2017-01-25  29  		 const struct bpf_prog *xdp, u32 act),
a67edbf4f Daniel Borkmann        2017-01-25  30  
a67edbf4f Daniel Borkmann        2017-01-25  31  	TP_ARGS(dev, xdp, act),
a67edbf4f Daniel Borkmann        2017-01-25  32  
a67edbf4f Daniel Borkmann        2017-01-25  33  	TP_STRUCT__entry(
b06337dfd Jesper Dangaard Brouer 2017-08-29  34  		__field(int, prog_id)
a67edbf4f Daniel Borkmann        2017-01-25  35  		__field(u32, act)
315ec3990 Jesper Dangaard Brouer 2017-08-24  36  		__field(int, ifindex)
a67edbf4f Daniel Borkmann        2017-01-25  37  	),
a67edbf4f Daniel Borkmann        2017-01-25  38  
a67edbf4f Daniel Borkmann        2017-01-25  39  	TP_fast_assign(
b06337dfd Jesper Dangaard Brouer 2017-08-29  40  		__entry->prog_id	= xdp->aux->id;
a67edbf4f Daniel Borkmann        2017-01-25  41  		__entry->act		= act;
315ec3990 Jesper Dangaard Brouer 2017-08-24  42  		__entry->ifindex	= dev->ifindex;
a67edbf4f Daniel Borkmann        2017-01-25  43  	),
a67edbf4f Daniel Borkmann        2017-01-25  44  
b06337dfd Jesper Dangaard Brouer 2017-08-29  45  	TP_printk("prog_id=%d action=%s ifindex=%d",
b06337dfd Jesper Dangaard Brouer 2017-08-29  46  		  __entry->prog_id,
315ec3990 Jesper Dangaard Brouer 2017-08-24  47  		  __print_symbolic(__entry->act, __XDP_ACT_SYM_TAB),
315ec3990 Jesper Dangaard Brouer 2017-08-24  48  		  __entry->ifindex)
a67edbf4f Daniel Borkmann        2017-01-25  49  );
a67edbf4f Daniel Borkmann        2017-01-25  50  
8d3b778ff Jesper Dangaard Brouer 2017-08-29  51  DECLARE_EVENT_CLASS(xdp_redirect_template,
5acaee0a8 John Fastabend         2017-07-17  52  
a87358558 Jesper Dangaard Brouer 2017-08-24  53  	TP_PROTO(const struct net_device *dev,
c31e5a487 Jesper Dangaard Brouer 2017-08-29  54  		 const struct bpf_prog *xdp,
8d3b778ff Jesper Dangaard Brouer 2017-08-29  55  		 int to_ifindex, int err,
8d3b778ff Jesper Dangaard Brouer 2017-08-29  56  		 const struct bpf_map *map, u32 map_index),
5acaee0a8 John Fastabend         2017-07-17  57  
8d3b778ff Jesper Dangaard Brouer 2017-08-29  58  	TP_ARGS(dev, xdp, to_ifindex, err, map, map_index),
5acaee0a8 John Fastabend         2017-07-17  59  
5acaee0a8 John Fastabend         2017-07-17  60  	TP_STRUCT__entry(
b06337dfd Jesper Dangaard Brouer 2017-08-29  61  		__field(int, prog_id)
5acaee0a8 John Fastabend         2017-07-17  62  		__field(u32, act)
a87358558 Jesper Dangaard Brouer 2017-08-24  63  		__field(int, ifindex)
4c03bdd7b Jesper Dangaard Brouer 2017-08-17  64  		__field(int, err)
8d3b778ff Jesper Dangaard Brouer 2017-08-29  65  		__field(int, to_ifindex)
8d3b778ff Jesper Dangaard Brouer 2017-08-29  66  		__field(u32, map_id)
8d3b778ff Jesper Dangaard Brouer 2017-08-29  67  		__field(int, map_index)
5acaee0a8 John Fastabend         2017-07-17  68  	),
5acaee0a8 John Fastabend         2017-07-17  69  
5acaee0a8 John Fastabend         2017-07-17  70  	TP_fast_assign(
b06337dfd Jesper Dangaard Brouer 2017-08-29  71  		__entry->prog_id	= xdp->aux->id;
c31e5a487 Jesper Dangaard Brouer 2017-08-29  72  		__entry->act		= XDP_REDIRECT;
a87358558 Jesper Dangaard Brouer 2017-08-24  73  		__entry->ifindex	= dev->ifindex;
4c03bdd7b Jesper Dangaard Brouer 2017-08-17  74  		__entry->err		= err;
8d3b778ff Jesper Dangaard Brouer 2017-08-29  75  		__entry->to_ifindex	= to_ifindex;
8d3b778ff Jesper Dangaard Brouer 2017-08-29  76  		__entry->map_id		= map ? map->id : 0;
8d3b778ff Jesper Dangaard Brouer 2017-08-29  77  		__entry->map_index	= map_index;
5acaee0a8 John Fastabend         2017-07-17  78  	),
5acaee0a8 John Fastabend         2017-07-17  79  
59a308967 Jesper Dangaard Brouer 2017-08-29  80  	TP_printk("prog_id=%d action=%s ifindex=%d to_ifindex=%d err=%d",
b06337dfd Jesper Dangaard Brouer 2017-08-29  81  		  __entry->prog_id,
4c03bdd7b Jesper Dangaard Brouer 2017-08-17  82  		  __print_symbolic(__entry->act, __XDP_ACT_SYM_TAB),
8d3b778ff Jesper Dangaard Brouer 2017-08-29  83  		  __entry->ifindex, __entry->to_ifindex,
59a308967 Jesper Dangaard Brouer 2017-08-29  84  		  __entry->err)
5acaee0a8 John Fastabend         2017-07-17  85  );
8d3b778ff Jesper Dangaard Brouer 2017-08-29  86  
8d3b778ff Jesper Dangaard Brouer 2017-08-29 @87  DEFINE_EVENT(xdp_redirect_template, xdp_redirect,
8d3b778ff Jesper Dangaard Brouer 2017-08-29  88  	TP_PROTO(const struct net_device *dev,
8d3b778ff Jesper Dangaard Brouer 2017-08-29  89  		 const struct bpf_prog *xdp,
8d3b778ff Jesper Dangaard Brouer 2017-08-29  90  		 int to_ifindex, int err,
8d3b778ff Jesper Dangaard Brouer 2017-08-29 @91  		 const struct bpf_map *map, u32 map_index),
8d3b778ff Jesper Dangaard Brouer 2017-08-29  92  	TP_ARGS(dev, xdp, to_ifindex, err, map, map_index)
8d3b778ff Jesper Dangaard Brouer 2017-08-29  93  );
8d3b778ff Jesper Dangaard Brouer 2017-08-29  94  

:::::: The code at line 91 was first introduced by commit
:::::: 8d3b778ff544b369f0847e6c15f3e73057298aa4 xdp: tracepoint xdp_redirect also need a map argument

:::::: TO: Jesper Dangaard Brouer <brouer@...hat.com>
:::::: CC: David S. Miller <davem@...emloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (32470 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ