Re: [ovs-dev] [PATCH 14/14] net: sched: Annotate struct tc_pedit with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
On 9/22/23 11:28, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and

Re: [ovs-dev] [PATCH 03/14] ipv6: Annotate struct ip6_sf_socklist with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
On 9/22/23 11:28, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and

Re: [ovs-dev] [PATCH 05/14] net: enetc: Annotate struct enetc_int_vector with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
On 9/22/23 11:28, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and

Re: [ovs-dev] [PATCH 06/14] net: hisilicon: Annotate struct rcb_common_cb with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
On 9/22/23 11:28, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and

Re: [ovs-dev] [PATCH 02/14] ipv4/igmp: Annotate struct ip_sf_socklist with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
On 9/22/23 11:28, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and

Re: [ovs-dev] [PATCH 01/14] ipv4: Annotate struct fib_info with __counted_by

2023-09-22 Thread Gustavo A. R. Silva
On 9/22/23 11:28, Kees Cook wrote: Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and

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

2023-09-22 Thread Ilya Maximets
On 9/22/23 21:07, Ilya Maximets wrote: > On 9/22/23 15:26, Ilya Maximets wrote: >> On 6/19/22 02:39, 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

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

2023-09-22 Thread Ilya Maximets
On 9/22/23 15:26, Ilya Maximets wrote: > On 6/19/22 02:39, 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 >>

Re: [ovs-dev] [PATCH ovn] controller: disable OpenFlow inactivity probing

2023-09-22 Thread Han Zhou
On Mon, Sep 11, 2023 at 7:31 AM Vladislav Odintsov wrote: > > Hi Dumitru, > > if eventually this patch got merged, please remove next lines from its commit message: > > "Disablement for ovs-vswitchd -> ovn-controller OF inacivity probing will > be done in the next patch." > > Unfortunately I was

Re: [ovs-dev] [PATCH 14/14] net: sched: Annotate struct tc_pedit with __counted_by

2023-09-22 Thread Kees Cook
On Fri, Sep 22, 2023 at 10:28:56AM -0700, Kees Cook wrote: > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS > (for array

Re: [ovs-dev] [PATCH 14/14] net: sched: Annotate struct tc_pedit with __counted_by

2023-09-22 Thread Kees Cook
On Fri, Sep 22, 2023 at 10:28:56AM -0700, Kees Cook wrote: > Prepare for the coming implementation by GCC and Clang of the __counted_by > attribute. Flexible array members annotated with __counted_by can have > their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS > (for array

Re: [ovs-dev] [PATCH 09/14] net: mana: Annotate struct hwc_dma_buf with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

Re: [ovs-dev] [PATCH 08/14] net: ipa: Annotate struct ipa_power with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

Re: [ovs-dev] [PATCH 07/14] net: mana: Annotate struct mana_rxq with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

Re: [ovs-dev] [PATCH 06/14] net: hisilicon: Annotate struct rcb_common_cb with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

Re: [ovs-dev] [PATCH 05/14] net: enetc: Annotate struct enetc_int_vector with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

Re: [ovs-dev] [PATCH 04/14] net: hns: Annotate struct ppe_common_cb with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

Re: [ovs-dev] [PATCH 03/14] ipv6: Annotate struct ip6_sf_socklist with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

Re: [ovs-dev] [PATCH 01/14] ipv4: Annotate struct fib_info with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. git-am: error: sha1 information is lacking or useless (include/net/ip_fib.h). error: could not build fake

Re: [ovs-dev] [PATCH 02/14] ipv4/igmp: Annotate struct ip_sf_socklist with __counted_by

2023-09-22 Thread 0-day Robot
Bleep bloop. Greetings Kees Cook, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. Patch skipped due to previous failure. Please check this out. If you feel there has been an error, please

Re: [ovs-dev] [ovn] ha-chassis-group false positive failover

2023-09-22 Thread Han Zhou
Hi Vladislav, (Sorry I didn't notice your update until now when reading the discussion of your OVN patch) I think a simple solution is to update the hardcoded 60s probe in OVS to 0, for the pre-created punix mgmt controller. We could make it configurable, but it may not make much sense since it

[ovs-dev] [PATCH 11/14] net: enetc: Annotate struct enetc_psfp_gate with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 14/14] net: sched: Annotate struct tc_pedit with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 13/14] net: tulip: Annotate struct mediatable with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 10/14] net: openvswitch: Annotate struct dp_meter_instance with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 09/14] net: mana: Annotate struct hwc_dma_buf with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 06/14] net: hisilicon: Annotate struct rcb_common_cb with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 08/14] net: ipa: Annotate struct ipa_power with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 05/14] net: enetc: Annotate struct enetc_int_vector with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 12/14] net: openvswitch: Annotate struct dp_meter with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 07/14] net: mana: Annotate struct mana_rxq with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 00/14] Batch 1: Annotate structs with __counted_by

2023-09-22 Thread Kees Cook
Hi, This is the batch 1 of patches touching netdev for preparing for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array

[ovs-dev] [PATCH 04/14] net: hns: Annotate struct ppe_common_cb with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 01/14] ipv4: Annotate struct fib_info with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 03/14] ipv6: Annotate struct ip6_sf_socklist with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH 02/14] ipv4/igmp: Annotate struct ip_sf_socklist with __counted_by

2023-09-22 Thread Kees Cook
Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family

[ovs-dev] [PATCH ovn] docs: require ovn-set-local-ip for co-located ovn-controllers

2023-09-22 Thread Ihar Hrachyshka
Without using the setting, ovn-controllers will fail to create their tunnel ports pointing to the same remote chassis due to identical configuration used (same remote_ips and no different in local_ips). The error observed then is: ``` 2023-08-01T13:55:37.772Z|00050|tunnel|WARN|ovn-hv3-0:

Re: [ovs-dev] [PATCH] connmgr: Fix ofconn configuration on vswitchd startup.

2023-09-22 Thread Eelco Chaudron
On 15 Sep 2023, at 6:36, Brad Cowie wrote: > ofconn connection parameters, such as probe_interval and max_backoff, > are always set to their default values when vswitchd starts up even if > the user has configured these to be something different in ovsdb: > > $ ovs-vsctl set controller UUID

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

2023-09-22 Thread Ilya Maximets
On 6/19/22 02:39, 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 skbuffs are

[ovs-dev] [PATCH v2] ovsdb: Fix potential leak when making diff of conditions.

2023-09-22 Thread Xavier Simonart
OVN unit tests highlight this: ERROR: LeakSanitizer: detected memory leaks Direct leak of 1344 byte(s) in 1 object(s) allocated from: 0 0x4db0b7 in calloc (ovsdb/ovsdb-server+0x4db0b7) 1 0x5c2162 in xcalloc__ lib/util.c:124:31 2 0x5c221c in xcalloc lib/util.c:161:12 3 0x54afbc in

Re: [ovs-dev] [PATCH ovn] memory-trim: Fix timestamp overflow warning right after reboot.

2023-09-22 Thread Dumitru Ceara
On 9/22/23 14:21, Ilya Maximets wrote: > If OVN is started less than 30 seconds after system boot, it logs: > > |memory_trim|WARN|Detected last active timestamp overflow > > The 'now < trim_timeout_ms' is not for a timestamp overflow, but > for the later subtraction. 'now < last_active_ms' is

[ovs-dev] [PATCH ovn] memory-trim: Fix timestamp overflow warning right after reboot.

2023-09-22 Thread Ilya Maximets
If OVN is started less than 30 seconds after system boot, it logs: |memory_trim|WARN|Detected last active timestamp overflow The 'now < trim_timeout_ms' is not for a timestamp overflow, but for the later subtraction. 'now < last_active_ms' is enough to check for the overflow. Technically, we

Re: [ovs-dev] [PATCH v5 2/2] netdev-tc-offload: Add IPIP/GRE protocols to offload in ip rewrite

2023-09-22 Thread Eelco Chaudron
On 5 Sep 2023, at 12:17, Faicker Mo via dev wrote: > The warning message is Hi Faicker, thanks for the patch! > |1|tc(handler4)|WARN|can't offload rewrite of IP/IPV6 with ip_proto: X. > > IPIP and GRE only need the checksum recalculation of the IP header if the > IP header is rewritten. > >

Re: [ovs-dev] [PATCH v5 1/2] netdev-tc-offload: Add csum offload of IGMP/UDPLITE/SCTP in ip rewrite

2023-09-22 Thread Eelco Chaudron
On 5 Sep 2023, at 12:17, Faicker Mo via dev wrote: > When the IP header is rewritten like NAT or ttl/tos changed, > the csum of IP header need recalculation. The UDPLITE checksum > needs recalculation if src or dst changed in IP header. > The tc-csum action is for this. > > Signed-off-by:

Re: [ovs-dev] [PATCH v5 1/2] netdev-tc-offload: Add csum offload of IGMP/UDPLITE/SCTP in ip rewrite

2023-09-22 Thread Eelco Chaudron
On 5 Sep 2023, at 12:17, Faicker Mo via dev wrote: Hi Faicker, Thanks for this patch series! I have some comments below. > When the IP header is rewritten like NAT or ttl/tos changed, > the csum of IP header need recalculation. The UDPLITE checksum > needs recalculation if src or dst changed in

Re: [ovs-dev] [PATCH] ovsdb: Fix potential leak when making diff of conditions.

2023-09-22 Thread Xavier Simonart
Hi Thanks Ilya for the review. Comments below. I'll send a v2 Xavier On Wed, Sep 20, 2023 at 9:05 PM Ilya Maximets wrote: > On 9/20/23 19:28, Xavier Simonart wrote: > > OVN unit tests highlight this: > > > > ERROR: LeakSanitizer: detected memory leaks > > Direct leak of 1344 byte(s) in 1

Re: [ovs-dev] OVN weekly community meeting

2023-09-22 Thread Frode Nordahl
Hello Dumitru and Team, On Thu, Sep 21, 2023 at 5:25 PM Dumitru Ceara wrote: > > Hi all, > > As you probably know and as the ovn.org website mentions [0] we have > weekly OVN IRC meetings, in #openvswitch on irc.libera.chat (the time is > slightly wrong but that's a different issue [1]). > > In

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

2023-09-22 Thread Eelco Chaudron
On 21 Sep 2023, at 21:42, 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-enters

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

2023-09-22 Thread Eelco Chaudron
On 21 Sep 2023, at 21:42, 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-enters