From mboxrd@z Thu Jan 1 00:00:00 1970 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 391DB5A004F for ; Mon, 08 Jul 2024 15:02:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720443736; 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=/TTbAq58K4EGULz1Cdy2l464uOKfqN2o+Wls5hoXCjU=; b=AXfRnAZ5PZJSZ8geLW7aFnNXmms5aoBREyQcklfW7dL+I6wYr0Kz6xpJe67ju4/OZtOeFe SQ8j4EP5c428iLH6eoB7/UxYocsQIAq8swHBYuOaV9csZAzcUXqsnNEehMb8mvnfd5MW15 xcJgYtndyYvgJxH8r+JnyLSWpiI5XVI= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-41-mmNvg3cFOg2lZciFCIw_MQ-1; Mon, 08 Jul 2024 09:02:15 -0400 X-MC-Unique: mmNvg3cFOg2lZciFCIw_MQ-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-79eff210166so389962785a.0 for ; Mon, 08 Jul 2024 06:02:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720443735; x=1721048535; 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=/TTbAq58K4EGULz1Cdy2l464uOKfqN2o+Wls5hoXCjU=; b=EAlff0mjEukyLcIamfUMbpZV7f0R4fVuscNvP+BBSkhRDhDOKyb41s89s6W0VtZ2Wd l4cNa+WrEc0HhzgA/pdeGFfH+SNQQbWkyGc+674phqjt3g5Hlhc0/UL1OmQ5fWLtN0tz Bt2YOPd1Z69tlmdTlfJTQkuAKcuyg/q/8HO95pUZjogJmjz2pGioTd99+0UF/kZAERNL FTY28YE6fYUOA8IC8hrYMVRwq9gWMpiJbLR3JltHGjqH4Q28nZOJZLlR8jeXI/yuF53z yJcA9/7fCyAi8VNmYrypxOXjCVmMVfZeBXLfAo2K1oLFcEf9BtJHSaw3FY3uTy1wasYG bg/Q== X-Gm-Message-State: AOJu0YwMM9vM9oepZTNWlpf7SMMxP2x2d6ntILkbdMGUUn0Rq8kgSlnM NyZjFd27AjNkfUgLLtEGWL5z1JZEESeLkeiPh9C+DooKycK7AA3fwujpyZQDJMyDX3+7L56t0XQ 3+56Qv8EXhHENmIqN16/9oct2P2FqlunyzTMbaqRSb7rxgU88qw== X-Received: by 2002:ae9:c202:0:b0:79f:bd4:f452 with SMTP id af79cd13be357-79f0bd4f5a3mr408687885a.18.1720443734784; Mon, 08 Jul 2024 06:02:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbjD5DV/3LN50pKqeeuEDec5PG40XoswEoq1rSL4jg+q7sU9IuFaoo2YjOm1TsRkYGwukdoA== X-Received: by 2002:ae9:c202:0:b0:79f:bd4:f452 with SMTP id af79cd13be357-79f0bd4f5a3mr408684385a.18.1720443734245; Mon, 08 Jul 2024 06:02:14 -0700 (PDT) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79ee5970614sm551801585a.2.2024.07.08.06.02.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Jul 2024 06:02:13 -0700 (PDT) Date: Mon, 8 Jul 2024 15:01:37 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 3/4] util, lineread, tap: Overflow checks on long signed sums and subtractions Message-ID: <20240708150137.1b3c94d4@elisabeth> In-Reply-To: <20240628203054.73eff0a3@elisabeth> References: <20240626234536.3306466-1-sbrivio@redhat.com> <20240626234536.3306466-4-sbrivio@redhat.com> <20240627095537.4d3f20f8@elisabeth> <20240628095510.4d300810@elisabeth> <20240628203054.73eff0a3@elisabeth> 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: IZPNKKMPGXZHOQD2YITLWLUL4RE7YECD X-Message-ID-Hash: IZPNKKMPGXZHOQD2YITLWLUL4RE7YECD 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, Matej Hrica 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 Fri, 28 Jun 2024 20:30:54 +0200 Stefano Brivio wrote: > I think this proves that Coverity really isn't happy unless the sum > itself happens in infinite precision (not even size_t domain with > ssize_t operands is enough). > > So, well, I can report the false positive, unless you have further > ideas to check. > > Meanwhile, we can either try to make this patch more acceptable, or > I'll suppress checks (downstream) as needed. By the way, somewhat on the subject: https://lore.kernel.org/all/202404291502.612E0A10@keescook/#r https://lwn.net/ml/linux-kernel/202404291502.612E0A10@keescook/ (I read it from my client, but I can't decide what web interface I would otherwise like the most...) -- Stefano