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:   Thu, 6 May 2021 05:47:53 +0800
From:   kernel test robot <lkp@...el.com>
To:     Toms Atteka <cpp.code.lv@...il.com>, netdev@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        Toms Atteka <cpp.code.lv@...il.com>
Subject: Re: [PATCH] net-next: openvswitch: IPv6: Add IPv6 extension header
 support

Hi Toms,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net/master]
[also build test WARNING on ipsec/master ipvs/master net-next/master linus/master v5.12 next-20210505]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Toms-Atteka/net-next-openvswitch-IPv6-Add-IPv6-extension-header-support/20210506-021045
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 4c7a94286ef7ac7301d633f17519fb1bb89d7550
config: x86_64-randconfig-a012-20210505 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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
        # https://github.com/0day-ci/linux/commit/ef546bf606b0f17bf7ce250cd4e619528369a8ec
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Toms-Atteka/net-next-openvswitch-IPv6-Add-IPv6-extension-header-support/20210506-021045
        git checkout ef546bf606b0f17bf7ce250cd4e619528369a8ec
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> net/openvswitch/flow.c:268:6: warning: no previous prototype for function 'get_ipv6_ext_hdrs' [-Wmissing-prototypes]
   void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
        ^
   net/openvswitch/flow.c:268:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
   ^
   static 
   1 warning generated.


vim +/get_ipv6_ext_hdrs +268 net/openvswitch/flow.c

   241	
   242	/**
   243	 * Parses packet and sets IPv6 extension header flags.
   244	 *
   245	 * skb          buffer where extension header data starts in packet
   246	 * nh           ipv6 header
   247	 * ext_hdrs     flags are stored here
   248	 *
   249	 * OFPIEH12_UNREP is set if more than one of a given IPv6 extension header
   250	 * is unexpectedly encountered. (Two destination options headers may be
   251	 * expected and would not cause this bit to be set.)
   252	 *
   253	 * OFPIEH12_UNSEQ is set if IPv6 extension headers were not in the order
   254	 * preferred (but not required) by RFC 2460:
   255	 *
   256	 * When more than one extension header is used in the same packet, it is
   257	 * recommended that those headers appear in the following order:
   258	 *      IPv6 header
   259	 *      Hop-by-Hop Options header
   260	 *      Destination Options header
   261	 *      Routing header
   262	 *      Fragment header
   263	 *      Authentication header
   264	 *      Encapsulating Security Payload header
   265	 *      Destination Options header
   266	 *      upper-layer header
   267	 */
 > 268	void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, u16 *ext_hdrs)
   269	{
   270		int next_type = nh->nexthdr;
   271		unsigned int start = skb_network_offset(skb) + sizeof(struct ipv6hdr);
   272		int dest_options_header_count = 0;
   273	
   274		*ext_hdrs = 0;
   275	
   276		while (ipv6_ext_hdr(next_type)) {
   277			struct ipv6_opt_hdr _hdr, *hp;
   278	
   279			switch (next_type) {
   280			case IPPROTO_NONE:
   281				*ext_hdrs |= OFPIEH12_NONEXT;
   282				/* stop parsing */
   283				return;
   284	
   285			case IPPROTO_ESP:
   286				if (*ext_hdrs & OFPIEH12_ESP)
   287					*ext_hdrs |= OFPIEH12_UNREP;
   288				if ((*ext_hdrs & ~(OFPIEH12_HOP |
   289						   OFPIEH12_DEST |
   290						   OFPIEH12_ROUTER |
   291						   IPPROTO_FRAGMENT |
   292						   OFPIEH12_AUTH |
   293						   OFPIEH12_UNREP)) ||
   294				    dest_options_header_count >= 2)
   295					*ext_hdrs |= OFPIEH12_UNSEQ;
   296				*ext_hdrs |= OFPIEH12_ESP;
   297				break;
   298	
   299			case IPPROTO_AH:
   300				if (*ext_hdrs & OFPIEH12_AUTH)
   301					*ext_hdrs |= OFPIEH12_UNREP;
   302				if ((*ext_hdrs & ~(OFPIEH12_HOP |
   303						   OFPIEH12_DEST |
   304						   OFPIEH12_ROUTER |
   305						   IPPROTO_FRAGMENT |
   306						   OFPIEH12_UNREP)) ||
   307				    dest_options_header_count >= 2)
   308					*ext_hdrs |= OFPIEH12_UNSEQ;
   309				*ext_hdrs |= OFPIEH12_AUTH;
   310				break;
   311	
   312			case IPPROTO_DSTOPTS:
   313				if (dest_options_header_count == 0) {
   314					if (*ext_hdrs & ~(OFPIEH12_HOP |
   315							  OFPIEH12_UNREP))
   316						*ext_hdrs |= OFPIEH12_UNSEQ;
   317					*ext_hdrs |= OFPIEH12_DEST;
   318				} else if (dest_options_header_count == 1) {
   319					if (*ext_hdrs & ~(OFPIEH12_HOP |
   320							  OFPIEH12_DEST |
   321							  OFPIEH12_ROUTER |
   322							  OFPIEH12_FRAG |
   323							  OFPIEH12_AUTH |
   324							  OFPIEH12_ESP |
   325							  OFPIEH12_UNREP))
   326						*ext_hdrs |= OFPIEH12_UNSEQ;
   327				} else {
   328					*ext_hdrs |= OFPIEH12_UNREP;
   329				}
   330				dest_options_header_count++;
   331				break;
   332	
   333			case IPPROTO_FRAGMENT:
   334				if (*ext_hdrs & OFPIEH12_FRAG)
   335					*ext_hdrs |= OFPIEH12_UNREP;
   336				if ((*ext_hdrs & ~(OFPIEH12_HOP |
   337						   OFPIEH12_DEST |
   338						   OFPIEH12_ROUTER |
   339						   OFPIEH12_UNREP)) ||
   340				    dest_options_header_count >= 2)
   341					*ext_hdrs |= OFPIEH12_UNSEQ;
   342				*ext_hdrs |= OFPIEH12_FRAG;
   343				break;
   344	
   345			case IPPROTO_ROUTING:
   346				if (*ext_hdrs & OFPIEH12_ROUTER)
   347					*ext_hdrs |= OFPIEH12_UNREP;
   348				if ((*ext_hdrs & ~(OFPIEH12_HOP |
   349						   OFPIEH12_DEST |
   350						   OFPIEH12_UNREP)) ||
   351				    dest_options_header_count >= 2)
   352					*ext_hdrs |= OFPIEH12_UNSEQ;
   353				*ext_hdrs |= OFPIEH12_ROUTER;
   354				break;
   355	
   356			case IPPROTO_HOPOPTS:
   357				if (*ext_hdrs & OFPIEH12_HOP)
   358					*ext_hdrs |= OFPIEH12_UNREP;
   359				/* OFPIEH12_HOP is set to 1 if a hop-by-hop IPv6
   360				 * extension header is present as the first extension
   361				 * header in the pac	ket.
   362				 */
   363				if (*ext_hdrs == 0)
   364					*ext_hdrs |= OFPIEH12_HOP;
   365				else
   366					*ext_hdrs |= OFPIEH12_UNSEQ;
   367				break;
   368	
   369			default:
   370				return;
   371			}
   372	
   373			hp = skb_header_pointer(skb, start, sizeof(_hdr), &_hdr);
   374			if (!hp)
   375				break;
   376			next_type = hp->nexthdr;
   377			start += ipv6_optlen(hp);
   378		};
   379	}
   380	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ