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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 17 Nov 2019 19:46:43 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Paolo Abeni <pabeni@...hat.com>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org,
        "David S. Miller" <davem@...emloft.net>,
        Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        Edward Cree <ecree@...arflare.com>
Subject: Re: [PATCH net-next 1/2] ipv6: introduce and uses route look hints
 for list input

Hi Paolo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on v5.4-rc7 next-20191115]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Paolo-Abeni/net-introduce-and-use-route-hint/20191116-172108
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 20021578ba226bda1f0ddf50e4d4a12ea1c6c6c1
config: i386-randconfig-h003-20191117 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/export.h:42:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/uio.h:8,
                    from include/linux/socket.h:8,
                    from net/ipv6/ip6_input.c:20:
   net/ipv6/ip6_input.c: In function 'ip6_list_rcv_finish':
   net/ipv6/ip6_input.c:124:18: error: 'struct netns_ipv6' has no member named 'fib6_has_custom_rules'
       if (!net->ipv6.fib6_has_custom_rules) {
                     ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> net/ipv6/ip6_input.c:124:4: note: in expansion of macro 'if'
       if (!net->ipv6.fib6_has_custom_rules) {
       ^~
   net/ipv6/ip6_input.c:124:18: error: 'struct netns_ipv6' has no member named 'fib6_has_custom_rules'
       if (!net->ipv6.fib6_has_custom_rules) {
                     ^
   include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                ^~~~
>> net/ipv6/ip6_input.c:124:4: note: in expansion of macro 'if'
       if (!net->ipv6.fib6_has_custom_rules) {
       ^~
   net/ipv6/ip6_input.c:124:18: error: 'struct netns_ipv6' has no member named 'fib6_has_custom_rules'
       if (!net->ipv6.fib6_has_custom_rules) {
                     ^
   include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
     (cond) ?     \
      ^~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> net/ipv6/ip6_input.c:124:4: note: in expansion of macro 'if'
       if (!net->ipv6.fib6_has_custom_rules) {
       ^~

vim +/if +124 net/ipv6/ip6_input.c

  > 20	#include <linux/socket.h>
    21	#include <linux/sockios.h>
    22	#include <linux/net.h>
    23	#include <linux/netdevice.h>
    24	#include <linux/in6.h>
    25	#include <linux/icmpv6.h>
    26	#include <linux/mroute6.h>
    27	#include <linux/slab.h>
    28	#include <linux/indirect_call_wrapper.h>
    29	
    30	#include <linux/netfilter.h>
    31	#include <linux/netfilter_ipv6.h>
    32	
    33	#include <net/sock.h>
    34	#include <net/snmp.h>
    35	
    36	#include <net/ipv6.h>
    37	#include <net/protocol.h>
    38	#include <net/transp_v6.h>
    39	#include <net/rawv6.h>
    40	#include <net/ndisc.h>
    41	#include <net/ip6_route.h>
    42	#include <net/addrconf.h>
    43	#include <net/xfrm.h>
    44	#include <net/inet_ecn.h>
    45	#include <net/dst_metadata.h>
    46	
    47	struct ip6_route_input_hint {
    48		unsigned long	refdst;
    49		struct in6_addr daddr;
    50	};
    51	
    52	INDIRECT_CALLABLE_DECLARE(void udp_v6_early_demux(struct sk_buff *));
    53	INDIRECT_CALLABLE_DECLARE(void tcp_v6_early_demux(struct sk_buff *));
    54	static void ip6_rcv_finish_core(struct net *net, struct sock *sk,
    55					struct sk_buff *skb,
    56					struct ip6_route_input_hint *hint)
    57	{
    58		void (*edemux)(struct sk_buff *skb);
    59	
    60		if (net->ipv4.sysctl_ip_early_demux && !skb_dst(skb) && skb->sk == NULL) {
    61			const struct inet6_protocol *ipprot;
    62	
    63			ipprot = rcu_dereference(inet6_protos[ipv6_hdr(skb)->nexthdr]);
    64			if (ipprot && (edemux = READ_ONCE(ipprot->early_demux)))
    65				INDIRECT_CALL_2(edemux, tcp_v6_early_demux,
    66						udp_v6_early_demux, skb);
    67		}
    68	
    69		if (skb_valid_dst(skb))
    70			return;
    71	
    72		if (hint && ipv6_addr_equal(&hint->daddr, &ipv6_hdr(skb)->daddr))
    73			__skb_dst_copy(skb, hint->refdst);
    74		else
    75			ip6_route_input(skb);
    76	}
    77	
    78	int ip6_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
    79	{
    80		/* if ingress device is enslaved to an L3 master device pass the
    81		 * skb to its handler for processing
    82		 */
    83		skb = l3mdev_ip6_rcv(skb);
    84		if (!skb)
    85			return NET_RX_SUCCESS;
    86		ip6_rcv_finish_core(net, sk, skb, NULL);
    87	
    88		return dst_input(skb);
    89	}
    90	
    91	static void ip6_sublist_rcv_finish(struct list_head *head)
    92	{
    93		struct sk_buff *skb, *next;
    94	
    95		list_for_each_entry_safe(skb, next, head, list) {
    96			skb_list_del_init(skb);
    97			dst_input(skb);
    98		}
    99	}
   100	
   101	static void ip6_list_rcv_finish(struct net *net, struct sock *sk,
   102					struct list_head *head)
   103	{
   104		struct ip6_route_input_hint _hint, *hint = NULL;
   105		struct dst_entry *curr_dst = NULL;
   106		struct sk_buff *skb, *next;
   107		struct list_head sublist;
   108	
   109		INIT_LIST_HEAD(&sublist);
   110		list_for_each_entry_safe(skb, next, head, list) {
   111			struct dst_entry *dst;
   112	
   113			skb_list_del_init(skb);
   114			/* if ingress device is enslaved to an L3 master device pass the
   115			 * skb to its handler for processing
   116			 */
   117			skb = l3mdev_ip6_rcv(skb);
   118			if (!skb)
   119				continue;
   120			ip6_rcv_finish_core(net, sk, skb, hint);
   121			dst = skb_dst(skb);
   122			if (curr_dst != dst) {
   123	#ifndef CONFIG_IPV6_SUBTREES
 > 124				if (!net->ipv6.fib6_has_custom_rules) {
   125					_hint.refdst = skb->_skb_refdst;
   126					memcpy(&_hint.daddr, &ipv6_hdr(skb)->daddr,
   127					       sizeof(_hint.daddr));
   128					hint = &_hint;
   129				}
   130	#endif
   131	
   132				/* dispatch old sublist */
   133				if (!list_empty(&sublist))
   134					ip6_sublist_rcv_finish(&sublist);
   135				/* start new sublist */
   136				INIT_LIST_HEAD(&sublist);
   137				curr_dst = dst;
   138			}
   139			list_add_tail(&skb->list, &sublist);
   140		}
   141		/* dispatch final sublist */
   142		ip6_sublist_rcv_finish(&sublist);
   143	}
   144	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ