Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp413065pxj; Wed, 16 Jun 2021 05:29:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdR4HPDxSN57KO1IBqOuxCq4Zm2guA5CN0j/RhQin90VteW+x9eM6w2hJ3mWsWiif6aIEs X-Received: by 2002:a17:906:a18b:: with SMTP id s11mr5203684ejy.8.1623846562596; Wed, 16 Jun 2021 05:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623846562; cv=none; d=google.com; s=arc-20160816; b=lfplSCHaTyG+fTlzSLXzmyyMPZYJnYxHyzGoNBBs2edWDBHeMW8F1QtTYuCGF+VYkm THYFLpv2Vhk6T6IxegnTUMONuPAzlmpcyXmmngvgSsM6HK4fpEH78OlPGCFenyODj7ir uNVJc+WgxpzSSBrKvV+w1IndvjdwKngxjKL62ft1TX1uaGPUt5eODH1gisyIAnbU0R1p eBLfw0JIpj0t+goE0VWYnppt4uuiUV3eFUpoS0Dzq91E+LPLJm8ZTAZtmy/p+i5Fr+0Y BTpLO9S3Gh/211PMSe68cXU+ufKwT41kY2iaWbkY473lZpLG+hWxwHEqOqcI9GcvR1Ag K0tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Bui+D0A2xOelMNCBvbI1v7PyyiFsu0uu5rLhHlMDHHA=; b=qBErQng7MMcMGBTMr26SpXQKUU6mBIeWRq+k3YLLNj8l6D8OASLp4Q3yVLPJ9AZnj4 l+GcdcG9CLrF3p5yJtUnhrCedoBUORfV1AjNr/Zr2pBBg4d7VrTNtXmhcGYkPJ0qu0ER p25YlEIXtRFEstEFeUU5sX7E91h5/9Wva3J+5qOEx1zRV+Nl7GMcVpu8Qd4sztfrMsHG W8n/ThqEZCpEdlkKD1oS/Wow3RJgmRjAfo27OgxGKK3AXkayajwkzZ0ARLKzPyPfTQcV ML4lcFeJL3PmtIpIudGQtjTD+yAufLP3Qrc5cPv7S6nUBcn7jiGEX8BIHbidgR1YrIeY v/4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si1981910ejz.520.2021.06.16.05.28.53; Wed, 16 Jun 2021 05:29:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbhFPMYw (ORCPT + 99 others); Wed, 16 Jun 2021 08:24:52 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:43838 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229503AbhFPMYw (ORCPT ); Wed, 16 Jun 2021 08:24:52 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 15GCMcHd015943 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jun 2021 08:22:39 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 4E2FA15C3CB8; Wed, 16 Jun 2021 08:22:38 -0400 (EDT) Date: Wed, 16 Jun 2021 08:22:38 -0400 From: "Theodore Ts'o" To: Jan Kara Cc: linux-ext4@vger.kernel.org, Eric Whitney , linux-fsdevel@vger.kernel.org, "Darrick J . Wong" Subject: Re: [PATCH 3/3] ext4: Fix overflow in ext4_iomap_alloc() Message-ID: References: <20210412102333.2676-1-jack@suse.cz> <20210412102333.2676-4-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210412102333.2676-4-jack@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Apr 12, 2021 at 12:23:33PM +0200, Jan Kara wrote: > A code in iomap alloc may overblock block number when converting it to > byte offset. Luckily this is mostly harmless as we will just use more > expensive method of writing using unwritten extents even though we are > writing beyond i_size. > > Fixes: 378f32bab371 ("ext4: introduce direct I/O write using iomap infrastructure") > Signed-off-by: Jan Kara This was part of the patch series "ext4: Fix data corruption when extending DIO write races with buffered read" but which fixes an unrelated problem. The patch series was dropped in favor of a different approach, but it looks like this patch is still applicable, so I've applied with a minor typo fix in the commit description. - Ted