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

2023-09-24 Thread Gustavo A. R. Silva
c: Shaokun Zhang Cc: net...@vger.kernel.org Cc: linux-par...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/net/ethernet/dec/tulip/tulip.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

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

2023-09-23 Thread Gustavo A. R. Silva
Cc: Jakub Kicinski Cc: Paolo Abeni Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/his

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

2023-09-23 Thread Gustavo A. R. Silva
ei Liu Cc: Dexuan Cui Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-r...@vger.kernel.org Cc: linux-hyp...@vger.kernel.org Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- include/n

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

2023-09-23 Thread Gustavo A. R. Silva
b Kicinski Cc: Paolo Abeni Cc: net...@vger.kernel.org Cc: d...@openvswitch.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- net/openvswitch/meter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/meter.h b/net/openvswit

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

2023-09-23 Thread Gustavo A. R. Silva
Cc: Paolo Abeni Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/net/ipa/ipa_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ipa/ipa_power.c b/drivers/net/ipa/ipa_power.c index 0e

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

2023-09-23 Thread Gustavo A. R. Silva
umazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/net/ethernet/freescale/enetc/enetc_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

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

2023-09-23 Thread Gustavo A. R. Silva
ong Li Cc: Ajay Sharma Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-hyp...@vger.kernel.org Cc: linux-r...@vger.kernel.org Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- include

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

2023-09-23 Thread Gustavo A. R. Silva
Cc: Paolo Abeni Cc: net...@vger.kernel.org Cc: d...@openvswitch.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- net/openvswitch/meter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/meter.h b/net/openvswitch/met

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 CONFIG_FORTIF

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

2023-09-22 Thread Gustavo A. R. Silva
i Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- include/net/if_inet6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index c8490729b4ae..3e454c4d7ba6 10

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

2023-09-22 Thread Gustavo A. R. Silva
umazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/net/ethernet/freescale/enetc/enetc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

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

2023-09-22 Thread Gustavo A. R. Silva
Cc: Jakub Kicinski Cc: Paolo Abeni Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/his

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

2023-09-22 Thread Gustavo A. R. Silva
CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct ip_sf_socklist. [1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci Cc: "David S. Miller" Cc: Martin KaFai Lau Cc: "Gustavo A. R. S

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

2023-09-22 Thread Gustavo A. R. Silva
Cc: Paolo Abeni Cc: net...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo --- include/net/ip_fib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index f0c13864180e..84b0a82c9df4 10

[ovs-dev] [PATCH net-next] openvswitch: meter: Use struct_size() in kzalloc()

2019-01-15 Thread Gustavo A. R. Silva
: Gustavo A. R. Silva --- net/openvswitch/meter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c index c038e021a591..43849d752a1e 100644 --- a/net/openvswitch/meter.c +++ b/net/openvswitch/meter.c @@ -206,8 +206,7 @@ static

[ovs-dev] [PATCH] openvswitch: meter: Use 64-bit arithmetic instead of 32-bit

2018-01-30 Thread Gustavo A. R. Silva
000 is currently being evaluated using 32-bit arithmetic. Addresses-Coverity-ID: 1461563 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva --- net/openvswitch/meter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/meter.c b/net/openvswit

Re: [ovs-dev] [PATCH] net: openvswitch: datapath: fix data type in queue_gso_packets

2017-11-27 Thread Gustavo A. R. Silva
Quoting David Miller : From: Willem de Bruijn Date: Sat, 25 Nov 2017 16:15:01 -0500 On Sat, Nov 25, 2017 at 2:14 PM, Gustavo A. R. Silva wrote: gso_type is being used in binary AND operations together with SKB_GSO_UDP. The issue is that variable gso_type is of type unsigned short and

[ovs-dev] [PATCH] net: openvswitch: datapath: fix data type in queue_gso_packets

2017-11-25 Thread Gustavo A. R. Silva
s zero, hence making some code unreachable and likely causing undesired behavior. Fix this by changing the data type of variable gso_type to unsigned int. Addresses-Coverity-ID: 1462223 Fixes: 0c19f846d582 ("net: accept UFO datagrams from tuntap and packet") Signed-off-by: Gustavo A. R.

[ovs-dev] [PATCH] openvswitch: meter: fix NULL pointer dereference in ovs_meter_cmd_reply_start

2017-11-14 Thread Gustavo A. R. Silva
order to avoid a pontential null pointer dereference. Addresses-Coverity-ID: 1461561 ("Dereference before null check") Addresses-Coverity-ID: 1461562 ("Dereference null return value") Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure") Signed-off-by: Gustavo A.

[ovs-dev] [PATCH] openvswitch: conntrack: mark expected switch fall-through

2017-10-19 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed a "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva --- net/o