From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=W8T10StE; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 586CF5A026E for ; Wed, 18 Sep 2024 20:13:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726683208; 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: in-reply-to:in-reply-to:references:references; bh=gTXnLZ4L3lSUj74cS5eTuN14w5eYqNKKeIRli6Z0xoY=; b=W8T10StEs4gUICYHY4Ji4GFUlcLzgQxKRiXJ+WkS5R+Fwf8g4QgdBC+Dd58akn/3zjHv79 iyP5ceZ4MCTLDbj32UEI8ljk1+t4Wnm0j7EXWFzp6fJzSz9u+ir/Nezsx/1IHqhYUimXVA GrDxOq5mEXhvyY4L90FUi0X4liggwxs= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-513-HjRDwzErMgeJ8dwOaQ_B9w-1; Wed, 18 Sep 2024 14:13:26 -0400 X-MC-Unique: HjRDwzErMgeJ8dwOaQ_B9w-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-42cb33e6299so45074115e9.2 for ; Wed, 18 Sep 2024 11:13:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726683206; x=1727288006; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gTXnLZ4L3lSUj74cS5eTuN14w5eYqNKKeIRli6Z0xoY=; b=aDa0vzo4NT2TWOok5ThHef5ZMZV7Yn5digKZUB6KC1F/7mMx4BXSWrQafTXMPY+mjy uV4/IEbHlMwiEW6kmQahAnj0UR7crqGfJgJ2YnKrqDCb/8MGj8Dn8UuHtB9elPk7sw6a d7aUs8COTAPQ0p2soUkcO5PizxBPeIku5laiyYsXXrUY5ER8WZO2PlWBHXJ6AoTdIZGe FwU6v+bKwDpB6eIXV4gwSXNHZNOtCxSGRO7jTlRGkev5zF2YAU8pe4WGaSMcxFOgJnIN nR6Hd2NivH5FS+/Pzbv0PHjqlzb9sM3J3LzBjlVrCwPbAAC5OjUtjLepruTIibo3x4hC tjaA== X-Gm-Message-State: AOJu0YzeXIBvgIiMrzz6Rh2tT25aU0Qdkw1kwtUlE5CIYOMkZTnmZZFr Z6XGEYpXzmG6+w4PP7pWbcLF75Ml89vyTL37VdaSE+Plfmy5GV5bxdjXsssuVLy5ryVia7gAmIf fpxgyaGlF/mfzuYl6vYsuL2iuFuEoycNt62XAJdh8X2Q5XUDLwg== X-Received: by 2002:a05:600c:1987:b0:42c:b4f1:f281 with SMTP id 5b1f17b1804b1-42cdb58f2bbmr165209045e9.34.1726683205618; Wed, 18 Sep 2024 11:13:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEPrXMlRo8RkZLn68Gxh+Jyepw8iIz+z/L4Fir8wATgv/SQQyl7wD/k4KcEAWRpsoCAgrXfUQ== X-Received: by 2002:a05:600c:1987:b0:42c:b4f1:f281 with SMTP id 5b1f17b1804b1-42cdb58f2bbmr165208915e9.34.1726683205222; Wed, 18 Sep 2024 11:13:25 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378e71f0622sm13003175f8f.18.2024.09.18.11.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2024 11:13:24 -0700 (PDT) Date: Wed, 18 Sep 2024 20:13:22 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v3 0/2] util: Fix some problems in write_remainder() Message-ID: <20240918201322.616ed30e@elisabeth> In-Reply-To: <20240918104406.3050878-1-david@gibson.dropbear.id.au> References: <20240918104406.3050878-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: WAX5SXJ457W2J657RPKTMKQWCK3KFAZV X-Message-ID-Hash: WAX5SXJ457W2J657RPKTMKQWCK3KFAZV X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Markus Armbruster X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 18 Sep 2024 20:44:04 +1000 David Gibson wrote: > With Markus Armbruster's help I re-examined the Coverity warning we've > had in this function for a while. While I still don't understand some > steps in the report it's giving, I did spot some real problems in the > vicinity. It turns out fixing those also fixes the Coverity warning, > so here we go. > > Changes since v2: > * Handle EINTR within write_all_buf() (suggested by Markus > Armbruster) > > David Gibson (2): > util: Add helper to write() all of a buffer > util: Remove possible quadratic behaviour from write_remainder() Applied. -- Stefano