<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/net/openvswitch, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-05-19T08:19:32Z</updated>
<entry>
<title>openvswitch: Don't swap table in nlattr_set() after OVS_ATTR_NESTED is found</title>
<updated>2018-05-19T08:19:32Z</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2018-05-03T16:13:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f8dae3d35cb2cbd87cd67e1a73fdf0cb33505002'/>
<id>urn:sha1:f8dae3d35cb2cbd87cd67e1a73fdf0cb33505002</id>
<content type='text'>
[ Upstream commit 72f17baf2352ded6a1d3f4bb2d15da8c678cd2cb ]

If an OVS_ATTR_NESTED attribute type is found while walking
through netlink attributes, we call nlattr_set() recursively
passing the length table for the following nested attributes, if
different from the current one.

However, once we're done with those sub-nested attributes, we
should continue walking through attributes using the current
table, instead of using the one related to the sub-nested
attributes.

For example, given this sequence:

1  OVS_KEY_ATTR_PRIORITY
2  OVS_KEY_ATTR_TUNNEL
3	OVS_TUNNEL_KEY_ATTR_ID
4	OVS_TUNNEL_KEY_ATTR_IPV4_SRC
5	OVS_TUNNEL_KEY_ATTR_IPV4_DST
6	OVS_TUNNEL_KEY_ATTR_TTL
7	OVS_TUNNEL_KEY_ATTR_TP_SRC
8	OVS_TUNNEL_KEY_ATTR_TP_DST
9  OVS_KEY_ATTR_IN_PORT
10 OVS_KEY_ATTR_SKB_MARK
11 OVS_KEY_ATTR_MPLS

we switch to the 'ovs_tunnel_key_lens' table on attribute #3,
and we don't switch back to 'ovs_key_lens' while setting
attributes #9 to #11 in the sequence. As OVS_KEY_ATTR_MPLS
evaluates to 21, and the array size of 'ovs_tunnel_key_lens' is
15, we also get this kind of KASan splat while accessing the
wrong table:

[ 7654.586496] ==================================================================
[ 7654.594573] BUG: KASAN: global-out-of-bounds in nlattr_set+0x164/0xde9 [openvswitch]
[ 7654.603214] Read of size 4 at addr ffffffffc169ecf0 by task handler29/87430
[ 7654.610983]
[ 7654.612644] CPU: 21 PID: 87430 Comm: handler29 Kdump: loaded Not tainted 3.10.0-866.el7.test.x86_64 #1
[ 7654.623030] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.1.7 06/16/2016
[ 7654.631379] Call Trace:
[ 7654.634108]  [&lt;ffffffffb65a7c50&gt;] dump_stack+0x19/0x1b
[ 7654.639843]  [&lt;ffffffffb53ff373&gt;] print_address_description+0x33/0x290
[ 7654.647129]  [&lt;ffffffffc169b37b&gt;] ? nlattr_set+0x164/0xde9 [openvswitch]
[ 7654.654607]  [&lt;ffffffffb53ff812&gt;] kasan_report.part.3+0x242/0x330
[ 7654.661406]  [&lt;ffffffffb53ff9b4&gt;] __asan_report_load4_noabort+0x34/0x40
[ 7654.668789]  [&lt;ffffffffc169b37b&gt;] nlattr_set+0x164/0xde9 [openvswitch]
[ 7654.676076]  [&lt;ffffffffc167ef68&gt;] ovs_nla_get_match+0x10c8/0x1900 [openvswitch]
[ 7654.684234]  [&lt;ffffffffb61e9cc8&gt;] ? genl_rcv+0x28/0x40
[ 7654.689968]  [&lt;ffffffffb61e7733&gt;] ? netlink_unicast+0x3f3/0x590
[ 7654.696574]  [&lt;ffffffffc167dea0&gt;] ? ovs_nla_put_tunnel_info+0xb0/0xb0 [openvswitch]
[ 7654.705122]  [&lt;ffffffffb4f41b50&gt;] ? unwind_get_return_address+0xb0/0xb0
[ 7654.712503]  [&lt;ffffffffb65d9355&gt;] ? system_call_fastpath+0x1c/0x21
[ 7654.719401]  [&lt;ffffffffb4f41d79&gt;] ? update_stack_state+0x229/0x370
[ 7654.726298]  [&lt;ffffffffb4f41d79&gt;] ? update_stack_state+0x229/0x370
[ 7654.733195]  [&lt;ffffffffb53fe4b5&gt;] ? kasan_unpoison_shadow+0x35/0x50
[ 7654.740187]  [&lt;ffffffffb53fe62a&gt;] ? kasan_kmalloc+0xaa/0xe0
[ 7654.746406]  [&lt;ffffffffb53fec32&gt;] ? kasan_slab_alloc+0x12/0x20
[ 7654.752914]  [&lt;ffffffffb53fe711&gt;] ? memset+0x31/0x40
[ 7654.758456]  [&lt;ffffffffc165bf92&gt;] ovs_flow_cmd_new+0x2b2/0xf00 [openvswitch]

[snip]

[ 7655.132484] The buggy address belongs to the variable:
[ 7655.138226]  ovs_tunnel_key_lens+0xf0/0xffffffffffffd400 [openvswitch]
[ 7655.145507]
[ 7655.147166] Memory state around the buggy address:
[ 7655.152514]  ffffffffc169eb80: 00 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa
[ 7655.160585]  ffffffffc169ec00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 7655.168644] &gt;ffffffffc169ec80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa
[ 7655.176701]                                                              ^
[ 7655.184372]  ffffffffc169ed00: fa fa fa fa 00 00 00 00 fa fa fa fa 00 00 00 05
[ 7655.192431]  ffffffffc169ed80: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
[ 7655.200490] ==================================================================

Reported-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Fixes: 982b52700482 ("openvswitch: Fix mask generation for nested attributes.")
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Reviewed-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>openvswitch: meter: fix the incorrect calculation of max delta_t</title>
<updated>2018-03-12T02:48:59Z</updated>
<author>
<name>zhangliping</name>
<email>zhangliping02@baidu.com</email>
</author>
<published>2018-03-09T02:08:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ddc502dfed600bff0b61d899f70d95b76223fdfc'/>
<id>urn:sha1:ddc502dfed600bff0b61d899f70d95b76223fdfc</id>
<content type='text'>
Max delat_t should be the full_bucket/rate instead of the full_bucket.
Also report EINVAL if the rate is zero.

Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure")
Cc: Andy Zhou &lt;azhou@ovn.org&gt;
Signed-off-by: zhangliping &lt;zhangliping02@baidu.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: Remove padding from packet before L3+ conntrack processing</title>
<updated>2018-02-01T14:46:22Z</updated>
<author>
<name>Ed Swierk</name>
<email>eswierk@skyportsystems.com</email>
</author>
<published>2018-02-01T02:48:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9382fe71c0058465e942a633869629929102843d'/>
<id>urn:sha1:9382fe71c0058465e942a633869629929102843d</id>
<content type='text'>
IPv4 and IPv6 packets may arrive with lower-layer padding that is not
included in the L3 length. For example, a short IPv4 packet may have
up to 6 bytes of padding following the IP payload when received on an
Ethernet device with a minimum packet length of 64 bytes.

Higher-layer processing functions in netfilter (e.g. nf_ip_checksum(),
and help() in nf_conntrack_ftp) assume skb-&gt;len reflects the length of
the L3 header and payload, rather than referring back to
ip_hdr-&gt;tot_len or ipv6_hdr-&gt;payload_len, and get confused by
lower-layer padding.

In the normal IPv4 receive path, ip_rcv() trims the packet to
ip_hdr-&gt;tot_len before invoking netfilter hooks. In the IPv6 receive
path, ip6_rcv() does the same using ipv6_hdr-&gt;payload_len. Similarly
in the br_netfilter receive path, br_validate_ipv4() and
br_validate_ipv6() trim the packet to the L3 length before invoking
netfilter hooks.

Currently in the OVS conntrack receive path, ovs_ct_execute() pulls
the skb to the L3 header but does not trim it to the L3 length before
calling nf_conntrack_in(NF_INET_PRE_ROUTING). When
nf_conntrack_proto_tcp encounters a packet with lower-layer padding,
nf_ip_checksum() fails causing a "nf_ct_tcp: bad TCP checksum" log
message. While extra zero bytes don't affect the checksum, the length
in the IP pseudoheader does. That length is based on skb-&gt;len, and
without trimming, it doesn't match the length the sender used when
computing the checksum.

In ovs_ct_execute(), trim the skb to the L3 length before higher-layer
processing.

Signed-off-by: Ed Swierk &lt;eswierk@skyportsystems.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: meter: Use 64-bit arithmetic instead of 32-bit</title>
<updated>2018-01-31T15:26:30Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-01-31T04:55:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5b7789e8fa8f353ad8f2c44de2385cb161b22d32'/>
<id>urn:sha1:5b7789e8fa8f353ad8f2c44de2385cb161b22d32</id>
<content type='text'>
Add suffix LL to constant 1000 in order to give the compiler
complete information about the proper arithmetic to use. Notice
that this constant is used in a context that expects an expression
of type long long int (64 bits, signed).

The expression (band-&gt;burst_size + band-&gt;rate) * 1000 is currently
being evaluated using 32-bit arithmetic.

Addresses-Coverity-ID: 1461563 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: add erspan version I and II support</title>
<updated>2018-01-26T02:39:43Z</updated>
<author>
<name>William Tu</name>
<email>u9012063@gmail.com</email>
</author>
<published>2018-01-25T21:20:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fc1372f89ffe1f58b589643b75f679e452350703'/>
<id>urn:sha1:fc1372f89ffe1f58b589643b75f679e452350703</id>
<content type='text'>
The patch adds support for openvswitch to configure erspan
v1 and v2.  The OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS attr is added
to uapi as a binary blob to support all ERSPAN v1 and v2's
fields.  Note that Previous commit "openvswitch: Add erspan tunnel
support." was reverted since it does not design properly.

Signed-off-by: William Tu &lt;u9012063@gmail.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>flow_netlink: Remove unneeded semicolons</title>
<updated>2018-01-18T21:25:01Z</updated>
<author>
<name>Christopher Díaz Riveros</name>
<email>chrisadr@gentoo.org</email>
</author>
<published>2018-01-17T21:10:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=89290b831ec1a0b233fdc7aaad84acdf4ebbf6aa'/>
<id>urn:sha1:89290b831ec1a0b233fdc7aaad84acdf4ebbf6aa</id>
<content type='text'>
Trivial fix removes unneeded semicolons after if blocks.

This issue was detected by using the Coccinelle software.

Signed-off-by: Christopher Díaz Riveros &lt;chrisadr@gentoo.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2018-01-17T05:10:42Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2018-01-17T05:00:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c02b3741eb99a1ec733e6134c53ba59e43e19e97'/>
<id>urn:sha1:c02b3741eb99a1ec733e6134c53ba59e43e19e97</id>
<content type='text'>
Overlapping changes all over.

The mini-qdisc bits were a little bit tricky, however.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "openvswitch: Add erspan tunnel support."</title>
<updated>2018-01-15T19:33:16Z</updated>
<author>
<name>William Tu</name>
<email>u9012063@gmail.com</email>
</author>
<published>2018-01-12T20:29:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=95a332088ecb113c2e8753fa3f1df9b0dda9beec'/>
<id>urn:sha1:95a332088ecb113c2e8753fa3f1df9b0dda9beec</id>
<content type='text'>
This reverts commit ceaa001a170e43608854d5290a48064f57b565ed.

The OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS attr should be designed
as a nested attribute to support all ERSPAN v1 and v2's fields.
The current attr is a be32 supporting only one field.  Thus, this
patch reverts it and later patch will redo it using nested attr.

Signed-off-by: William Tu &lt;u9012063@gmail.com&gt;
Cc: Jiri Benc &lt;jbenc@redhat.com&gt;
Cc: Pravin Shelar &lt;pshelar@ovn.org&gt;
Acked-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ovs: remove unused hardirq.h</title>
<updated>2018-01-09T01:59:25Z</updated>
<author>
<name>Yang Shi</name>
<email>yang.s@alibaba-inc.com</email>
</author>
<published>2018-01-08T19:52:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=419091f1cc8afce943fd12af0df26201ee20c1c0'/>
<id>urn:sha1:419091f1cc8afce943fd12af0df26201ee20c1c0</id>
<content type='text'>
Preempt counter APIs have been split out, currently, hardirq.h just
includes irq_enter/exit APIs which are not used by openvswitch at all.

So, remove the unused hardirq.h.

Signed-off-by: Yang Shi &lt;yang.s@alibaba-inc.com&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: dev@openvswitch.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>openvswitch: drop unneeded newline</title>
<updated>2018-01-02T18:49:53Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2017-12-27T14:51:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e0b10844d9e617a1a5ce2ddf73d38aaa0a47a2a4'/>
<id>urn:sha1:e0b10844d9e617a1a5ce2ddf73d38aaa0a47a2a4</id>
<content type='text'>
OVS_NLERR prints a newline at the end of the message string, so the
message string does not need to include a newline explicitly.  Done
using Coccinelle.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
