From patchwork Tue May 28 11:39:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eelco Chaudron X-Patchwork-Id: 1940436 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=LvpNl18s; 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 4VpW1Y0TRJz20Q9 for ; Tue, 28 May 2024 21:46:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 392E14058B; Tue, 28 May 2024 11:46:07 +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 ZRleUcpmSpkt; Tue, 28 May 2024 11:46:06 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 149CE4025F 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=LvpNl18s Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 149CE4025F; Tue, 28 May 2024 11:46:06 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id DC366C0072; Tue, 28 May 2024 11:46:05 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7DCB8C0037 for ; Tue, 28 May 2024 11:46:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5F12A40250 for ; Tue, 28 May 2024 11:46:04 +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 k8lmCY9g2fgl for ; Tue, 28 May 2024 11:46:03 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=echaudro@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 0892440249 Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0892440249 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0892440249 for ; Tue, 28 May 2024 11:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716896761; 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=OSPjjx9vA5VK19Lhu/c7SbPb5tug7TrP8BIbUcQ6ZlQ=; b=LvpNl18szlZxcPB00+NcKeUFE1Tyg+VSwaIMH/gIE1vsiCkTqqgsySLcBqd4+ZasCJ2B+P 7FRu1wEG2fuIFsCqgO5dtlItBWzZmd0FW1dx2fdzZIcQuwO4btt0BCvgxhyKt8wQfjhtG6 d/YKmaPKSXbVb/FJzUkQz9CK5KI+Q5g= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-486-p-Gd4LtpN_mZS-hHwvZsgw-1; Tue, 28 May 2024 07:45:59 -0400 X-MC-Unique: p-Gd4LtpN_mZS-hHwvZsgw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 4C11E8029E1; Tue, 28 May 2024 11:45:59 +0000 (UTC) Received: from ebuild.redhat.com (unknown [10.39.192.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86E09200A610; Tue, 28 May 2024 11:45:58 +0000 (UTC) From: Eelco Chaudron To: dev@openvswitch.org Date: Tue, 28 May 2024 13:39:28 +0200 Message-ID: <20240528114552.730389-1-echaudro@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH v2 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 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 | 9 +++++++-- 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, 23 insertions(+), 14 deletions(-)