<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/openvswitch, branch v5.10</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.10</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.10'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-12-04T23:43:14Z</updated>
<entry>
<title>openvswitch: fix error return code in validate_and_copy_dec_ttl()</title>
<updated>2020-12-04T23:43:14Z</updated>
<author>
<name>Wang Hai</name>
<email>wanghai38@huawei.com</email>
</author>
<published>2020-12-04T11:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bb2da7651a47dc042cb7fc9c40cd77092b6b4445'/>
<id>urn:sha1:bb2da7651a47dc042cb7fc9c40cd77092b6b4445</id>
<content type='text'>
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Changing 'return start' to 'return action_start' can fix this bug.

Fixes: 69929d4c49e1 ("net: openvswitch: fix TTL decrement action netlink message format")
Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Wang Hai &lt;wanghai38@huawei.com&gt;
Reviewed-by: Eelco Chaudron &lt;echaudro@redhat.com&gt;
Link: https://lore.kernel.org/r/20201204114314.1596-1-wanghai38@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: openvswitch: ensure LSE is pullable before reading it</title>
<updated>2020-12-03T19:13:29Z</updated>
<author>
<name>Davide Caratti</name>
<email>dcaratti@redhat.com</email>
</author>
<published>2020-12-03T09:46:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43c13605bad44b8abbc9776d6e63f62ccb7a47d6'/>
<id>urn:sha1:43c13605bad44b8abbc9776d6e63f62ccb7a47d6</id>
<content type='text'>
when openvswitch is configured to mangle the LSE, the current value is
read from the packet dereferencing 4 bytes at mpls_hdr(): ensure that
the label is contained in the skb "linear" area.

Found by code inspection.

Fixes: d27cf5c59a12 ("net: core: add MPLS update core helper and use in OvS")
Signed-off-by: Davide Caratti &lt;dcaratti@redhat.com&gt;
Link: https://lore.kernel.org/r/aa099f245d93218b84b5c056b67b6058ccf81a66.1606987185.git.dcaratti@redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: openvswitch: fix TTL decrement action netlink message format</title>
<updated>2020-11-27T19:03:06Z</updated>
<author>
<name>Eelco Chaudron</name>
<email>echaudro@redhat.com</email>
</author>
<published>2020-11-24T12:34:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69929d4c49e182f8526d42c43b37b460d562d3a0'/>
<id>urn:sha1:69929d4c49e182f8526d42c43b37b460d562d3a0</id>
<content type='text'>
Currently, the openvswitch module is not accepting the correctly formated
netlink message for the TTL decrement action. For both setting and getting
the dec_ttl action, the actions should be nested in the
OVS_DEC_TTL_ATTR_ACTION attribute as mentioned in the openvswitch.h uapi.

When the original patch was sent, it was tested with a private OVS userspace
implementation. This implementation was unfortunately not upstreamed and
reviewed, hence an erroneous version of this patch was sent out.

Leaving the patch as-is would cause problems as the kernel module could
interpret additional attributes as actions and vice-versa, due to the
actions not being encapsulated/nested within the actual attribute, but
being concatinated after it.

Fixes: 744676e77720 ("openvswitch: add TTL decrement action")
Signed-off-by: Eelco Chaudron &lt;echaudro@redhat.com&gt;
Link: https://lore.kernel.org/r/160622121495.27296.888010441924340582.stgit@wsfd-netdev64.ntdv.lab.eng.bos.redhat.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: openvswitch: silence suspicious RCU usage warning</title>
<updated>2020-11-04T00:57:42Z</updated>
<author>
<name>Eelco Chaudron</name>
<email>echaudro@redhat.com</email>
</author>
<published>2020-11-03T08:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fea07a487c6dd422dc8837237c9d2bc7c33119af'/>
<id>urn:sha1:fea07a487c6dd422dc8837237c9d2bc7c33119af</id>
<content type='text'>
Silence suspicious RCU usage warning in ovs_flow_tbl_masks_cache_resize()
by replacing rcu_dereference() with rcu_dereference_ovsl().

In addition, when creating a new datapath, make sure it's configured under
the ovs_lock.

Fixes: 9bf24f594c6a ("net: openvswitch: make masks cache size configurable")
Reported-by: syzbot+9a8f8bfcc56e8578016c@syzkaller.appspotmail.com
Signed-off-by: Eelco Chaudron &lt;echaudro@redhat.com&gt;
Link: https://lore.kernel.org/r/160439190002.56943.1418882726496275961.stgit@ebuild
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: openvswitch: fix to make sure flow_lookup() is not preempted</title>
<updated>2020-10-18T19:29:36Z</updated>
<author>
<name>Eelco Chaudron</name>
<email>echaudro@redhat.com</email>
</author>
<published>2020-10-17T18:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f981fc3d515a588c389242b7e3a71487b40571a5'/>
<id>urn:sha1:f981fc3d515a588c389242b7e3a71487b40571a5</id>
<content type='text'>
The flow_lookup() function uses per CPU variables, which must be called
with BH disabled. However, this is fine in the general NAPI use case
where the local BH is disabled. But, it's also called from the netlink
context. The below patch makes sure that even in the netlink path, the
BH is disabled.

In addition, u64_stats_update_begin() requires a lock to ensure one writer
which is not ensured here. Making it per-CPU and disabling NAPI (softirq)
ensures that there is always only one writer.

Fixes: eac87c413bf9 ("net: openvswitch: reorder masks array based on usage")
Reported-by: Juri Lelli &lt;jlelli@redhat.com&gt;
Signed-off-by: Eelco Chaudron &lt;echaudro@redhat.com&gt;
Link: https://lore.kernel.org/r/160295903253.7789.826736662555102345.stgit@ebuild
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: openvswitch: use new function dev_fetch_sw_netstats</title>
<updated>2020-10-14T00:33:49Z</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2020-10-12T08:19:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3569939a811e6d87df6dbd64235b9603a576432c'/>
<id>urn:sha1:3569939a811e6d87df6dbd64235b9603a576432c</id>
<content type='text'>
Simplify the code by using new function dev_fetch_sw_netstats().

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Link: https://lore.kernel.org/r/5e52dc91-97b1-82b0-214b-65d404e4a2ec@gmail.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2020-10-08T22:44:50Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-10-08T22:44:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d49aea13f1e35869158abe7e314e16dc8f50ff1'/>
<id>urn:sha1:9d49aea13f1e35869158abe7e314e16dc8f50ff1</id>
<content type='text'>
Small conflict around locking in rxrpc_process_event() -
channel_lock moved to bundle in next, while state lock
needs _bh() from net.

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>openvswitch: handle DNAT tuple collision</title>
<updated>2020-10-08T19:20:35Z</updated>
<author>
<name>Dumitru Ceara</name>
<email>dceara@redhat.com</email>
</author>
<published>2020-10-07T15:48:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8aa7b526dc0b5dbf40c1b834d76a667ad672a410'/>
<id>urn:sha1:8aa7b526dc0b5dbf40c1b834d76a667ad672a410</id>
<content type='text'>
With multiple DNAT rules it's possible that after destination
translation the resulting tuples collide.

For example, two openvswitch flows:
nw_dst=10.0.0.10,tp_dst=10, actions=ct(commit,table=2,nat(dst=20.0.0.1:20))
nw_dst=10.0.0.20,tp_dst=10, actions=ct(commit,table=2,nat(dst=20.0.0.1:20))

Assuming two TCP clients initiating the following connections:
10.0.0.10:5000-&gt;10.0.0.10:10
10.0.0.10:5000-&gt;10.0.0.20:10

Both tuples would translate to 10.0.0.10:5000-&gt;20.0.0.1:20 causing
nf_conntrack_confirm() to fail because of tuple collision.

Netfilter handles this case by allocating a null binding for SNAT at
egress by default.  Perform the same operation in openvswitch for DNAT
if no explicit SNAT is requested by the user and allocate a null binding
for SNAT for packets in the "original" direction.

Reported-at: https://bugzilla.redhat.com/1877128
Suggested-by: Florian Westphal &lt;fw@strlen.de&gt;
Fixes: 05752523e565 ("openvswitch: Interface with NAT.")
Signed-off-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: openvswitch: use dev_sw_netstats_rx_add()</title>
<updated>2020-10-06T13:23:21Z</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2020-10-05T20:37:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e40b3727f90b186d5845c96b14f7a1e9f965b712'/>
<id>urn:sha1:e40b3727f90b186d5845c96b14f7a1e9f965b712</id>
<content type='text'>
use new helper for netstats settings

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: openvswitch: Constify static struct genl_small_ops</title>
<updated>2020-10-05T04:13:36Z</updated>
<author>
<name>Rikard Falkeborn</name>
<email>rikard.falkeborn@gmail.com</email>
</author>
<published>2020-10-04T23:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b980b313e5a2ace214322af9f3183c269b5c55ae'/>
<id>urn:sha1:b980b313e5a2ace214322af9f3183c269b5c55ae</id>
<content type='text'>
The only usage of these is to assign their address to the small_ops field
in the genl_family struct, which is a const pointer, and applying
ARRAY_SIZE() on them. Make them const to allow the compiler to put them
in read-only memory.

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
