tree: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master head: bcbfcb63a93704140d66f49b6f7d783988f37b4e commit: bcbfcb63a93704140d66f49b6f7d783988f37b4e [14/14] netfilter: reduce hook array sizes to what is needed config: i386-randconfig-x014-201749 (attached as .config) compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025 reproduce: git checkout bcbfcb63a93704140d66f49b6f7d783988f37b4e # save the attached .config to linux build tree make ARCH=i386 All error/warnings (new ones prefixed by >>): In file included from include/linux/srcu.h:33:0, from include/linux/notifier.h:16, from include/linux/memory_hotplug.h:7, from include/linux/mmzone.h:780, from include/linux/gfp.h:6, from include/linux/slab.h:15, from net/netfilter/nf_queue.c:7: net/netfilter/nf_queue.c: In function 'nf_hook_entries_head': >> net/netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/rcupdate.h:349:10: note: in definition of macro '__rcu_dereference_check' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ >> net/netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ >> net/netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/rcupdate.h:349:36: note: in definition of macro '__rcu_dereference_check' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ >> net/netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:5:0, from include/linux/kernel.h:7, from net/netfilter/nf_queue.c:6: >> net/netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:622:9: note: in definition of macro 'lockless_dereference' typeof(p) _________p1 = READ_ONCE(p); \ ^ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ >> net/netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:5:0, from include/linux/kernel.h:7, from net/netfilter/nf_queue.c:6: >> net/netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:339:17: note: in definition of macro '__READ_ONCE' union { typeof(x) __val; char __c[1]; } __u; \ ^ include/linux/compiler.h:622:26: note: in expansion of macro 'READ_ONCE' typeof(p) _________p1 = READ_ONCE(p); \ ^~~~~~~~~ >> include/linux/rcupdate.h:349:48: note: in expansion of macro 'lockless_dereference' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ >> net/netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ >> net/netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:341:22: note: in definition of macro '__READ_ONCE' __read_once_size(&(x), __u.__c, sizeof(x)); \ ^ include/linux/compiler.h:622:26: note: in expansion of macro 'READ_ONCE' typeof(p) _________p1 = READ_ONCE(p); \ ^~~~~~~~~ >> include/linux/rcupdate.h:349:48: note: in expansion of macro 'lockless_dereference' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ >> net/netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ -- In file included from include/linux/srcu.h:33:0, from include/linux/notifier.h:16, from include/linux/memory_hotplug.h:7, from include/linux/mmzone.h:780, from include/linux/gfp.h:6, from include/linux/slab.h:15, from net//netfilter/nf_queue.c:7: net//netfilter/nf_queue.c: In function 'nf_hook_entries_head': net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/rcupdate.h:349:10: note: in definition of macro '__rcu_dereference_check' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/rcupdate.h:349:36: note: in definition of macro '__rcu_dereference_check' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:5:0, from include/linux/kernel.h:7, from net//netfilter/nf_queue.c:6: net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:622:9: note: in definition of macro 'lockless_dereference' typeof(p) _________p1 = READ_ONCE(p); \ ^ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:5:0, from include/linux/kernel.h:7, from net//netfilter/nf_queue.c:6: net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:339:17: note: in definition of macro '__READ_ONCE' union { typeof(x) __val; char __c[1]; } __u; \ ^ include/linux/compiler.h:622:26: note: in expansion of macro 'READ_ONCE' typeof(p) _________p1 = READ_ONCE(p); \ ^~~~~~~~~ >> include/linux/rcupdate.h:349:48: note: in expansion of macro 'lockless_dereference' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:341:22: note: in definition of macro '__READ_ONCE' __read_once_size(&(x), __u.__c, sizeof(x)); \ ^ include/linux/compiler.h:622:26: note: in expansion of macro 'READ_ONCE' typeof(p) _________p1 = READ_ONCE(p); \ ^~~~~~~~~ >> include/linux/rcupdate.h:349:48: note: in expansion of macro 'lockless_dereference' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:341:42: note: in definition of macro '__READ_ONCE' __read_once_size(&(x), __u.__c, sizeof(x)); \ ^ include/linux/compiler.h:622:26: note: in expansion of macro 'READ_ONCE' typeof(p) _________p1 = READ_ONCE(p); \ ^~~~~~~~~ >> include/linux/rcupdate.h:349:48: note: in expansion of macro 'lockless_dereference' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:343:30: note: in definition of macro '__READ_ONCE' __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \ ^ include/linux/compiler.h:622:26: note: in expansion of macro 'READ_ONCE' typeof(p) _________p1 = READ_ONCE(p); \ ^~~~~~~~~ >> include/linux/rcupdate.h:349:48: note: in expansion of macro 'lockless_dereference' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:343:50: note: in definition of macro '__READ_ONCE' __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \ ^ include/linux/compiler.h:622:26: note: in expansion of macro 'READ_ONCE' typeof(p) _________p1 = READ_ONCE(p); \ ^~~~~~~~~ >> include/linux/rcupdate.h:349:48: note: in expansion of macro 'lockless_dereference' typeof(*p) *________p1 = (typeof(*p) *__force)lockless_dereference(p); \ ^~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/rcupdate.h:545:28: note: in expansion of macro 'rcu_dereference_check' #define rcu_dereference(p) rcu_dereference_check(p, 0) ^~~~~~~~~~~~~~~~~~~~~ net//netfilter/nf_queue.c:208:10: note: in expansion of macro 'rcu_dereference' return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^~~~~~~~~~~~~~~ In file included from include/linux/linkage.h:5:0, from include/linux/kernel.h:7, from net//netfilter/nf_queue.c:6: net//netfilter/nf_queue.c:208:34: error: 'const struct netns_nf' has no member named 'hooks_bridge'; did you mean 'hooks_ipv4'? return rcu_dereference(net->nf.hooks_bridge[hooknum]); ^ include/linux/compiler.h:623:11: note: in definition of macro 'lockless_dereference' typeof(*(p)) *___typecheck_p __maybe_unused; \ ^ >> include/linux/rcupdate.h:486:2: note: in expansion of macro '__rcu_dereference_check' __rcu_dereference_check((p), (c) || rcu_read_lock_held(), __rcu) ^~~~~~~~~~~~~~~~~~~~~~~ vim +208 net/netfilter/nf_queue.c 26dfab721 Pablo Neira Ayuso 2016-11-03 203 e02538c64 Florian Westphal 2017-12-03 204 static struct nf_hook_entries *nf_hook_entries_head(const struct net *net, u8 pf, u8 hooknum) e02538c64 Florian Westphal 2017-12-03 205 { e02538c64 Florian Westphal 2017-12-03 206 switch (pf) { e02538c64 Florian Westphal 2017-12-03 207 case NFPROTO_BRIDGE: e02538c64 Florian Westphal 2017-12-03 @208 return rcu_dereference(net->nf.hooks_bridge[hooknum]); e02538c64 Florian Westphal 2017-12-03 209 case NFPROTO_IPV4: e02538c64 Florian Westphal 2017-12-03 210 return rcu_dereference(net->nf.hooks_ipv4[hooknum]); e02538c64 Florian Westphal 2017-12-03 211 case NFPROTO_IPV6: e02538c64 Florian Westphal 2017-12-03 212 return rcu_dereference(net->nf.hooks_ipv6[hooknum]); e02538c64 Florian Westphal 2017-12-03 213 default: e02538c64 Florian Westphal 2017-12-03 214 WARN_ON_ONCE(1); e02538c64 Florian Westphal 2017-12-03 215 return NULL; e02538c64 Florian Westphal 2017-12-03 216 } e02538c64 Florian Westphal 2017-12-03 217 e02538c64 Florian Westphal 2017-12-03 218 return NULL; e02538c64 Florian Westphal 2017-12-03 219 } e02538c64 Florian Westphal 2017-12-03 220 :::::: The code at line 208 was first introduced by commit :::::: e02538c6458b54c135cb8626c05e989b16550cb0 netfilter: reduce size of hook entry point locations :::::: TO: Florian Westphal <fw@xxxxxxxxx> :::::: CC: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip