Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1946911ybg; Thu, 24 Oct 2019 02:35:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSqGGrfEMcd2Dq8efBw2rTv8UhFMeTbNqqPc0pbE+jkf+xAM0Rzl0v5ZUnW8p8TwlWJNgX X-Received: by 2002:a50:b5e3:: with SMTP id a90mr41278904ede.201.1571909755881; Thu, 24 Oct 2019 02:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571909755; cv=none; d=google.com; s=arc-20160816; b=qcdb7RzkPeEbFMhGalTP4Er8+94U+FYtUpGat7toMbDx7E2DoqG000x3Idf11cHRrx CFVXk4eaAycUxTIz/Tqw2r+iyx3DU5BZq6A23lV/KVBUnUgLcBx5t3KjUd0L2A/pU79T aqB0dYGNb++zKoS4FikPMuwKHib7QGqY/OwtEFbfR2OMVsXe4C8hsvcblCsAnzkFT5bo pkV4jOUYNYbj1gUj5B208oPfR5aIqhGcW7xfIvYv8ODbN2g76DiBuXUGLB7vUKN9msYb 64rGkegiFCf9uHIjNfcMp9Vd6nZHhXZdbQF51YblJk7a+nKRBNtLRMG77Ng57Aaxv923 nCHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=hy03nylXW238iffdncxGMnQZVTiDiE/zqDnkDkr4VyI=; b=e+TxKS4PwUyL73rlR7MzCNebgpU3VcZ1xmiSQuVOt1ITyWFhyu2F27yyK9IdYCcNFk nbspVW0yewrtpSLXRMbk9e0GjIk4kfHAoF1DfUUkojQp3j+HkQPx32lpp3PZfWPsnNNk 8AMgbFKfVuVUtNZHFsXGZhE0H75F1I/fA7FLYuanOnfYCPs8DPD5c0LrjMu4PrhQdwxc I6HU8mINvSboSHxvSGbj7AEZd0frCF3MM6UWJ7i20wS9C6WqDSWrpnFpOUhxS7MMGCJC cqa3w0nEZ6uUFNsXe51y/F6MLS2L/JvB4saMIdcagaxodK498G7ZGANZW1xNqOVnK2SD dVSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s20si621416eju.421.2019.10.24.02.35.24; Thu, 24 Oct 2019 02:35:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388941AbfJWTqL (ORCPT + 99 others); Wed, 23 Oct 2019 15:46:11 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36281 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728697AbfJWTqL (ORCPT ); Wed, 23 Oct 2019 15:46:11 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-98.corp.google.com [104.133.0.98] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x9NJk5na030394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Oct 2019 15:46:06 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 3F07F420456; Wed, 23 Oct 2019 15:46:05 -0400 (EDT) Date: Wed, 23 Oct 2019 15:46:05 -0400 From: "Theodore Y. Ts'o" To: Ira Weiny Cc: Ext4 Developers List Subject: Re: [PATCH] ext4: fix signed vs unsigned comparison in ext4_valid_extent() Message-ID: <20191023194605.GA7630@mit.edu> References: <20191023013112.18809-1-tytso@mit.edu> <20191023054447.GE361298@sol.localdomain> <20191023131546.GB2460@mit.edu> <20191023184332.GC7689@iweiny-DESK2.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191023184332.GC7689@iweiny-DESK2.sc.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Oct 23, 2019 at 11:43:33AM -0700, Ira Weiny wrote: > On Wed, Oct 23, 2019 at 09:15:46AM -0400, Theodore Y. Ts'o wrote: > > On Tue, Oct 22, 2019 at 10:44:47PM -0700, Eric Biggers wrote: > > > > > > This patch can't be fixing anything because the comparison is unsigned both > > > before and after this patch. > > > > Thanks, you're right; I had forgotten C's signed/unsigned rules for > > addition. The funny thing is the original reporter of BZ #205197 > > reported that the problem went away he tried a similar patch. > > Not trying to stick my nose in too much here but: > > What does it mean if ext4_ext_get_actual_len() to return < 0? It's not possible for it to return < 0. We probably should clean it up to make it return an unsigned int, but that's a longer-term clean-up. - Ted