On Tue, May 29, 2018 at 08:10:53AM +0800, kbuild test robot wrote: q > Hi Máté, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on nf-next/master] > > url: https://github.com/0day-ci/linux/commits/M-t-Eckl/netfilter-nft-add-support-for-native-socket-matching/20180529-064304 > base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master > config: i386-allmodconfig (attached as .config) > compiler: gcc-7 (Debian 7.3.0-16) 7.3.0 > reproduce: > # save the attached .config to linux build tree > make ARCH=i386 > > All error/warnings (new ones prefixed by >>): > > In file included from net/netfilter/nft_socket.c:7:0: > include/net/netfilter/nf_socket.h: In function 'nf_sk_is_transparent': > >> include/net/netfilter/nf_socket.h:12:12: error: dereferencing pointer to incomplete type 'struct sock' > switch (sk->sk_state) { > ^~ > >> include/net/netfilter/nf_socket.h:13:7: error: 'TCP_TIME_WAIT' undeclared (first use in this function); did you mean 'BPF_TCP_TIME_WAIT'? > case TCP_TIME_WAIT: > ^~~~~~~~~~~~~ > BPF_TCP_TIME_WAIT > include/net/netfilter/nf_socket.h:13:7: note: each undeclared identifier is reported only once for each function it appears in > >> include/net/netfilter/nf_socket.h:14:10: error: implicit declaration of function 'inet_twsk'; did you mean 'in_task'? [-Werror=implicit-function-declaration] > return inet_twsk(sk)->tw_transparent; > ^~~~~~~~~ > in_task > >> include/net/netfilter/nf_socket.h:14:23: error: invalid type argument of '->' (have 'int') > return inet_twsk(sk)->tw_transparent; > ^~ > >> include/net/netfilter/nf_socket.h:15:7: error: 'TCP_NEW_SYN_RECV' undeclared (first use in this function); did you mean 'BPF_TCP_NEW_SYN_RECV'? > case TCP_NEW_SYN_RECV: > ^~~~~~~~~~~~~~~~ > BPF_TCP_NEW_SYN_RECV > >> include/net/netfilter/nf_socket.h:16:10: error: implicit declaration of function 'inet_rsk'; did you mean 'in_task'? [-Werror=implicit-function-declaration] > return inet_rsk(inet_reqsk(sk))->no_srccheck; > ^~~~~~~~ > in_task > >> include/net/netfilter/nf_socket.h:16:19: error: implicit declaration of function 'inet_reqsk'; did you mean 'net_eq'? [-Werror=implicit-function-declaration] > return inet_rsk(inet_reqsk(sk))->no_srccheck; > ^~~~~~~~~~ > net_eq > include/net/netfilter/nf_socket.h:16:34: error: invalid type argument of '->' (have 'int') > return inet_rsk(inet_reqsk(sk))->no_srccheck; > ^~ > >> include/net/netfilter/nf_socket.h:18:10: error: implicit declaration of function 'inet_sk'; did you mean 'in_task'? [-Werror=implicit-function-declaration] > return inet_sk(sk)->transparent; > ^~~~~~~ > in_task > include/net/netfilter/nf_socket.h:18:21: error: invalid type argument of '->' (have 'int') > return inet_sk(sk)->transparent; > ^~ > In file included from include/net/inet_sock.h:27:0, > from net/netfilter/nft_socket.c:8: > include/net/request_sock.h: At top level: > >> include/net/request_sock.h:72:36: error: conflicting types for 'inet_reqsk' > static inline struct request_sock *inet_reqsk(const struct sock *sk) > ^~~~~~~~~~ > In file included from net/netfilter/nft_socket.c:7:0: > include/net/netfilter/nf_socket.h:16:19: note: previous implicit declaration of 'inet_reqsk' was here > return inet_rsk(inet_reqsk(sk))->no_srccheck; > ^~~~~~~~~~ > In file included from net/netfilter/nft_socket.c:8:0: > >> include/net/inet_sock.h:107:41: error: conflicting types for 'inet_rsk' > static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) > ^~~~~~~~ > In file included from net/netfilter/nft_socket.c:7:0: > include/net/netfilter/nf_socket.h:16:10: note: previous implicit declaration of 'inet_rsk' was here > return inet_rsk(inet_reqsk(sk))->no_srccheck; > ^~~~~~~~ > In file included from net/netfilter/nft_socket.c:8:0: > >> include/net/inet_sock.h:273:33: error: conflicting types for 'inet_sk' > static inline struct inet_sock *inet_sk(const struct sock *sk) > ^~~~~~~ > In file included from net/netfilter/nft_socket.c:7:0: > include/net/netfilter/nf_socket.h:18:10: note: previous implicit declaration of 'inet_sk' was here > return inet_sk(sk)->transparent; > ^~~~~~~ > include/net/netfilter/nf_socket.h: In function 'nf_sk_is_transparent': > >> include/net/netfilter/nf_socket.h:20:1: warning: control reaches end of non-void function [-Wreturn-type] > } > ^ > cc1: some warnings being treated as errors > > vim +12 include/net/netfilter/nf_socket.h > > 8db4c5be Pablo Neira Ayuso 2016-10-27 9 > 8db4c5be Pablo Neira Ayuso 2016-10-27 10 static inline bool nf_sk_is_transparent(struct sock *sk) > 8db4c5be Pablo Neira Ayuso 2016-10-27 11 { > 8db4c5be Pablo Neira Ayuso 2016-10-27 @12 switch (sk->sk_state) { > 8db4c5be Pablo Neira Ayuso 2016-10-27 @13 case TCP_TIME_WAIT: > 8db4c5be Pablo Neira Ayuso 2016-10-27 @14 return inet_twsk(sk)->tw_transparent; > 8db4c5be Pablo Neira Ayuso 2016-10-27 @15 case TCP_NEW_SYN_RECV: > 8db4c5be Pablo Neira Ayuso 2016-10-27 @16 return inet_rsk(inet_reqsk(sk))->no_srccheck; > 8db4c5be Pablo Neira Ayuso 2016-10-27 17 default: > 8db4c5be Pablo Neira Ayuso 2016-10-27 @18 return inet_sk(sk)->transparent; > 8db4c5be Pablo Neira Ayuso 2016-10-27 19 } > 8db4c5be Pablo Neira Ayuso 2016-10-27 @20 } > 8db4c5be Pablo Neira Ayuso 2016-10-27 21 > > :::::: The code at line 12 was first introduced by commit > :::::: 8db4c5be88f62ffd7a552f70687a10c614dc697b netfilter: move socket lookup infrastructure to nf_socket_ipv{4,6}.c > > :::::: TO: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> > :::::: CC: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation This patch is based on [1], which has been applied after this patch was submitted. These errors should not be present in a new build. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=e5a10bb2acf246c13dc164fd37d4c77d9acaf88f -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html