From patchwork Wed May 29 10:53:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eelco Chaudron X-Patchwork-Id: 1941168 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aM4jaFR0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vq5qG4Mdxz20Pr for ; Wed, 29 May 2024 20:54:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A22A0408DF; Wed, 29 May 2024 10:54:14 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id WA22_VJ-3kwZ; Wed, 29 May 2024 10:54:13 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 4BE4E408DB Authentication-Results: smtp4.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aM4jaFR0 Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4BE4E408DB; Wed, 29 May 2024 10:54:13 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 05284C0DD2; Wed, 29 May 2024 10:54:13 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 69DA1C0DCE for ; Wed, 29 May 2024 10:54:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 3892940207 for ; Wed, 29 May 2024 10:54:09 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id sNE2W_Lq9oDO for ; Wed, 29 May 2024 10:54:06 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=echaudro@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 2534340119 Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2534340119 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=aM4jaFR0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2534340119 for ; Wed, 29 May 2024 10:54:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716980044; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ctmzbqah4VLZfjd9yWDWHKVYtXXWzBU4TvIGv7Pt0rs=; b=aM4jaFR0fzs4cR1WpB3lPr8zgl93u/as2U6+nfDElJm+z2Mp5r9BkjWOoPi1Y92QN16yK4 sQApJaj39LCKo4tNMio9G4PjEojq1AyWAmAg/YIGQP8dFjN/dBzcu5F4IlfDW97miLTI1W RJurjYhoP/c8JIskWC1Ct98E/xQpZMQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-391-jGsSpP1jMuGpsYy5O4fcyA-1; Wed, 29 May 2024 06:54:03 -0400 X-MC-Unique: jGsSpP1jMuGpsYy5O4fcyA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D4B9D3C025B1; Wed, 29 May 2024 10:54:02 +0000 (UTC) Received: from ebuild.redhat.com (unknown [10.39.192.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 928181C0D100; Wed, 29 May 2024 10:54:01 +0000 (UTC) From: Eelco Chaudron To: dev@openvswitch.org Date: Wed, 29 May 2024 12:53:25 +0200 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH v3 0/8] Coverity fixes. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This series addresses several high-priority Coverity issues. Delta from v2 -> v3: - Cleaned up error message on patch 8. Delta from v1 -> v2: - Add cover letter. - Split first patch and update commit subject. - Added ds_destroy() to context_done(). - Changed invalid gso_type handling by returning an error + log message. - Changed sFlowRcvrTimeout to be using uint32_t to avoid TIME_T_MAKE. Eelco Chaudron (8): netdev-linux: Fix possible int overflow in tc_add_matchall_policer(). cfm: Fix possible integer overflow in tc_add_matchall_policer(). sflow: Replace libc's random() function with the OVS's random_range(). sflow: Use uint32_t instead of time_t for tick handling in the poller. sflow: Fix check for disabled receive time. ofproto-dpif: Define age as time_t in ofproto_unixctl_fdb_add(). db-ctl-base: Initialize the output variable in the ctx structure. netdev-linux: Fix uninitialized gso_type case. lib/cfm.c | 2 +- lib/db-ctl-base.c | 2 ++ lib/netdev-linux.c | 8 ++++++-- lib/sflow_api.h | 10 +++++----- lib/sflow_poller.c | 3 ++- lib/sflow_receiver.c | 7 ++++--- ofproto/ofproto-dpif-sflow.c | 2 +- ofproto/ofproto-dpif.c | 2 +- 8 files changed, 22 insertions(+), 14 deletions(-)