Re: [ovs-dev] [PATCH] net: openvswitch: Fix Use-After-Free in ovs_ct_exit

2024-04-22 Thread Eric Dumazet via dev
On Mon, Apr 22, 2024 at 11:37 AM Hyunwoo Kim wrote: > > Since kfree_rcu, which is called in the hlist_for_each_entry_rcu traversal > of ovs_ct_limit_exit, is not part of the RCU read critical section, it > is possible that the RCU grace period will pass during the traversal and > the key will be

Re: [ovs-dev] [PATCH net 1/2] net: openvswitch: limit the number of recursions from action sets

2024-02-06 Thread Eric Dumazet via dev
On Tue, Feb 6, 2024 at 3:55 PM Aaron Conole wrote: > > > Oops - I didn't consider it. > > Given that, maybe the best approach would not to rely on per-cpu > counter. I'll respin in the next series with a depth counter that I pass > to the function instead and compare that. I guess that should

Re: [ovs-dev] [PATCH net 1/2] net: openvswitch: limit the number of recursions from action sets

2024-02-06 Thread Eric Dumazet via dev
On Tue, Feb 6, 2024 at 2:11 PM Aaron Conole wrote: > > The ovs module allows for some actions to recursively contain an action > list for complex scenarios, such as sampling, checking lengths, etc. > When these actions are copied into the internal flow table, they are > evaluated to validate that

Re: [ovs-dev] [PATCH net-next v2] openvswitch: reduce stack usage in do_execute_actions

2023-09-21 Thread Eric Dumazet via dev
On Thu, Sep 21, 2023 at 9:42 PM Ilya Maximets wrote: > > do_execute_actions() function can be called recursively multiple > times while executing actions that require pipeline forking or > recirculations. It may also be re-entered multiple times if the packet > leaves openvswitch module and

Re: [ovs-dev] [PATCH net-next] openvswitch: reduce stack usage in do_execute_actions

2023-09-21 Thread Eric Dumazet via dev
On Thu, Sep 21, 2023 at 9:03 PM Ilya Maximets wrote: > > do_execute_actions() function can be called recursively multiple > times while executing actions that require pipeline forking or > recirculations. It may also be re-entered multiple times if the packet > leaves openvswitch module and

Re: [ovs-dev] [PATCH net v3] net: openvswitch: fix race on port output

2023-04-07 Thread Eric Dumazet via dev
On Wed, Apr 5, 2023 at 9:53 AM Felix Huettner wrote: > > assume the following setup on a single machine: > 1. An openvswitch instance with one bridge and default flows > 2. two network namespaces "server" and "client" > 3. two ovs interfaces "server" and "client" on the bridge > 4. for each ovs

Re: [ovs-dev] [PATCH net v2] net: openvswitch: fix race on port output

2023-04-04 Thread Eric Dumazet via dev
On Tue, Apr 4, 2023 at 9:33 AM Felix Huettner wrote: > > assume the following setup on a single machine: > 1. An openvswitch instance with one bridge and default flows > 2. two network namespaces "server" and "client" > 3. two ovs interfaces "server" and "client" on the bridge > 4. for each ovs

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 9:04 PM Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 8:19 PM Ilya Maximets wrote: > > > > On 6/22/22 19:03, Eric Dumazet wrote: > > > On Wed, Jun 22, 2022 at 6:47 PM Eric Dumazet wrote: > > >> > > >> On Wed, Jun 22, 2022 at 6:39 PM Eric Dumazet wrote: > > >>> > > >>>

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 8:19 PM Ilya Maximets wrote: > > On 6/22/22 19:03, Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 6:47 PM Eric Dumazet wrote: > >> > >> On Wed, Jun 22, 2022 at 6:39 PM Eric Dumazet wrote: > >>> > >>> On Wed, Jun 22, 2022 at 6:29 PM Eric Dumazet wrote: > > On

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 6:47 PM Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 6:39 PM Eric Dumazet wrote: > > > > On Wed, Jun 22, 2022 at 6:29 PM Eric Dumazet wrote: > > > > > > On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > > > > > > > On 6/22/22 13:43, Eric Dumazet wrote: > > > >

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 6:39 PM Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 6:29 PM Eric Dumazet wrote: > > > > On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > > > > > On 6/22/22 13:43, Eric Dumazet wrote: > > > > > > > > I tested the patch below and it seems to fix the issue seen

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 6:29 PM Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > > > On 6/22/22 13:43, Eric Dumazet wrote: > > > > > I tested the patch below and it seems to fix the issue seen > > with OVS testsuite. Though it's not obvious for me why this > >

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > On 6/22/22 13:43, Eric Dumazet wrote: > > I tested the patch below and it seems to fix the issue seen > with OVS testsuite. Though it's not obvious for me why this > happens. Can you explain a bit more? Anyway, I am not sure we can call

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 4:26 PM Ilya Maximets wrote: > > On 6/22/22 13:43, Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 1:32 PM Ilya Maximets wrote: > >> > >> On 6/22/22 12:36, Eric Dumazet wrote: > >>> On Wed, Jun 22, 2022 at 12:28 PM Florian Westphal wrote: > > Eric Dumazet

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 1:32 PM Ilya Maximets wrote: > > On 6/22/22 12:36, Eric Dumazet wrote: > > On Wed, Jun 22, 2022 at 12:28 PM Florian Westphal wrote: > >> > >> Eric Dumazet wrote: > >>> On Sun, Jun 19, 2022 at 2:39 AM Ilya Maximets wrote: > > Open vSwitch system test suite is

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 12:28 PM Florian Westphal wrote: > > Eric Dumazet wrote: > > On Sun, Jun 19, 2022 at 2:39 AM Ilya Maximets wrote: > > > > > > Open vSwitch system test suite is broken due to inability to > > > load/unload netfilter modules. kworker thread is getting trapped > > > in the

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Wed, Jun 22, 2022 at 12:02 PM Eric Dumazet wrote: > > On Sun, Jun 19, 2022 at 2:39 AM Ilya Maximets wrote: > > > > Open vSwitch system test suite is broken due to inability to > > load/unload netfilter modules. kworker thread is getting trapped > > in the infinite loop while running a net

Re: [ovs-dev] [PATCH net] net: ensure all external references are released in deferred skbuffs

2022-06-22 Thread Eric Dumazet via dev
On Sun, Jun 19, 2022 at 2:39 AM Ilya Maximets wrote: > > Open vSwitch system test suite is broken due to inability to > load/unload netfilter modules. kworker thread is getting trapped > in the infinite loop while running a net cleanup inside the > nf_conntrack_cleanup_net_list, because deferred

Re: [ovs-dev] [PATCH net-next] net: rename reference+tracking helpers

2022-06-09 Thread Eric Dumazet via dev
On Thu, Jun 9, 2022 at 4:50 AM Paolo Abeni wrote: > > On Wed, 2022-06-08 at 16:00 -0700, Eric Dumazet wrote: > > On Wed, Jun 8, 2022 at 3:58 PM David Ahern wrote: > > > > > > On 6/8/22 8:58 AM, Jakub Kicinski wrote: > > > > IMO to encourage use of the track-capable API we could keep their names

Re: [ovs-dev] [PATCH net-next] net: rename reference+tracking helpers

2022-06-09 Thread Eric Dumazet via dev
On Wed, Jun 8, 2022 at 3:58 PM David Ahern wrote: > > On 6/8/22 8:58 AM, Jakub Kicinski wrote: > > IMO to encourage use of the track-capable API we could keep their names > > short and call the legacy functions __netdev_hold() as I mentioned or > > maybe netdev_hold_notrack(). > > I like that